xref: /titanic_41/usr/src/cmd/cmd-inet/etc/Makefile (revision 6a634c9dca3093f3922e4b7ab826d7bdf17bf78e)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
527092493Srs200217# Common Development and Distribution License (the "License").
627092493Srs200217# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
21*d2b5b2d3SAnders Persson# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
227c478bd9Sstevel@tonic-gate
23*d2b5b2d3SAnders PerssonSYMPROG= hosts inetd.conf networks protocols services netmasks
247c478bd9Sstevel@tonic-gate
257c478bd9Sstevel@tonic-gate# New /etc/inet files shouldn't have /etc entries.
263361618bSRishi SrivatsavaiEDITPROG= ipaddrsel.conf ipsecalgs
273361618bSRishi SrivatsavaiPROG= datemsk.ndpd ipsecinit.sample ipqosconf.1.sample ipqosconf.2.sample \
283361618bSRishi Srivatsavai    ipqosconf.3.sample wanboot.conf.sample
293361618bSRishi SrivatsavaiETCPROG= $(SYMPROG) $(EDITPROG) $(PROG)
30*d2b5b2d3SAnders PerssonSUBDIRS= default dhcp init.d ike nca ppp secret sock2path.d
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
337c478bd9Sstevel@tonic-gate
347c478bd9Sstevel@tonic-gateall:=		TARGET= all
357c478bd9Sstevel@tonic-gateinstall:=	TARGET= install
367c478bd9Sstevel@tonic-gate
377c478bd9Sstevel@tonic-gateROOTVAR=	$(ROOT)/var
387c478bd9Sstevel@tonic-gateINETETCDIR=	$(ROOTETC)/inet
397c478bd9Sstevel@tonic-gateINETVARDIR=	$(ROOTVAR)/inet
407c478bd9Sstevel@tonic-gateDIRS= 		$(INETETCDIR) $(INETVARDIR)
417c478bd9Sstevel@tonic-gateSYMDIR= 	inet
427c478bd9Sstevel@tonic-gateETCINETPROG=	$(ETCPROG:%=$(INETETCDIR)/%)
433361618bSRishi SrivatsavaiEDITFILES=	$(SYMPROG:%=$(INETETCDIR)/%) $(EDITPROG:%=$(INETETCDIR)/%)
447c478bd9Sstevel@tonic-gate# Only old /etc/inet files get symlinks in /etc.
457c478bd9Sstevel@tonic-gateSYMETCPROG=	$(SYMPROG:%=sym_%)
4627092493Srs200217SYMIPNODES=	$(INETETCDIR)/ipnodes
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gateFILEMODE= 0444
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gate.KEEP_STATE:
517c478bd9Sstevel@tonic-gate
523361618bSRishi Srivatsavai$(EDITFILES) := FILEMODE= 0644
533361618bSRishi Srivatsavai
547c478bd9Sstevel@tonic-gateall: $(ETCPROG) $(SUBDIRS)
557c478bd9Sstevel@tonic-gate
5627092493Srs200217install: all $(DIRS) $(ETCINETPROG) $(SYMETCPROG) $(SYMIPNODES) $(SUBDIRS)
5727092493Srs200217
5827092493Srs200217$(SYMIPNODES) :
5927092493Srs200217	$(RM) $@
6027092493Srs200217	$(SYMLINK) ./hosts $@
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gate$(INETETCDIR)/% : %
637c478bd9Sstevel@tonic-gate	$(INS.file)
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gatesym_% : %
667c478bd9Sstevel@tonic-gate	$(RM) $(ROOTETC)/$<
677c478bd9Sstevel@tonic-gate	$(SYMLINK) $(SYMDIR)/$< $(ROOTETC)/$<
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gate$(DIRS):
707c478bd9Sstevel@tonic-gate	$(INS.dir)
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gate$(SUBDIRS): FRC $(DIRS)
737c478bd9Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gateFRC:
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gate# datemsk.ndpd is generated from datemsk.template because of a side-effect of
787c478bd9Sstevel@tonic-gate# SCCS.  Some of the datemsk.ndpd format strings include "%<letter>%", which
797c478bd9Sstevel@tonic-gate# SCCS confuses for ID keywords.  datemsk.template should quote the "%"
807c478bd9Sstevel@tonic-gate# with "\" and code below will filter out the "\".  Only datemsk.ndpd format
817c478bd9Sstevel@tonic-gate# strings next to each other need to be quoted.
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gatedatemsk.ndpd: datemsk.template
847c478bd9Sstevel@tonic-gate	@while read i; do echo $$i; done < datemsk.template > $@
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gateclean clobber:
877c478bd9Sstevel@tonic-gate	$(RM) datemsk.ndpd
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gatelint:
90