xref: /onnv-gate/usr/src/cmd/initpkg/Makefile (revision 10370:dcd626b57c18)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
510207SJames.McPherson@Sun.COM# Common Development and Distribution License (the "License").
610207SJames.McPherson@Sun.COM# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
2210207SJames.McPherson@Sun.COM# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate# Use is subject to license terms.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate
260Sstevel@tonic-gateSHFILES=	dfstab vfstab
270Sstevel@tonic-gateCPFILES=	rcS rc0 rc1 rc2 rc3 mountall shutdown swapadd umountall
280Sstevel@tonic-gateALL=		$(SHFILES) $(CPFILES)
29*10370SThomas.Whitten@Sun.COMTXTS=		rc2.d/mk.rc2.d.sh
300Sstevel@tonic-gateCLOBBERFILES=	$(ALL)
31*10370SThomas.Whitten@Sun.COMRCDIRS=		rc2.d
320Sstevel@tonic-gate
330Sstevel@tonic-gateinclude ../Makefile.cmd
340Sstevel@tonic-gate
350Sstevel@tonic-gateETCDFSD=	$(ROOTETC)/dfs
360Sstevel@tonic-gate
370Sstevel@tonic-gateSBINF=		rcS mountall rc0 rc1 rc2 rc3 swapadd umountall
380Sstevel@tonic-gateSBINL=		rc5 rc6
390Sstevel@tonic-gateUSRSBINF=	mountall shutdown umountall
400Sstevel@tonic-gate
410Sstevel@tonic-gatesparc_ETCTABS=
420Sstevel@tonic-gatei386_ETCTABS=	bootrc
430Sstevel@tonic-gateETCTABS=	vfstab inittab nscd.conf security/crypt.conf $($(MACH)_ETCTABS)
440Sstevel@tonic-gate
450Sstevel@tonic-gateDFSTAB=		dfstab
460Sstevel@tonic-gateSBINETC=	rcS mountall rc0 rc1 rc2 rc3 rc5 rc6 swapadd umountall
470Sstevel@tonic-gateUSRSBINETC=	shutdown
480Sstevel@tonic-gate
490Sstevel@tonic-gateFILEMODE=	0744
500Sstevel@tonic-gate
510Sstevel@tonic-gateROOTSBINF=	$(SBINF:%=$(ROOTSBIN)/%)
520Sstevel@tonic-gateROOTSBINL=	$(SBINL:%=$(ROOTSBIN)/%)
530Sstevel@tonic-gateROOTUSRSBINF=	$(USRSBINF:%=$(ROOTUSRSBIN)/%)
540Sstevel@tonic-gateROOTETCTABS=	$(ETCTABS:%=$(ROOTETC)/%)
550Sstevel@tonic-gateROOTDFSTAB=	$(DFSTAB:%=$(ETCDFSD)/%)
560Sstevel@tonic-gateSYMSBINF=	$(SBINETC:%=$(ROOTETC)/%)
570Sstevel@tonic-gateSYMUSRSBINF=	$(USRSBINETC:%=$(ROOTETC)/%)
580Sstevel@tonic-gate
590Sstevel@tonic-gate$(ROOTETC)/inittab		:= FILEMODE =	0644
600Sstevel@tonic-gate$(ROOTETC)/vfstab		:= FILEMODE =	0644
610Sstevel@tonic-gate$(ROOTETC)/nscd.conf		:= FILEMODE =	0644
620Sstevel@tonic-gate$(ROOTETC)/security/crypt.conf	:= FILEMODE =	0644
630Sstevel@tonic-gate$(ROOTETC)/bootrc		:= FILEMODE =	0755
640Sstevel@tonic-gate$(ROOTDFSTAB)			:= FILEMODE =	0644
650Sstevel@tonic-gate$(ROOTSBIN)/mountall		:= FILEMODE =	0555
660Sstevel@tonic-gate$(ROOTUSRSBIN)/mountall		:= FILEMODE =	0555
670Sstevel@tonic-gate$(ROOTSBIN)/umountall		:= FILEMODE =	0555
680Sstevel@tonic-gate$(ROOTUSRSBIN)/umountall	:= FILEMODE =	0555
690Sstevel@tonic-gate$(ROOTUSRSBIN)/shutdown		:= FILEMODE =	0755
700Sstevel@tonic-gate
710Sstevel@tonic-gate$(ETCDFSD)/% : %
720Sstevel@tonic-gate	$(INS.file)
730Sstevel@tonic-gate
740Sstevel@tonic-gate.KEEP_STATE:
750Sstevel@tonic-gate
760Sstevel@tonic-gateall: $(ALL) all_init.d $(TXTS)
770Sstevel@tonic-gate
780Sstevel@tonic-gate$(SYMSBINF):
790Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
800Sstevel@tonic-gate
810Sstevel@tonic-gate$(SYMUSRSBINF):
820Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../usr/sbin/$(@F) $@
830Sstevel@tonic-gate
840Sstevel@tonic-gate$(ROOTSBINL):	$(ROOTSBIN)/rc0
850Sstevel@tonic-gate	$(RM) $@; $(LN) $(ROOTSBIN)/rc0 $@
860Sstevel@tonic-gate
870Sstevel@tonic-gateall_init.d: FRC
880Sstevel@tonic-gate	@cd init.d; pwd; $(MAKE) $(MFLAGS) all
890Sstevel@tonic-gate
900Sstevel@tonic-gateins_init.d: FRC
910Sstevel@tonic-gate	@cd init.d; pwd; $(MAKE) $(MFLAGS) install
920Sstevel@tonic-gate
930Sstevel@tonic-gate$(SHFILES):
940Sstevel@tonic-gate	sh $@.sh $(ROOT)
950Sstevel@tonic-gate
96*10370SThomas.Whitten@Sun.COMinstall: $(ALL) ins_all ins_init.d $(RCDIRS)
970Sstevel@tonic-gate
980Sstevel@tonic-gateins_all : $(ROOTSBINF) $(ROOTSBINL) $(ROOTUSRSBINF) $(ROOTETCTABS) \
990Sstevel@tonic-gate	$(ROOTDFSTAB)  $(SYMSBINF) $(SYMUSRSBINF)
1000Sstevel@tonic-gate
1010Sstevel@tonic-gate# Don't re-install directories already installed by Targetdirs
1020Sstevel@tonic-gate#$(DIRS):
1030Sstevel@tonic-gate#	$(INS.dir)
1040Sstevel@tonic-gate
105*10370SThomas.Whitten@Sun.COM$(RCDIRS):	FRC
10610207SJames.McPherson@Sun.COM	@cd $@; pwd; ROOT=$(ROOT) sh mk.$@.sh
1070Sstevel@tonic-gate
1080Sstevel@tonic-gateFRC:
1090Sstevel@tonic-gate
1100Sstevel@tonic-gateclean lint:
1110Sstevel@tonic-gate
1120Sstevel@tonic-gateinclude	../Makefile.targ
113