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