xref: /netbsd-src/etc/Makefile (revision 705ee976cfe4e85b18732519865b1f7b6cbb2322)
1#	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
2#	$Id: Makefile,v 1.48 1994/06/28 21:48:46 deraadt Exp $
3
4TZDIR=		/usr/share/zoneinfo
5LOCALTIME=	US/Pacific
6
7NOOBJ=	oobj
8
9.if exists(etc.${MACHINE}/Makefile.inc)
10.include "etc.${MACHINE}/Makefile.inc"
11.endif
12
13# disktab may be wrong -- hcx9 is a tahoe, but gets its own.
14# -rw-r--r--
15BINOWN= root
16BINGRP= wheel
17BIN1=	aliases bootptab changelist csh.cshrc csh.login csh.logout daily \
18	dm.conf ftpusers ftpchroot gettytab group hosts hosts.equiv hosts.lpd \
19	inetd.conf man.conf monthly motd myname netstart newsyslog.conf \
20	phones printcap protocols rc rc.local remote rpc security services \
21	shells syslog.conf weekly etc.${MACHINE}/ttys etc.${MACHINE}/disktab
22
23# -rw-rw-r--
24BIN2=	motd
25
26NAMEDB=	localhost.rev named.boot root.cache
27PCS=	pcs750.bin
28WCS1=	wcs fppwcs poc poc1 poc2 fppoc
29WCS2=	fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual
30
31all clean cleandir depend etc install lint:
32
33.ifndef DESTDIR
34distribution distrib-dirs snapshot:
35	@echo setenv DESTDIR before doing that!
36	@false
37.else
38distribution: distrib-dirs
39	(cd ..; ${MAKE} install)
40	install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
41	install -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} ${DESTDIR}/etc
42	install -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root
43	install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
44	chroot ${DESTDIR}/ pwd_mkdb -p /etc/master.passwd
45	install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
46	     MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
47	(cd root; \
48		install -c -o root -g wheel -m 644 dot.cshrc \
49		    ${DESTDIR}/root/.cshrc; \
50		install -c -o root -g wheel -m 644 dot.klogin \
51		    ${DESTDIR}/root/.klogin; \
52		install -c -o root -g wheel -m 644 dot.login \
53		    ${DESTDIR}/root/.login; \
54		install -c -o root -g wheel -m 644 dot.profile \
55		    ${DESTDIR}/root/.profile; \
56		rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
57		ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
58		ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
59	(cd mtree; \
60		install -c -o root -g wheel -m 600 special \
61		    ${DESTDIR}/etc/mtree; \
62		install -c -o root -g wheel -m 444 4.4BSD.dist \
63		    ${DESTDIR}/etc/mtree)
64	cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
65	    ${DESTDIR}/etc/namedb
66	/bin/rm -f ${DESTDIR}/etc/localtime
67	ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
68	/bin/rm -f ${DESTDIR}/etc/rmt
69	ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
70	install -c -o ${BINOWN} -g operator -m 664 /dev/null \
71		${DESTDIR}/etc/dumpdates
72	install -c -o ${BINOWN} -g operator -m 644 /dev/null \
73		${DESTDIR}/etc/skeykeys
74	install -c -o root -g wheel -m 600 /dev/null \
75		${DESTDIR}/var/cron/log
76	install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
77		${DESTDIR}/var/db/locate.database
78	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
79		${DESTDIR}/var/log/lastlog
80	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
81		${DESTDIR}/var/log/lpd-errs
82	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
83		${DESTDIR}/var/log/maillog
84	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
85		${DESTDIR}/var/log/messages
86	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
87		${DESTDIR}/var/log/wtmp
88	install -c -o daemon -g staff -m 664 /dev/null \
89		${DESTDIR}/var/msgs/bounds
90	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
91		${DESTDIR}/var/run/utmp
92	(cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
93	    fstab.* ${DESTDIR}/etc)
94.if ${MACHINE} == "tahoe"
95	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \
96	    ${DESTDIR}/)
97.endif
98.if ${MACHINE} == "vax"
99	(cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
100	    ${DESTDIR}/)
101.endif
102	(cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
103
104hcx9-distribution:
105	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \
106	    ${DESTDIR}/)
107
108distrib-dirs:
109	install -d -o root -g wheel -m 755 ${DESTDIR}
110	-mtree -def mtree/4.4BSD.dist -p ${DESTDIR}/ -u
111	cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
112
113snapshot: distribution snap_pre snap_tar snap_md
114	cd ${DESTDIR}/snapshot && cksum * > CKSUMS
115
116snap_pre:
117	/bin/rm -rf ${DESTDIR}/snapshot
118	install -d -o root -g wheel -m 755 ${DESTDIR}/snapshot
119
120snap_tar:
121	cd ${DESTDIR} && tar cf - bin | gzip -9 > snapshot/bin.tar.gz
122	cd ${DESTDIR} && tar cf - dev | gzip -9 > snapshot/dev.tar.gz
123	cd ${DESTDIR} && tar cf - .profile .cshrc etc mnt root sys tmp | \
124	    gzip -9 > snapshot/etc.tar.gz
125	cd ${DESTDIR} && tar cf - sbin | gzip -9 > snapshot/sbin.tar.gz
126	cd ${DESTDIR} && tar cf - usr/bin | gzip -9 > snapshot/usr.bin.tar.gz
127	cd ${DESTDIR} && tar cf - usr/games | gzip -9 > \
128	    snapshot/usr.games.tar.gz
129	cd ${DESTDIR} && tar cf - usr/include | gzip -9 > \
130	    snapshot/usr.include.tar.gz
131	cd ${DESTDIR} && tar cf - usr/lib | gzip -9 > snapshot/usr.lib.tar.gz
132	cd ${DESTDIR} && tar cf - usr/libexec | gzip -9 > \
133	    snapshot/usr.libexec.tar.gz
134	cd ${DESTDIR} && tar cf - usr/mdec usr/local usr/src usr/obj | \
135	    gzip -9 > snapshot/usr.misc.tar.gz
136	cd ${DESTDIR} && tar cf - usr/sbin | gzip -9 > snapshot/usr.sbin.tar.gz
137	cd ${DESTDIR} && tar cf - usr/share | gzip -9 > \
138	    snapshot/usr.share.tar.gz
139	cd ${DESTDIR} && tar cf - var | gzip -9 > snapshot/var.tar.gz
140
141snap_md:
142# nothing here -- look in the machine-dependent Makefile.inc
143
144.endif	# DESTDIR check
145
146.include <bsd.prog.mk>
147