dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / cmd-inet / etc / Makefile
blob65a730b79146287b2356ce1ca41ba34a2737c71e
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
21 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
22 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 SYMPROG= hosts inetd.conf networks protocols services netmasks
26 # New /etc/inet files shouldn't have /etc entries.
27 EDITPROG= ipaddrsel.conf ipsecalgs
28 PROG= datemsk.ndpd ipsecinit.sample ipqosconf.1.sample ipqosconf.2.sample \
29 ipqosconf.3.sample
30 ETCPROG= $(SYMPROG) $(EDITPROG) $(PROG)
31 SUBDIRS= default dhcp init.d ppp secret sock2path.d
33 include ../../Makefile.cmd
35 all:= TARGET= all
36 install:= TARGET= install
38 ROOTVAR= $(ROOT)/var
39 INETETCDIR= $(ROOTETC)/inet
40 INETVARDIR= $(ROOTVAR)/inet
41 DIRS= $(INETETCDIR) $(INETVARDIR)
42 SYMDIR= inet
43 ETCINETPROG= $(ETCPROG:%=$(INETETCDIR)/%)
44 EDITFILES= $(SYMPROG:%=$(INETETCDIR)/%) $(EDITPROG:%=$(INETETCDIR)/%)
45 # Only old /etc/inet files get symlinks in /etc.
46 SYMETCPROG= $(SYMPROG:%=sym_%)
47 SYMIPNODES= $(INETETCDIR)/ipnodes
49 FILEMODE= 0444
51 .KEEP_STATE:
53 $(EDITFILES) := FILEMODE= 0644
55 all: $(ETCPROG) $(SUBDIRS)
57 install: all $(DIRS) $(ETCINETPROG) $(SYMETCPROG) $(SYMIPNODES) $(SUBDIRS)
59 $(SYMIPNODES) :
60 $(RM) $@
61 $(SYMLINK) ./hosts $@
63 $(INETETCDIR)/% : %
64 $(INS.file)
66 sym_% : %
67 $(RM) $(ROOTETC)/$<
68 $(SYMLINK) $(SYMDIR)/$< $(ROOTETC)/$<
70 $(DIRS):
71 $(INS.dir)
73 $(SUBDIRS): FRC $(DIRS)
74 @cd $@; pwd; $(MAKE) $(TARGET)
76 FRC:
78 # datemsk.ndpd is generated from datemsk.template because of a side-effect of
79 # SCCS. Some of the datemsk.ndpd format strings include "%<letter>%", which
80 # SCCS confuses for ID keywords. datemsk.template should quote the "%"
81 # with "\" and code below will filter out the "\". Only datemsk.ndpd format
82 # strings next to each other need to be quoted.
84 datemsk.ndpd: datemsk.template
85 @while read i; do echo $$i; done < datemsk.template > $@
87 clean clobber:
88 $(RM) datemsk.ndpd