Home | History | Annotate | Download | only in etc
      1     0    stevel #
      2     0    stevel # CDDL HEADER START
      3     0    stevel #
      4     0    stevel # The contents of this file are subject to the terms of the
      5  2572  rs200217 # Common Development and Distribution License (the "License").
      6  2572  rs200217 # You may not use this file except in compliance with the License.
      7     0    stevel #
      8     0    stevel # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9     0    stevel # or http://www.opensolaris.org/os/licensing.
     10     0    stevel # See the License for the specific language governing permissions
     11     0    stevel # and limitations under the License.
     12     0    stevel #
     13     0    stevel # When distributing Covered Code, include this CDDL HEADER in each
     14     0    stevel # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15     0    stevel # If applicable, add the following below this CDDL HEADER, with the
     16     0    stevel # fields enclosed by brackets "[]" replaced with your own identifying
     17     0    stevel # information: Portions Copyright [yyyy] [name of copyright owner]
     18     0    stevel #
     19     0    stevel # CDDL HEADER END
     20     0    stevel #
     21  9692     Rishi # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     22     0    stevel # Use is subject to license terms.
     23     0    stevel 
     24     0    stevel SYMPROG= hosts inetd.conf networks protocols services netmasks sock2path
     25     0    stevel 
     26     0    stevel # New /etc/inet files shouldn't have /etc entries.
     27  9692     Rishi EDITPROG= ipaddrsel.conf ipsecalgs
     28  9692     Rishi PROG= datemsk.ndpd ipsecinit.sample ipqosconf.1.sample ipqosconf.2.sample \
     29  9692     Rishi     ipqosconf.3.sample wanboot.conf.sample
     30  9692     Rishi ETCPROG= $(SYMPROG) $(EDITPROG) $(PROG)
     31     0    stevel SUBDIRS= default dhcp init.d ike nca ppp secret
     32     0    stevel 
     33     0    stevel include ../../Makefile.cmd
     34     0    stevel 
     35     0    stevel all:=		TARGET= all
     36     0    stevel install:=	TARGET= install
     37     0    stevel 
     38     0    stevel ROOTVAR=	$(ROOT)/var
     39     0    stevel INETETCDIR=	$(ROOTETC)/inet
     40     0    stevel INETVARDIR=	$(ROOTVAR)/inet
     41     0    stevel DIRS= 		$(INETETCDIR) $(INETVARDIR)
     42     0    stevel SYMDIR= 	inet
     43     0    stevel ETCINETPROG=	$(ETCPROG:%=$(INETETCDIR)/%)
     44  9692     Rishi EDITFILES=	$(SYMPROG:%=$(INETETCDIR)/%) $(EDITPROG:%=$(INETETCDIR)/%)
     45     0    stevel # Only old /etc/inet files get symlinks in /etc.
     46     0    stevel SYMETCPROG=	$(SYMPROG:%=sym_%)
     47  2572  rs200217 SYMIPNODES=	$(INETETCDIR)/ipnodes
     48     0    stevel 
     49     0    stevel FILEMODE= 0444
     50     0    stevel 
     51     0    stevel .KEEP_STATE:
     52  9692     Rishi 
     53  9692     Rishi $(EDITFILES) := FILEMODE= 0644
     54     0    stevel 
     55     0    stevel all: $(ETCPROG) $(SUBDIRS)
     56     0    stevel 
     57  2572  rs200217 install: all $(DIRS) $(ETCINETPROG) $(SYMETCPROG) $(SYMIPNODES) $(SUBDIRS)
     58  2572  rs200217 
     59  2572  rs200217 $(SYMIPNODES) :
     60  2572  rs200217 	$(RM) $@
     61  2572  rs200217 	$(SYMLINK) ./hosts $@
     62     0    stevel 
     63     0    stevel $(INETETCDIR)/% : %
     64     0    stevel 	$(INS.file)
     65     0    stevel 
     66     0    stevel sym_% : %
     67     0    stevel 	$(RM) $(ROOTETC)/$<
     68     0    stevel 	$(SYMLINK) $(SYMDIR)/$< $(ROOTETC)/$<
     69     0    stevel 
     70     0    stevel $(DIRS):
     71     0    stevel 	$(INS.dir)
     72     0    stevel 
     73     0    stevel $(SUBDIRS): FRC $(DIRS)
     74     0    stevel 	@cd $@; pwd; $(MAKE) $(TARGET)
     75     0    stevel 
     76     0    stevel FRC:
     77     0    stevel 
     78     0    stevel # datemsk.ndpd is generated from datemsk.template because of a side-effect of
     79     0    stevel # SCCS.  Some of the datemsk.ndpd format strings include "%<letter>%", which
     80     0    stevel # SCCS confuses for ID keywords.  datemsk.template should quote the "%"
     81     0    stevel # with "\" and code below will filter out the "\".  Only datemsk.ndpd format
     82     0    stevel # strings next to each other need to be quoted.
     83     0    stevel 
     84     0    stevel datemsk.ndpd: datemsk.template
     85     0    stevel 	@while read i; do echo $$i; done < datemsk.template > $@
     86     0    stevel 
     87     0    stevel clean clobber:
     88     0    stevel 	$(RM) datemsk.ndpd
     89     0    stevel 
     90     0    stevel lint:
     91