Fixed missing newline at end of file.
[unix-history] / etc / Makefile
CommitLineData
25767e9e
RG
1# @(#)Makefile 5.11 (Berkeley) 5/21/91
2
d1479cb8 3NOOBJ= noobj
25767e9e
RG
4
5# disktab may be wrong -- hcx9 is a tahoe, but gets its own.
6# -rw-r--r--
10e9d746
RG
7BINOWN= root
8BINGRP= wheel
9BIN1= aliases csh.cshrc csh.login csh.logout dm.conf \
ff237023 10 ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \
8c9a737b 11 inetd.conf motd myname netstart networks phones \
10e9d746
RG
12 printcap protocols rc rc.local remote security services shells \
13 syslog.conf ttys etc.${MACHINE}/disktab rpc
25767e9e
RG
14
15# -rw-rw-rw-
16BIN2= motd
17
10e9d746
RG
18# -rwxr-xr-x root.wheel, for the new f***ing cron root.wheel
19BIN3= daily weekly monthly
20
25767e9e
RG
21MTREE= BSD.root.dist BSD.usr.dist BSD.var.dist
22NAMEDB= localhost.rev named.boot root.cache
23PCS= pcs750.bin
24WCS1= wcs fppwcs poc poc1 poc2 fppoc
25WCS2= fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual
26
f6b46f06 27# Special top level files for FreeBSD
7efea664 28COPYRIGHT= COPYRIGHT
89f66771 29FREEBSD= CONTRIB.386BSD CONTRIB.FreeBSD RELNOTES.FreeBSD ${COPYRIGHT}
ef2f6ee8
RG
30#
31# Floppy drive name and files for building FreeBSD Floppies
7efea664
RG
32FLOPPY?= fd0
33MOUNT= /mnt
34#
35MDEC= usr/mdec/bootfd usr/mdec/fdboot
36MDEC+= usr/mdec/bootsd usr/mdec/sdboot
37MDEC+= usr/mdec/bootwd usr/mdec/wdboot
38#
39KC_DIRS= dev mnt
40KC_FILES= ${COPYRIGHT}
41KC_FILES+= bin/[ bin/cp bin/echo bin/sh bin/test
42KC_FILES+= sbin/fsck sbin/halt sbin/init sbin/mount sbin/umount
43#
d1479cb8
RG
44FILESYSTEM_DIRS= bin dev etc mnt sbin usr usr/bin usr/mdec usr/sbin
45FILESYSTEM_TREES= dev
46FILESYSTEM_FILES= ${COPYRIGHT}
8930f854 47FILESYSTEM_FILES+= bin/[ bin/expr bin/ls bin/mkdir bin/rm
d1479cb8 48FILESYSTEM_FILES+= bin/sh bin/sync bin/test
730f2c4e 49FILESYSTEM_FILES+= dev/MAKEDEV
d1479cb8 50FILESYSTEM_FILES+= etc/group
8930f854 51FILESYSTEM_FILES+= etc/master.passwd etc/passwd etc/pwd.db
d1479cb8 52FILESYSTEM_FILES+= sbin/disklabel sbin/halt sbin/init
8930f854 53FILESYSTEM_FILES+= sbin/mount sbin/mount_pcfs
d1479cb8 54FILESYSTEM_FILES+= sbin/newfs
d1479cb8 55FILESYSTEM_FILES+= sbin/umount
730f2c4e 56FILESYSTEM_FILES+= sbin/fdisk
d1479cb8
RG
57FILESYSTEM_FILES+= usr/bin/cpio
58FILESYSTEM_FILES+= ${MDEC}
59FILESYSTEM_FILES+= usr/sbin/bad144
7efea664 60
d1479cb8
RG
61CPIO_FILES= ${COPYRIGHT}
62CPIO_FILES+= usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat
8930f854
RG
63CPIO_CPIO= bin/chmod bin/cat bin/cp bin/dd bin/df bin/mv bin/pwd bin/stty
64CPIO_CPIO+= etc/protocols etc/services etc/spwd.db
65CPIO_CPIO+= sbin/ifconfig sbin/fsck sbin/mknod sbin/mount_isofs
66CPIO_CPIO+= sbin/reboot sbin/route sbin/slattach
d1479cb8
RG
67CPIO_CPIO+= tmp
68CPIO_CPIO+= usr/bin/awk usr/bin/chgrp usr/bin/ftp
69CPIO_CPIO+= usr/bin/more usr/bin/tar usr/bin/tip
70CPIO_CPIO+= usr/bin/elvis usr/bin/ex usr/bin/vi usr/bin/view
d1479cb8 71CPIO_CPIO+= usr/sbin/update usr/sbin/chown
53f32d51 72CPIO_CPIO_DIRS= var var/tmp
f6b46f06 73
e9ef5abf 74DOS_FILES= ${COPYRIGHT}
8930f854 75DOS_FILES+= bin/ed
730f2c4e 76DOS_FILES+= usr/bin/cksum usr/bin/mt
8930f854 77DOS_FILES+= sbin/ping sbin/shutdown sbin/st
730f2c4e 78
3b013279 79CRYPT_LIB= lib/libcrypt
ccf7b0b7
RG
80CRYPT_SRCS= bin/ed bin/rcp
81CRYPT_SRCS+= libexec/ftpd libexec/makekey libexec/rexecd libexec/rlogind
82CRYPT_SRCS+= libexec/rshd libexec/telnetd libexec/uucpd
83CRYPT_SRCS+= usr.bin/bdes usr.bin/lock usr.bin/login usr.bin/passwd
84CRYPT_SRCS+= usr.bin/rlogin usr.bin/rsh usr.bin/su usr.bin/telnet
85CRYPT_DIRS= bin usr usr/bin usr/lib usr/libexec
3b013279 86
25767e9e
RG
87all clean cleandir depend etc install lint:
88
3b013279
RG
89crypt:
90 rm -f ${LIBCRYPT};
91 (cd ${.CURDIR}/../${CRYPT_LIB}; \
89f66771 92 ${MAKE} cleandir obj depend all install)
ccf7b0b7 93 for i in ${CRYPT_SRCS}; do \
3b013279 94 cd ${.CURDIR}/../$$i; \
89f66771 95 ${MAKE} cleandir obj depend all; \
3b013279
RG
96 done
97
98non-crypt:
99 rm -f ${LIBCRYPT}
ccf7b0b7 100 for i in ${CRYPT_SRCS}; do \
3b013279 101 cd ${.CURDIR}/../$$i; \
89f66771 102 ${MAKE} cleandir obj depend all; \
3b013279
RG
103 done
104
10e9d746 105distribution: distrib-dirs
25767e9e
RG
106 install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc
107 install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc
10e9d746
RG
108 install -c -o root -g wheel -m 755 ${BIN3} ${DESTDIR}/etc
109 install -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root
40352f76 110 install -c -o root -g wheel -m 600 /dev/null ${DESTDIR}/var/cron/log
25767e9e 111 install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc
d1479cb8 112 pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
25767e9e
RG
113 install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
114 MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
3b013279 115.if defined(CDROMDIST)
10e9d746 116 (cd ${DESTDIR}/dev; sh MAKEDEV all)
3b013279 117.endif
25767e9e
RG
118 (cd root; \
119 install -c -o root -g wheel -m 644 dot.cshrc \
120 ${DESTDIR}/root/.cshrc; \
121 install -c -o root -g wheel -m 644 dot.klogin \
122 ${DESTDIR}/root/.klogin; \
123 install -c -o root -g wheel -m 644 dot.login \
124 ${DESTDIR}/root/.login; \
125 install -c -o root -g wheel -m 644 dot.profile \
126 ${DESTDIR}/root/.profile; \
127 rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
128 ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
129 ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
130 cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \
131 ${DESTDIR}/etc/mtree
132 cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \
133 ${DESTDIR}/etc/namedb
134 install -c -o ${BINOWN} -g operator -m 664 /dev/null \
135 ${DESTDIR}/etc/dumpdates
10e9d746
RG
136 install -c -o nobody -g ${BINGRP} -m 664 /dev/null \
137 ${DESTDIR}/var/db/locate.database
25767e9e 138 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
10e9d746 139 ${DESTDIR}/var/log/lpd-errs
25767e9e
RG
140 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
141 ${DESTDIR}/var/log/maillog
39a69f15
RG
142 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
143 ${DESTDIR}/var/log/lastlog
25767e9e 144 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
10e9d746
RG
145 ${DESTDIR}/var/log/messages
146 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
147 ${DESTDIR}/var/log/wtmp
25767e9e
RG
148 install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
149 ${DESTDIR}/var/run/utmp
150 (cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
10e9d746 151 fstab.* ${DESTDIR}/etc)
3b013279 152.if defined(NOCRYPT)
89f66771
RG
153 ${MAKE} non-crypt
154 (cd ..; NOCRYPT=nocrypt; export NOCRYPT; ${MAKE} install)
3b013279 155.else
89f66771
RG
156 ${MAKE} crypt
157 (cd ..; ${MAKE} install)
3b013279 158.endif
ef2f6ee8 159 (cd ../usr.sbin/sendmail/src; \
89f66771 160 ${MAKE} install; \
ef2f6ee8 161 cd ../cf/cf; \
89f66771 162 ${MAKE} tcpproto.cf; \
40352f76
RM
163 install -o root -g wheel -m 644 tcpproto.cf \
164 ${DESTDIR}/etc/sendmail.cf)
ef2f6ee8
RG
165 (cd ../; \
166 install -c -o root -g wheel -m 444 ${FREEBSD} ${DESTDIR}/)
89f66771 167 (cd ..; ${MAKE} mdec; )
7baf7aa0
RG
168.if ${MACHINE} == "tahoe"
169 (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \
170 ${DESTDIR}/)
171.endif
172.if ${MACHINE} == "vax"
173 (cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
174 ${DESTDIR}/)
3d2827d3 175.endif
25767e9e
RG
176
177hcx9-distribution:
178 (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \
179 ${DESTDIR}/)
180
d1479cb8 181kcopy-kernels: ../sys/i386/conf/GENERICAH ../sys/i386/conf/GENERICBT
2a63994c
RG
182 (cd ../sys/compile; rm -rf GENERICAH GENERICBT)
183 (cd ../sys/i386/conf; config GENERICAH; config GENERICBT)
89f66771 184 (cd ../sys/compile/GENERICAH; ${MAKE} depend; ${MAKE} all; \
2a63994c
RG
185 install -c -o root -g wheel -m 755 386bsd \
186 ${DESTDIR}/386bsd.GENERICAH)
89f66771 187 (cd ../sys/compile/GENERICBT; ${MAKE} depend; ${MAKE} all; \
2a63994c
RG
188 install -c -o root -g wheel -m 755 386bsd \
189 ${DESTDIR}/386bsd.GENERICBT)
190
d1479cb8 191kcopy-floppy:
ef2f6ee8
RG
192 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd
193 newfs -b 4096 -c 80 -f 512 -i 16384 -m 0 -o space r${FLOPPY}a floppy5
194 mount /dev/${FLOPPY}a ${MOUNT}
7baf7aa0
RG
195 chown root.wheel ${MOUNT}/.
196 chmod 755 ${MOUNT}/.
7efea664 197 (cd ${DESTDIR}/; \
2a63994c 198 ls -d ${KC_DIRS} | cpio -pdamuv ${MOUNT})
ef2f6ee8
RG
199 (cd ${MOUNT}/dev; \
200 sh ${DESTDIR}/dev/MAKEDEV std; \
201 rm -rf fd; \
7baf7aa0 202 sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0 sd1)
7efea664 203 (cd ${DESTDIR}/; \
2a63994c 204 ls ${KC_FILES} | cpio -pdamuv ${MOUNT})
ef2f6ee8
RG
205 install -c -o root -g wheel -m 755 etc.i386/kc.profile \
206 ${MOUNT}/.profile
2a63994c 207
ccf7b0b7
RG
208kcopy-ah-floppy:
209 ${MAKE} kcopy-floppy
2a63994c
RG
210 (cd ../sys/compile/GENERICAH; \
211 install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
212 df -ik ${MOUNT}
213 umount /dev/${FLOPPY}a
214 fsck /dev/r${FLOPPY}a
ccf7b0b7 215 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/kcopy-ah-floppy \
d1479cb8 216 bs=15b count=160
ccf7b0b7
RG
217 gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-ah-floppy \
218 >${RELEASEDIR}/floppies/kcopy-ah-floppy.gz
2a63994c 219
ccf7b0b7
RG
220kcopy-bt-floppy:
221 ${MAKE} kcopy-floppy
2a63994c 222 (cd ../sys/compile/GENERICBT; \
ef2f6ee8
RG
223 install -c -o root -g wheel -m 755 386bsd ${MOUNT}/)
224 df -ik ${MOUNT}
225 umount /dev/${FLOPPY}a
226 fsck /dev/r${FLOPPY}a
ccf7b0b7 227 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/kcopy-bt-floppy \
d1479cb8 228 bs=15b count=160
ccf7b0b7
RG
229 gzip --no-name -9 -c ${RELEASEDIR}/floppies/kcopy-bt-floppy \
230 >${RELEASEDIR}/floppies/kcopy-bt-floppy.gz
ef2f6ee8 231
d1479cb8 232filesystem-floppy:
7efea664
RG
233 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd
234 newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space r${FLOPPY}a floppy5
235 mount /dev/${FLOPPY}a ${MOUNT}
7baf7aa0
RG
236 chown root.wheel ${MOUNT}/.
237 chmod 755 ${MOUNT}/.
7efea664 238 (cd ${DESTDIR}/; \
d1479cb8 239 ls -d ${FILESYSTEM_DIRS} | cpio -pdamuv ${MOUNT})
7efea664
RG
240 (cd ${MOUNT}/dev; \
241 sh ${DESTDIR}/dev/MAKEDEV std; \
242 rm -rf fd; \
e9ef5abf
RG
243 sh ${DESTDIR}/dev/MAKEDEV fd0 fd1 wd0 sd0 sd1; \
244 rm -f rfd1[b-z] fd1[b-z])
7efea664 245 (cd ${DESTDIR}/; \
d1479cb8 246 ls ${FILESYSTEM_FILES} | cpio -pdamuv ${MOUNT})
7efea664
RG
247 install -c -o root -g wheel -m 755 etc.i386/inst1.profile \
248 ${MOUNT}/.profile
249 install -c -o root -g wheel -m 755 etc.i386/inst1.install \
250 ${MOUNT}/install
251 (cd ${MOUNT}/; \
d1479cb8
RG
252 ls ${FILESYSTEM_FILES} >/tmp/filelist; \
253 ls -d ${FILESYSTEM_DIRS} >>/tmp/filelist; \
254 find ${FILESYSTEM_TREES} >>/tmp/filelist; \
7baf7aa0
RG
255 sort -u /tmp/filelist >filelist; \
256 rm /tmp/filelist)
7efea664
RG
257 df -ik ${MOUNT}
258 umount /dev/${FLOPPY}a
259 fsck /dev/r${FLOPPY}a
ccf7b0b7 260 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/filesystem-floppy \
d1479cb8 261 bs=15b count=160
ccf7b0b7
RG
262 gzip --no-name -9 -c ${RELEASEDIR}/floppies/filesystem-floppy \
263 >${RELEASEDIR}/floppies/filesystem-floppy.gz
7efea664 264
d1479cb8 265cpio-floppy:
7efea664
RG
266 disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd
267 newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space r${FLOPPY}a floppy5
268 mount /dev/${FLOPPY}a ${MOUNT}
7baf7aa0
RG
269 chown root.wheel ${MOUNT}/.
270 chmod 755 ${MOUNT}/.
7efea664 271 (cd ${DESTDIR}/; \
d1479cb8 272 ls ${CPIO_FILES} | cpio -pdamuv ${MOUNT})
7efea664 273 (cd ${DESTDIR}/; \
53f32d51
RG
274 (find ${CPIO_CPIO}; ls -d ${CPIO_CPIO_DIRS}) | \
275 cpio -oav | gzip -9 >${MOUNT}/inst2.cpio.gz)
7efea664
RG
276 install -c -o root -g wheel -m 755 etc.i386/inst2.profile \
277 ${MOUNT}/.profile
278 install -c -o root -g wheel -m 755 etc.i386/inst2.install \
279 ${MOUNT}/install
280 df -ik ${MOUNT}
281 umount /dev/${FLOPPY}a
282 fsck /dev/r${FLOPPY}a
ccf7b0b7 283 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/cpio-floppy \
d1479cb8 284 bs=15b count=160
ccf7b0b7
RG
285 gzip --no-name -9 -c ${RELEASEDIR}/floppies/cpio-floppy \
286 >${RELEASEDIR}/floppies/cpio-floppy.gz
287
730f2c4e
AM
288dos-floppy:
289 mount -t pcfs /dev/${FLOPPY}a ${MOUNT}
fb0ea8fd
RG
290 (cd ${.CURDIR}/../; \
291 cp sys/i386/floppy/* ${MOUNT}; \
730f2c4e
AM
292 cp ${DOS_FILES} ${MOUNT})
293 df -ik ${MOUNT}
294 umount /dev/${FLOPPY}a
295 dd if=/dev/r${FLOPPY}a of=${RELEASEDIR}/floppies/dos-floppy \
296 bs=15b count=160
297 gzip --no-name -9 -c ${RELEASEDIR}/floppies/dos-floppy \
298 >${RELEASEDIR}/floppies/dos-floppy.gz
299
ccf7b0b7
RG
300bin-tarball:
301 (cd ${DESTDIR}; \
302 tar cf - . | gzip --no-name -9 -c | \
303 split -b 240640 - \
f8b59f9a 304 ${RELEASEDIR}/tarballs/bin_tgz.)
ccf7b0b7 305
04a61497
RG
306src-tarball:
307 (cd ${DESTDIR}; \
308 tar --exclude usr/src/${CRYPT_LIB} -cf - usr/src | gzip --no-name -9 -c | \
309 split -b 240640 - \
f8b59f9a 310 ${RELEASEDIR}/tarballs/src_tgz.)
04a61497
RG
311
312ssrc-tarball:
313 (cd ${DESTDIR}; \
314 tar -cf - usr/src/${CRYPT_LIB} | gzip --no-name -9 -c | \
315 split -b 240640 - \
f8b59f9a 316 ${RELEASEDIR}/tarballs/ssrc_tgz.)
04a61497 317
ccf7b0b7
RG
318des-tarball:
319 rm -rf ${RELEASEDIR}/tmpdes
320 mkdir ${RELEASEDIR}/tmpdes
321 for i in ${CRYPT_DIRS}; do \
322 cd ${RELEASEDIR}/tmpdes; \
323 mkdir $$i; \
324 chown ${BINOWN}.${GRPOWN} $$i; \
325 chmod 755 $$i; \
326 done
327 # This is ugly, it force installs a /usr/lib/libcrypt.a so
328 # that the other makes will be built with des.
329 #
330 (cd ${.CURDIR}/../${CRYPT_LIB}; \
331 unset NOCRYPT; \
332 DESTDIR=; export DESTDIR; \
333 ${MAKE} cleandir obj depend all install; \
334 NOMAN=noman; export NOMAN; \
335 DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
336 ${MAKE} cleandir obj depend all install)
337 for i in ${CRYPT_SRCS}; do \
338 unset NOCRYPT; \
339 DESTDIR=${RELEASEDIR}/tmpdes; export DESTDIR; \
340 NOMAN=noman; export NOMAN; \
341 cd ${.CURDIR}/../$$i; \
342 ${MAKE} cleandir obj depend all install; \
343 done
344 (cd ${RELEASEDIR}/tmpdes; \
345 tar cf - . | gzip --no-name -9 -c | \
346 split -b 240640 - \
f8b59f9a 347 ${RELEASEDIR}/tarballs/des_tgz.)
ccf7b0b7 348 rm -rf ${RELEASEDIR}/tmpdes
7efea664 349
10e9d746 350distrib-dirs:
40352f76 351 mtree -u -f mtree/BSD.root.dist -p ${DESTDIR}/
10e9d746
RG
352 mtree -u -f mtree/BSD.var.dist -p ${DESTDIR}/var
353 mtree -u -f mtree/BSD.usr.dist -p ${DESTDIR}/usr
ccf7b0b7
RG
354.if defined(CDROMDIST)
355 mtree -u -f mtree/BSD.local.dist -p ${DESTDIR}/usr/local
356.endif
72880036 357 cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
10e9d746 358
ccf7b0b7
RG
359floppies: kcopy-ah-floppy kcopy-bt-floppy filesystem-floppy \
360 cpio-floppy
361
04a61497
RG
362release: release-dirs distribution kcopy-kernels floppies \
363 bin-tarball des-tarball
ccf7b0b7
RG
364
365release-dirs:
366 rm -rf ${RELEASEDIR}/filesystem
367 mkdir ${RELEASEDIR}/filesystem
368 chown root.wheel ${RELEASEDIR}/filesystem
369 chmod 755 ${RELEASEDIR}/filesystem
370 rm -rf ${RELEASEDIR}/tarballs
371 mkdir ${RELEASEDIR}/tarballs
372 chown root.wheel ${RELEASEDIR}/tarballs
373 chmod 755 ${RELEASEDIR}/tarballs
374 rm -rf ${RELEASEDIR}/floppies
375 mkdir ${RELEASEDIR}/floppies
376 chown root.wheel ${RELEASEDIR}/floppies
377 chmod 755 ${RELEASEDIR}/floppies
378
25767e9e 379.include <bsd.prog.mk>