Commit | Line | Data |
---|---|---|
25767e9e RG |
1 | # @(#)Makefile 5.11 (Berkeley) 5/21/91 |
2 | ||
10e9d746 RG |
3 | LOCALTIME= US/Pacific |
4 | TZDIR=/usr/share/zoneinfo | |
5 | ||
25767e9e RG |
6 | NOOBJ= oobj |
7 | ||
8 | # disktab may be wrong -- hcx9 is a tahoe, but gets its own. | |
9 | # -rw-r--r-- | |
10e9d746 RG |
10 | BINOWN= root |
11 | BINGRP= wheel | |
12 | BIN1= aliases csh.cshrc csh.login csh.logout dm.conf \ | |
ff237023 | 13 | ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \ |
2b2c6a4b | 14 | inetd.conf motd myname netstart phones \ |
10e9d746 RG |
15 | printcap protocols rc rc.local remote security services shells \ |
16 | syslog.conf ttys etc.${MACHINE}/disktab rpc | |
25767e9e RG |
17 | |
18 | # -rw-rw-rw- | |
19 | BIN2= motd | |
20 | ||
10e9d746 RG |
21 | # -rwxr-xr-x root.wheel, for the new f***ing cron root.wheel |
22 | BIN3= daily weekly monthly | |
23 | ||
25767e9e RG |
24 | MTREE= BSD.root.dist BSD.usr.dist BSD.var.dist |
25 | NAMEDB= localhost.rev named.boot root.cache | |
26 | PCS= pcs750.bin | |
27 | WCS1= wcs fppwcs poc poc1 poc2 fppoc | |
28 | WCS2= fpevent fppwcs fppwcs_dual hdcwcs load_diags start_fpp wcs wcs_dual | |
29 | ||
f6b46f06 | 30 | # Special top level files for FreeBSD |
7efea664 RG |
31 | COPYRIGHT= COPYRIGHT |
32 | FREEBSD= CONTRIB.386BSD CONTRIB.FreeBSD ${COPYRIGHT} | |
ef2f6ee8 RG |
33 | # |
34 | # Floppy drive name and files for building FreeBSD Floppies | |
7efea664 RG |
35 | FLOPPY?= fd0 |
36 | MOUNT= /mnt | |
37 | # | |
38 | MDEC= usr/mdec/bootfd usr/mdec/fdboot | |
39 | MDEC+= usr/mdec/bootsd usr/mdec/sdboot | |
40 | MDEC+= usr/mdec/bootwd usr/mdec/wdboot | |
41 | # | |
42 | KC_DIRS= dev mnt | |
43 | KC_FILES= ${COPYRIGHT} | |
44 | KC_FILES+= bin/[ bin/cp bin/echo bin/sh bin/test | |
45 | KC_FILES+= sbin/fsck sbin/halt sbin/init sbin/mount sbin/umount | |
46 | # | |
47 | INST1_DIRS= dev mnt | |
48 | INST1_FILES= ${COPYRIGHT} | |
49 | INST1_FILES+= bin/[ bin/cat bin/df bin/expr bin/ls bin/mkdir | |
50 | INST1_FILES+= bin/sh bin/sync bin/test | |
51 | INST1_FILES+= dev/MAKEDEV dev/MAKEDEV.local | |
52 | INST1_FILES+= etc/disktab etc/group etc/master.passwd etc/passwd | |
53 | INST1_FILES+= etc/pwd.db etc/spwd.db | |
54 | INST1_FILES+= sbin/disklabel sbin/halt sbin/init sbin/mount sbin/umount | |
55 | INST1_FILES+= sbin/newfs sbin/reboot | |
56 | INST1_FILES+= usr/bin/cpio | |
57 | INST1_FILES+= ${MDEC} | |
58 | INST1_FILES+= usr/sbin/bad144 | |
59 | ||
60 | INST2_FILES= ${COPYRIGHT} | |
61 | INST2_FILES+= usr/bin/gunzip usr/bin/gzcat usr/bin/gzip usr/bin/zcat | |
62 | INST2_CPIO= bin/chmod bin/cp bin/dd bin/mv bin/pwd bin/rm bin/stty | |
63 | INST2_CPIO+= etc/protocols etc/services | |
64 | INST2_CPIO+= sbin/ifconfig sbin/fsck sbin/mknod | |
65 | #INST2_CPIO+= sbin/mount_pcfs sbin/mount_isofs | |
66 | INST2_CPIO+= sbin/route sbin/shutdown sbin/slattach | |
67 | INST2_CPIO+= tmp | |
68 | INST2_CPIO+= usr/bin/awk usr/bin/chgrp usr/bin/ftp | |
69 | INST2_CPIO+= usr/bin/more usr/bin/tar usr/bin/tip usr/bin/zcat | |
70 | INST2_CPIO+= usr/bin/elvis usr/bin/ex usr/bin/vi usr/bin/view | |
71 | #INST2_CPIO+= usr/local/bin/mread usr/local/bin/rz | |
72 | INST2_CPIO+= usr/sbin/update usr/sbin/chown | |
73 | INST2_CPIO+= var | |
f6b46f06 | 74 | |
25767e9e RG |
75 | all clean cleandir depend etc install lint: |
76 | ||
10e9d746 | 77 | distribution: distrib-dirs |
25767e9e RG |
78 | install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc |
79 | install -c -o ${BINOWN} -g ${BINGRP} -m 666 ${BIN2} ${DESTDIR}/etc | |
10e9d746 RG |
80 | install -c -o root -g wheel -m 755 ${BIN3} ${DESTDIR}/etc |
81 | install -c -o root -g wheel -m 600 crontab ${DESTDIR}/var/cron/tabs/root | |
40352f76 | 82 | install -c -o root -g wheel -m 600 /dev/null ${DESTDIR}/var/cron/log |
25767e9e | 83 | install -c -o root -g wheel -m 600 master.passwd ${DESTDIR}/etc |
7fd03f81 | 84 | # |
40352f76 | 85 | # This is broken, it always does /etc. It IGNORES the ${DESTDIR} for |
7fd03f81 RG |
86 | # where to write the spwd.db pwd.db files. |
87 | #(cd ${DESTDIR}/etc; pwd_mkdb -p master.passwd) | |
88 | # | |
89 | # Work around for above problem. | |
90 | install -c -o root -g wheel -m 644 pwd.db ${DESTDIR}/etc | |
91 | install -c -o root -g wheel -m 600 spwd.db ${DESTDIR}/etc | |
7efea664 | 92 | install -c -o root -g wheel -m 644 passwd ${DESTDIR}/etc |
25767e9e RG |
93 | install -c -o ${BINOWN} -g ${BINGRP} -m 555 \ |
94 | MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev | |
10e9d746 | 95 | (cd ${DESTDIR}/dev; sh MAKEDEV all) |
25767e9e RG |
96 | (cd root; \ |
97 | install -c -o root -g wheel -m 644 dot.cshrc \ | |
98 | ${DESTDIR}/root/.cshrc; \ | |
99 | install -c -o root -g wheel -m 644 dot.klogin \ | |
100 | ${DESTDIR}/root/.klogin; \ | |
101 | install -c -o root -g wheel -m 644 dot.login \ | |
102 | ${DESTDIR}/root/.login; \ | |
103 | install -c -o root -g wheel -m 644 dot.profile \ | |
104 | ${DESTDIR}/root/.profile; \ | |
105 | rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ | |
106 | ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ | |
107 | ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) | |
108 | cd mtree; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${MTREE} \ | |
109 | ${DESTDIR}/etc/mtree | |
110 | cd namedb; install -c -o ${BINOWN} -g ${BINGRP} -m 644 ${NAMEDB} \ | |
111 | ${DESTDIR}/etc/namedb | |
10e9d746 RG |
112 | /bin/rm -f ${DESTDIR}/etc/localtime |
113 | ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime | |
25767e9e RG |
114 | install -c -o ${BINOWN} -g operator -m 664 /dev/null \ |
115 | ${DESTDIR}/etc/dumpdates | |
10e9d746 RG |
116 | install -c -o nobody -g ${BINGRP} -m 664 /dev/null \ |
117 | ${DESTDIR}/var/db/locate.database | |
25767e9e | 118 | install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ |
10e9d746 | 119 | ${DESTDIR}/var/log/lpd-errs |
25767e9e RG |
120 | install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ |
121 | ${DESTDIR}/var/log/maillog | |
39a69f15 RG |
122 | install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ |
123 | ${DESTDIR}/var/log/lastlog | |
25767e9e | 124 | install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ |
10e9d746 RG |
125 | ${DESTDIR}/var/log/messages |
126 | install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ | |
127 | ${DESTDIR}/var/log/wtmp | |
25767e9e RG |
128 | install -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ |
129 | ${DESTDIR}/var/run/utmp | |
130 | (cd etc.${MACHINE}; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \ | |
10e9d746 | 131 | fstab.* ${DESTDIR}/etc) |
25767e9e RG |
132 | .if ${MACHINE} == "tahoe" |
133 | (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS1} \ | |
134 | ${DESTDIR}/) | |
135 | .endif | |
136 | .if ${MACHINE} == "vax" | |
137 | (cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \ | |
138 | ${DESTDIR}/) | |
139 | .endif | |
3d2827d3 | 140 | .if ${MACHINE} == "i386" |
ef2f6ee8 RG |
141 | (cd ../sys/i386/boot; \ |
142 | make depend all install cleandir) | |
7efea664 RG |
143 | (cd /; \ |
144 | ls ${MDEC} | cpio -pdalmuv ${DESTDIR}/) | |
ef2f6ee8 RG |
145 | (cd ../usr.sbin/sendmail/src; \ |
146 | make install; \ | |
147 | cd ../cf/cf; \ | |
148 | make tcpproto.cf; \ | |
40352f76 RM |
149 | install -o root -g wheel -m 644 tcpproto.cf \ |
150 | ${DESTDIR}/etc/sendmail.cf) | |
ef2f6ee8 RG |
151 | (cd ../; \ |
152 | install -c -o root -g wheel -m 444 ${FREEBSD} ${DESTDIR}/) | |
40352f76 | 153 | (cd ..; make install) |
1959cc82 RG |
154 | # the above make install clobers the /etc/localtime link |
155 | /bin/rm -f ${DESTDIR}/etc/localtime | |
156 | ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime | |
157 | /bin/rm -f ${DESTDIR}/etc/termcap | |
158 | ln -s /usr/share/misc/termcap ${DESTDIR}/etc/termcap | |
ef2f6ee8 RG |
159 | (cd ../sys/compile; rm -rf GENERICISA) |
160 | (cd ../sys/i386/conf; config GENERICISA) | |
161 | (cd ../sys/compile/GENERICISA; make depend; make all; \ | |
162 | install -c -o root -g wheel -m 755 386bsd \ | |
163 | ${DESTDIR}/386bsd.GENERICISA) | |
ba7d3207 | 164 | (cd ../include; make copies) |
3d2827d3 | 165 | .endif |
25767e9e RG |
166 | |
167 | hcx9-distribution: | |
168 | (cd etc.tahoe; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${WCS2} \ | |
169 | ${DESTDIR}/) | |
170 | ||
7efea664 | 171 | kc-ah-floppy: |
ef2f6ee8 RG |
172 | disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd |
173 | newfs -b 4096 -c 80 -f 512 -i 16384 -m 0 -o space r${FLOPPY}a floppy5 | |
174 | mount /dev/${FLOPPY}a ${MOUNT} | |
7efea664 RG |
175 | (cd ${DESTDIR}/; \ |
176 | ls -d ${KC_DIRS} | cpio -pdalmuv ${MOUNT}) | |
ef2f6ee8 RG |
177 | (cd ${MOUNT}/dev; \ |
178 | sh ${DESTDIR}/dev/MAKEDEV std; \ | |
179 | rm -rf fd; \ | |
180 | sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0) | |
7efea664 RG |
181 | (cd ${DESTDIR}/; \ |
182 | ls ${KC_FILES} | cpio -pdalmuv ${MOUNT}) | |
ef2f6ee8 RG |
183 | install -c -o root -g wheel -m 755 etc.i386/kc.profile \ |
184 | ${MOUNT}/.profile | |
185 | (cd ../sys/compile/GENERICISA; \ | |
186 | install -c -o root -g wheel -m 755 386bsd ${MOUNT}/) | |
187 | df -ik ${MOUNT} | |
188 | umount /dev/${FLOPPY}a | |
189 | fsck /dev/r${FLOPPY}a | |
190 | ||
7efea664 RG |
191 | inst1-floppy: |
192 | disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd | |
193 | newfs -b 4096 -c 80 -f 512 -i 10240 -m 0 -o space r${FLOPPY}a floppy5 | |
194 | mount /dev/${FLOPPY}a ${MOUNT} | |
195 | (cd ${DESTDIR}/; \ | |
196 | ls -d ${INST1_DIRS} | cpio -pdalmuv ${MOUNT}) | |
197 | (cd ${MOUNT}/dev; \ | |
198 | sh ${DESTDIR}/dev/MAKEDEV std; \ | |
199 | rm -rf fd; \ | |
200 | sh ${DESTDIR}/dev/MAKEDEV fd0 wd0 sd0) | |
201 | (cd ${DESTDIR}/; \ | |
202 | ls ${INST1_FILES} | cpio -pdalmuv ${MOUNT}) | |
203 | install -c -o root -g wheel -m 755 etc.i386/inst1.profile \ | |
204 | ${MOUNT}/.profile | |
205 | install -c -o root -g wheel -m 755 etc.i386/inst1.install \ | |
206 | ${MOUNT}/install | |
207 | (cd ${MOUNT}/; \ | |
208 | ls ${INST1_FILES} >/tmp/filelist; \ | |
209 | find ${INST1_DIRS} | sort >>/tmp/filelist; \ | |
210 | sort -u /tmp/filelist >filelist) | |
211 | df -ik ${MOUNT} | |
212 | umount /dev/${FLOPPY}a | |
213 | fsck /dev/r${FLOPPY}a | |
214 | ||
215 | inst2-floppy: | |
216 | disklabel -w -r ${FLOPPY} floppy5 /usr/mdec/fdboot /usr/mdec/bootfd | |
217 | newfs -b 4096 -c 80 -f 512 -i 65536 -m 0 -o space r${FLOPPY}a floppy5 | |
218 | mount /dev/${FLOPPY}a ${MOUNT} | |
219 | (cd ${DESTDIR}/; \ | |
220 | ls ${INST2_FILES} | cpio -pdalmuv ${MOUNT}) | |
221 | (cd ${DESTDIR}/; \ | |
222 | find ${INST2_CPIO} | cpio -odalmuv | gzip -9 >${MOUNT}/inst2.cpio.gz) | |
223 | install -c -o root -g wheel -m 755 etc.i386/inst2.profile \ | |
224 | ${MOUNT}/.profile | |
225 | install -c -o root -g wheel -m 755 etc.i386/inst2.install \ | |
226 | ${MOUNT}/install | |
227 | df -ik ${MOUNT} | |
228 | umount /dev/${FLOPPY}a | |
229 | fsck /dev/r${FLOPPY}a | |
230 | ||
10e9d746 | 231 | distrib-dirs: |
40352f76 | 232 | mtree -u -f mtree/BSD.root.dist -p ${DESTDIR}/ |
10e9d746 RG |
233 | mtree -u -f mtree/BSD.var.dist -p ${DESTDIR}/var |
234 | mtree -u -f mtree/BSD.usr.dist -p ${DESTDIR}/usr | |
235 | (cd ${DESTDIR}; rm -f ${DESTDIR}/sys; \ | |
5db24604 | 236 | ln -s usr/src/sys sys ) |
10e9d746 | 237 | |
25767e9e | 238 | .include <bsd.prog.mk> |