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