Makefile revision 1.15
1#	$OpenBSD: Makefile,v 1.15 1996/06/16 12:57:30 deraadt Exp $
2
3TZDIR=		/usr/share/zoneinfo
4LOCALTIME=	US/Pacific
5
6NOOBJ=	oobj
7
8.if exists(etc.${MACHINE}/Makefile.inc)
9.include "etc.${MACHINE}/Makefile.inc"
10.endif
11
12# disktab may be wrong -- hcx9 is a tahoe, but gets its own.
13# -rw-r--r--
14BINOWN= root
15BINGRP= wheel
16BIN1=	aliases bootptab changelist csh.cshrc csh.login csh.logout daily \
17	dm.conf ftpusers ftpchroot gettytab group hosts hosts.equiv hosts.lpd \
18	ifaliases inetd.conf man.conf monthly motd myname netstart \
19	newsyslog.conf phones printcap protocols rc rc.local remote rpc \
20	security services shells syslog.conf weekly etc.${MACHINE}/ttys \
21	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	pwd_mkdb -p -d ${DESTDIR}/etc /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 kerberosIV; \
60		install -c -o root -g wheel -m 644 README \
61		    ${DESTDIR}/etc/kerberosIV; \
62		install -c -o root -g wheel -m 644 krb.conf \
63		    ${DESTDIR}/etc/kerberosIV; \
64		install -c -o root -g wheel -m 444 krb.realms \
65		    ${DESTDIR}/etc/kerberosIV)
66	(cd mtree; \
67		install -c -o root -g wheel -m 600 special \
68		    ${DESTDIR}/etc/mtree; \
69		install -c -o root -g wheel -m 444 4.4BSD.dist \
70		    ${DESTDIR}/etc/mtree)
71	(cd ppp; \
72		install -c -o root -g wheel -m 644 chap-secrets \
73		    ${DESTDIR}/etc/ppp; \
74		install -c -o root -g wheel -m 644 options \
75		    ${DESTDIR}/etc/ppp; \
76		install -c -o root -g wheel -m 644 options.leaf \
77		    ${DESTDIR}/etc/ppp; \
78		install -c -o root -g wheel -m 644 pap-secrets \
79		    ${DESTDIR}/etc/ppp)
80	cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
81	    ${DESTDIR}/etc/namedb
82	/bin/rm -f ${DESTDIR}/etc/localtime
83	ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
84	/bin/rm -f ${DESTDIR}/etc/rmt
85	ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
86	install -c -o root -g wheel -m 644 minfree \
87		${DESTDIR}/var/crash
88	install -c -o ${BINOWN} -g operator -m 664 /dev/null \
89		${DESTDIR}/etc/dumpdates
90	install -c -o ${BINOWN} -g operator -m 644 /dev/null \
91		${DESTDIR}/etc/skeykeys
92	install -c -o root -g wheel -m 600 /dev/null \
93		${DESTDIR}/var/cron/log
94	install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
95		${DESTDIR}/var/db/locate.database
96	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
97		${DESTDIR}/var/log/lastlog
98	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
99		${DESTDIR}/var/log/lpd-errs
100	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
101		${DESTDIR}/var/log/maillog
102	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
103		${DESTDIR}/var/log/messages
104	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
105		${DESTDIR}/var/log/wtmp
106	install -c -o daemon -g staff -m 664 /dev/null \
107		${DESTDIR}/var/msgs/bounds
108	install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
109		${DESTDIR}/var/run/utmp
110	(cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
111	    fstab.* ${DESTDIR}/etc)
112	(cd ${DESTDIR}/dev; ./MAKEDEV all)
113.if ${MACHINE} == "tahoe"
114	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \
115	    ${DESTDIR}/)
116.endif
117.if ${MACHINE} == "vax"
118	(cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
119	    ${DESTDIR}/)
120.endif
121	(cd ../usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
122
123hcx9-distribution:
124	(cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \
125	    ${DESTDIR}/)
126
127distrib-dirs:
128	install -d -o root -g wheel -m 755 ${DESTDIR}
129	-mtree -def mtree/4.4BSD.dist -p ${DESTDIR}/ -u
130	cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
131
132snapshot: distribution snap_pre snap_tar snap_md
133	cd ${DESTDIR}/snapshot && cksum * > CKSUMS
134
135snap_pre:
136	/bin/rm -rf ${DESTDIR}/snapshot
137	install -d -o root -g wheel -m 755 ${DESTDIR}/snapshot
138
139snap_tar:
140	cd ${DESTDIR} && tar cf - bin | gzip -9 > snapshot/bin.tar.gz
141	cd ${DESTDIR} && tar cf - dev | gzip -9 > snapshot/dev.tar.gz
142	cd ${DESTDIR} && tar cf - .profile .cshrc etc mnt root sys tmp | \
143	    gzip -9 > snapshot/etc.tar.gz
144	cd ${DESTDIR} && tar cf - sbin | gzip -9 > snapshot/sbin.tar.gz
145	cd ${DESTDIR} && tar cf - usr/bin | gzip -9 > snapshot/usr.bin.tar.gz
146	cd ${DESTDIR} && tar cf - usr/games | gzip -9 > \
147	    snapshot/usr.games.tar.gz
148	cd ${DESTDIR} && tar cf - usr/include | gzip -9 > \
149	    snapshot/usr.include.tar.gz
150	cd ${DESTDIR} && tar cf - usr/lib | gzip -9 > snapshot/usr.lib.tar.gz
151	cd ${DESTDIR} && tar cf - usr/libexec | gzip -9 > \
152	    snapshot/usr.libexec.tar.gz
153	cd ${DESTDIR} && tar cf - usr/mdec usr/libdata usr/local usr/src \
154	    usr/obj | gzip -9 > snapshot/usr.misc.tar.gz
155	cd ${DESTDIR} && tar cf - usr/sbin | gzip -9 > snapshot/usr.sbin.tar.gz
156	cd ${DESTDIR} && tar cf - usr/share | gzip -9 > \
157	    snapshot/usr.share.tar.gz
158	cd ${DESTDIR} && tar cf - var | gzip -9 > snapshot/var.tar.gz
159
160snap_md:
161# nothing here -- look in the machine-dependent Makefile.inc
162
163.endif	# DESTDIR check
164
165.include <bsd.prog.mk>
166