Makefile revision 1.154.2.8 1 1.154.2.8 tv # $NetBSD: Makefile,v 1.154.2.8 2000/10/21 18:12:35 tv Exp $
2 1.154.2.2 lukem # from: @(#)Makefile 8.7 (Berkeley) 5/25/95
3 1.154.2.2 lukem
4 1.154.2.2 lukem # Environment variables without default values:
5 1.154.2.2 lukem # DESTDIR must be set before anything in this file will work.
6 1.154.2.2 lukem # RELEASEDIR is where the tarred up stuff for a snapshot or
7 1.154.2.2 lukem # release will be placed.
8 1.154.2.2 lukem #
9 1.154.2.2 lukem # Environment variables with default values:
10 1.154.2.2 lukem # LOCALTIME will set the default local time for the system you
11 1.154.2.2 lukem # build; it determines what /etc/localtime is symlink'd to.
12 1.154.2.2 lukem # KERNSRCDIR points to kernel source; it is set by default to ../sys,
13 1.154.2.2 lukem # but can be overridden.
14 1.154.2.2 lukem # KERNOBJDIR is the kernel build directory, it defaults to
15 1.154.2.2 lukem # ${KERNSRCDIR}/arch/${MACHINE}/compile/KERNELNAME, but can be
16 1.154.2.2 lukem # overridden.
17 1.154.2.2 lukem # KERNCONFDIR is where the configuration files for kernels are found;
18 1.154.2.2 lukem # default is ${KERNSRCDIR}/arch/${MACHINE}/conf but can be overridden.
19 1.154.2.2 lukem # UPDATE is normally undefined; if defined, don't do a 'make clean'
20 1.154.2.2 lukem # before kernel compile
21 1.154.2.2 lukem # NO_SENDMAIL is normally undefined; if defined, it will not do a
22 1.154.2.2 lukem # `make distribution' in the sendmail config file source directory.
23 1.154.2.2 lukem # EXTRA_KERNELS has a machine-dependent list of kernels to build added
24 1.154.2.2 lukem # to it, but you may also set this to have extra ones built.
25 1.154.2.2 lukem # BUILD_KERNELS are a machine-dependent list of kernels that should just
26 1.154.2.2 lukem # be built in place but not made into sets or installed, e.g., an
27 1.154.2.2 lukem # INSTALL kernel used later in src/distrib/.
28 1.154.2.2 lukem #
29 1.154.2.2 lukem # Targets:
30 1.154.2.2 lukem # distribution: makes a full NetBSD distribution in DESTDIR. If
31 1.154.2.2 lukem # INSTALL_DONE is set, it will not do a `make install.'
32 1.154.2.2 lukem # distrib-dirs: creates an empty NetBSD directory tree in DESTDIR.
33 1.154.2.2 lukem # Called by distribution.
34 1.154.2.2 lukem # snapshot: calls distribution, above, and then tars up the files
35 1.154.2.2 lukem # into a release(7) format in RELEASEDIR. Any port-dependent
36 1.154.2.2 lukem # stuff for this target is found in etc.${MACHINE}/Makefile.inc.
37 1.154.2.2 lukem # release: a synonym for `snapshot'
38 1.154.2.2 lukem
39 1.154.2.2 lukem # do this before bsd.own.mk so we get correct KERNSRCDIR
40 1.154.2.2 lukem .include "../Makefile.inc"
41 1.154.2.2 lukem
42 1.154.2.2 lukem # For NO_SENDMAIL and INSTPRIV
43 1.154.2.2 lukem .include <bsd.own.mk>
44 1.154.2.2 lukem
45 1.154.2.2 lukem TZDIR= /usr/share/zoneinfo
46 1.154.2.2 lukem LOCALTIME?= US/Pacific
47 1.154.2.2 lukem
48 1.154.2.3 hubertf # Flags for creating ISO CDROM image
49 1.154.2.3 hubertf # mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrecord
50 1.154.2.3 hubertf MKISOFS?= mkisofs
51 1.154.2.3 hubertf MKISOFS_FLAGS+= -J -l \
52 1.154.2.3 hubertf -r -T -v \
53 1.154.2.3 hubertf -P "The NetBSD Project" \
54 1.154.2.6 tv -m "${RELEASEDIR}/installation/cdrom"
55 1.154.2.3 hubertf
56 1.154.2.2 lukem # setting NOOBJ prevents "make obj" from doing anything;
57 1.154.2.2 lukem # an objdir would break the installation stuff below
58 1.154.2.2 lukem MKOBJ= no
59 1.154.2.2 lukem
60 1.154.2.2 lukem # MD Makefile.inc may append MD targets to BIN[123]. Make sure all
61 1.154.2.2 lukem # are empty, to preserve the old semantics of setting them below with "=".
62 1.154.2.2 lukem BIN1=
63 1.154.2.2 lukem BIN2=
64 1.154.2.2 lukem BIN3=
65 1.154.2.2 lukem
66 1.154.2.2 lukem # Directories to build in ${RELEASEDIR}. MD Makefile.inc files can
67 1.154.2.2 lukem # add to this.
68 1.154.2.2 lukem # NOTE: Parent directories must be listed before subdirectories.
69 1.154.2.2 lukem INSTALLATION_DIRS= \
70 1.154.2.8 tv binary binary/sets binary/kernel installation
71 1.154.2.2 lukem
72 1.154.2.2 lukem .if exists(etc.${MACHINE}/Makefile.inc)
73 1.154.2.2 lukem .include "etc.${MACHINE}/Makefile.inc"
74 1.154.2.2 lukem .endif
75 1.154.2.2 lukem
76 1.154.2.2 lukem # Use multiple jobs for kernel builds, if NBUILDJOBS set.
77 1.154.2.2 lukem # (Taken from src/Makefile.)
78 1.154.2.2 lukem .if defined(NBUILDJOBS)
79 1.154.2.2 lukem _J= -j${NBUILDJOBS}
80 1.154.2.2 lukem .endif
81 1.154.2.2 lukem
82 1.154.2.2 lukem # -rw-r--r--
83 1.154.2.2 lukem BINOWN= root
84 1.154.2.2 lukem BINGRP= wheel
85 1.154.2.2 lukem BIN1+= bootptab changelist csh.cshrc csh.login csh.logout daily \
86 1.154.2.2 lukem daily.conf dm.conf floppytab ftpchroot ftpusers ftpwelcome \
87 1.154.2.2 lukem gettytab group hosts hosts.lpd inetd.conf lkm.conf \
88 1.154.2.2 lukem mailer.conf man.conf monthly monthly.conf mrouted.conf \
89 1.154.2.2 lukem netconfig networks newsyslog.conf nsswitch.conf ntp.conf \
90 1.154.2.2 lukem phones printcap profile protocols rbootd.conf rc rc.conf \
91 1.154.2.2 lukem rc.lkm rc.local rc.subr rc.shutdown remote rpc \
92 1.154.2.2 lukem security security.conf services shells sysctl.conf syslog.conf \
93 1.154.2.2 lukem weekly weekly.conf wscons.conf \
94 1.154.2.2 lukem etc.${MACHINE}/ttys etc.${MACHINE}/disktab
95 1.154.2.2 lukem
96 1.154.2.2 lukem .if (${MACHINE_ARCH} == "m68k") || \
97 1.154.2.2 lukem (${MACHINE_ARCH} == "ns32k") || \
98 1.154.2.2 lukem (${MACHINE_ARCH} == "vax") || \
99 1.154.2.2 lukem (${MACHINE_ARCH} == "arm32")
100 1.154.2.2 lukem BIN1+= ld.so.conf
101 1.154.2.2 lukem .elif exists(etc.${MACHINE_ARCH}/ld.so.conf)
102 1.154.2.2 lukem BIN1+= etc.${MACHINE_ARCH}/ld.so.conf
103 1.154.2.2 lukem .endif
104 1.154.2.2 lukem
105 1.154.2.2 lukem .if exists(etc.${MACHINE_ARCH}/ttyaction)
106 1.154.2.2 lukem BIN1+= etc.${MACHINE_ARCH}/ttyaction
107 1.154.2.2 lukem .endif
108 1.154.2.2 lukem
109 1.154.2.2 lukem # IPv6
110 1.154.2.2 lukem BIN1+= rtadvd.conf
111 1.154.2.2 lukem
112 1.154.2.2 lukem # -rw-rw-r--
113 1.154.2.2 lukem BIN2+= motd
114 1.154.2.2 lukem
115 1.154.2.2 lukem # -rw-------
116 1.154.2.2 lukem BIN3+= hosts.equiv
117 1.154.2.2 lukem
118 1.154.2.2 lukem NAMEDB= 127 root.cache named.conf localhost loopback.v6
119 1.154.2.2 lukem PCS= pcs750.bin
120 1.154.2.2 lukem
121 1.154.2.2 lukem all clean cleandir depend distclean etc includes install lint:
122 1.154.2.2 lukem
123 1.154.2.2 lukem .include <bsd.kernobj.mk>
124 1.154.2.2 lukem
125 1.154.2.2 lukem obj:
126 1.154.2.2 lukem mkdir -p ${KERNOBJDIR}
127 1.154.2.2 lukem
128 1.154.2.2 lukem .ifndef DESTDIR
129 1.154.2.3 hubertf distribution distrib-dirs release snapshot iso-image:
130 1.154.2.2 lukem @echo setenv DESTDIR before doing that!
131 1.154.2.2 lukem @false
132 1.154.2.2 lukem .else
133 1.154.2.2 lukem distribution: distrib-dirs
134 1.154.2.2 lukem .if !defined(INSTALL_DONE)
135 1.154.2.2 lukem (cd ..; ${MAKE} _DISTRIB= includes)
136 1.154.2.2 lukem (cd ..; ${MAKE} _DISTRIB= install)
137 1.154.2.2 lukem .endif
138 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} \
139 1.154.2.2 lukem ${DESTDIR}/etc
140 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} \
141 1.154.2.2 lukem ${DESTDIR}/etc
142 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 ${BIN3} \
143 1.154.2.2 lukem ${DESTDIR}/etc
144 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 aliases \
145 1.154.2.2 lukem ${DESTDIR}/etc/mail
146 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 crontab \
147 1.154.2.2 lukem ${DESTDIR}/var/cron/tabs/root
148 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 master.passwd \
149 1.154.2.2 lukem ${DESTDIR}/etc
150 1.154.2.2 lukem pwd_mkdb -p -d ${DESTDIR}/ ${DESTDIR}/etc/master.passwd
151 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 555 \
152 1.154.2.2 lukem MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev
153 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 minfree \
154 1.154.2.2 lukem ${DESTDIR}/var/crash
155 1.154.2.2 lukem (cd root; \
156 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.cshrc \
157 1.154.2.2 lukem ${DESTDIR}/root/.cshrc; \
158 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 dot.klogin \
159 1.154.2.2 lukem ${DESTDIR}/root/.klogin; \
160 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.login \
161 1.154.2.2 lukem ${DESTDIR}/root/.login; \
162 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.profile \
163 1.154.2.2 lukem ${DESTDIR}/root/.profile; \
164 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.shrc \
165 1.154.2.2 lukem ${DESTDIR}/root/.shrc; \
166 1.154.2.2 lukem rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
167 1.154.2.2 lukem ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
168 1.154.2.2 lukem ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile)
169 1.154.2.5 lukem (cd defaults; ${MAKE} install)
170 1.154.2.2 lukem (cd mtree; ${MAKE} install)
171 1.154.2.2 lukem (cd namedb; \
172 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
173 1.154.2.2 lukem ${NAMEDB} ${DESTDIR}/etc/namedb)
174 1.154.2.2 lukem (cd rc.d; ${MAKE} install)
175 1.154.2.2 lukem /bin/rm -f ${DESTDIR}/etc/localtime
176 1.154.2.2 lukem ln -s ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime
177 1.154.2.2 lukem /bin/rm -f ${DESTDIR}/etc/rmt
178 1.154.2.2 lukem ln -s /usr/sbin/rmt ${DESTDIR}/etc/rmt
179 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g operator -m 664 /dev/null \
180 1.154.2.2 lukem ${DESTDIR}/etc/dumpdates
181 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g operator -m 600 /dev/null \
182 1.154.2.2 lukem ${DESTDIR}/etc/skeykeys
183 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 /dev/null \
184 1.154.2.2 lukem ${DESTDIR}/var/at/at.deny
185 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 /dev/null \
186 1.154.2.2 lukem ${DESTDIR}/var/cron/log
187 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o nobody -g ${BINGRP} -m 664 /dev/null \
188 1.154.2.2 lukem ${DESTDIR}/var/db/locate.database
189 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o uucp -g dialer -m 640 /dev/null \
190 1.154.2.2 lukem ${DESTDIR}/var/log/aculog
191 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
192 1.154.2.2 lukem ${DESTDIR}/var/log/authlog
193 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
194 1.154.2.2 lukem ${DESTDIR}/var/log/lastlog
195 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \
196 1.154.2.2 lukem ${DESTDIR}/var/log/lpd-errs
197 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
198 1.154.2.2 lukem ${DESTDIR}/var/log/maillog
199 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
200 1.154.2.2 lukem ${DESTDIR}/var/log/messages
201 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
202 1.154.2.2 lukem ${DESTDIR}/var/log/secure
203 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
204 1.154.2.2 lukem ${DESTDIR}/var/log/sendmail.st
205 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
206 1.154.2.2 lukem ${DESTDIR}/var/log/wtmp
207 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \
208 1.154.2.2 lukem ${DESTDIR}/var/log/xferlog
209 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o daemon -g staff -m 664 /dev/null \
210 1.154.2.2 lukem ${DESTDIR}/var/msgs/bounds
211 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
212 1.154.2.2 lukem ${DESTDIR}/var/run/utmp
213 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
214 1.154.2.2 lukem ${DESTDIR}/var/games/atc_scores
215 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
216 1.154.2.2 lukem ${DESTDIR}/var/games/battlestar.log
217 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
218 1.154.2.2 lukem ${DESTDIR}/var/games/cfscores
219 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
220 1.154.2.2 lukem ${DESTDIR}/var/games/criblog
221 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
222 1.154.2.2 lukem ${DESTDIR}/var/games/robots_roll
223 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
224 1.154.2.2 lukem ${DESTDIR}/var/games/rogue.scores
225 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
226 1.154.2.2 lukem ${DESTDIR}/var/games/saillog
227 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
228 1.154.2.2 lukem ${DESTDIR}/var/games/snakerawscores
229 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
230 1.154.2.2 lukem ${DESTDIR}/var/games/snake.log
231 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
232 1.154.2.2 lukem ${DESTDIR}/var/games/tetris.scores
233 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
234 1.154.2.2 lukem ${DESTDIR}/var/games/larn/llog12.0
235 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
236 1.154.2.2 lukem ${DESTDIR}/var/games/larn/lscore12.0
237 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \
238 1.154.2.2 lukem ${DESTDIR}/var/games/larn/playerids
239 1.154.2.2 lukem (cd etc.${MACHINE}; ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} \
240 1.154.2.2 lukem -g ${BINGRP} -m 444 fstab.* ${DESTDIR}/etc)
241 1.154.2.2 lukem (cd ${DESTDIR}/dev; ./MAKEDEV all)
242 1.154.2.7 tv (cd skel; ${MAKE} distribution)
243 1.154.2.2 lukem (cd ../usr.bin/mail; ${MAKE} distribution)
244 1.154.2.4 thorpej (cd ../usr.bin/ssh; ${MAKE} distribution)
245 1.154.2.2 lukem (cd ../gnu/usr.sbin/postfix/; ${MAKE} distribution)
246 1.154.2.2 lukem .ifndef NO_SENDMAIL
247 1.154.2.2 lukem (cd ../gnu/usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
248 1.154.2.2 lukem ${DESTDIR}/usr/libexec/sendmail/sendmail -C ${DESTDIR}/etc/mail/sendmail.cf -O AliasFile=${DESTDIR}/etc/mail/aliases -O DontBlameSendmail=MapInUnsafeDirPath -bi
249 1.154.2.2 lukem .endif
250 1.154.2.2 lukem
251 1.154.2.2 lukem distrib-dirs:
252 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${DESTDIR}
253 1.154.2.2 lukem -mtree -def mtree/NetBSD.dist -p ${DESTDIR}/ -u
254 1.154.2.2 lukem cd ${DESTDIR}; rm -f sys; ln -s usr/src/sys sys
255 1.154.2.2 lukem
256 1.154.2.2 lukem .if !defined(RELEASEDIR)
257 1.154.2.3 hubertf release snapshot snap_pre snap_md_pre snap_md_post iso-image:
258 1.154.2.2 lukem @echo setenv RELEASEDIR before doing that!
259 1.154.2.2 lukem @false
260 1.154.2.2 lukem .else
261 1.154.2.2 lukem release snapshot: distribution snap_pre snap_md_pre snap_kern snap_md_post
262 1.154.2.2 lukem (cd ../distrib/sets; ${MAKE} sets)
263 1.154.2.2 lukem sh ../distrib/sets/makesums -t ${RELEASEDIR}/binary/kernel '*.gz'
264 1.154.2.2 lukem
265 1.154.2.3 hubertf # Standalone target to create a CDROM image after the release
266 1.154.2.3 hubertf # was composed. Should be run after "make build" in both src and xsrc
267 1.154.2.3 hubertf iso-image: iso-image_md_post
268 1.154.2.3 hubertf
269 1.154.2.3 hubertf iso-image_mi: iso-image_md_pre
270 1.154.2.3 hubertf @if ${MKISOFS} --version; then \
271 1.154.2.3 hubertf mkdir -p ${RELEASEDIR}/installation/cdrom ; \
272 1.154.2.3 hubertf ${MKISOFS} ${MKISOFS_FLAGS} \
273 1.154.2.3 hubertf -o ${RELEASEDIR}/installation/cdrom/netbsd-${MACHINE}.iso \
274 1.154.2.3 hubertf ${RELEASEDIR} ; \
275 1.154.2.3 hubertf sh ../distrib/sets/makesums -t ${RELEASEDIR}/installation/cdrom '*.iso' ; \
276 1.154.2.3 hubertf else \
277 1.154.2.3 hubertf echo "install pkgsrc/sysutils/cdrecord and type 'make iso-image'." ; \
278 1.154.2.3 hubertf fi
279 1.154.2.3 hubertf
280 1.154.2.3 hubertf # Setup the $RELEASEDIR to produce a bootable CD image:
281 1.154.2.3 hubertf iso-image_md_pre:
282 1.154.2.3 hubertf # nothing here -- look in the machine-dependent Makefile.inc
283 1.154.2.3 hubertf
284 1.154.2.3 hubertf # Fixup the CD-image to be bootable
285 1.154.2.3 hubertf iso-image_md_post: iso-image_mi
286 1.154.2.3 hubertf # nothing here -- look in the machine-dependent Makefile.inc
287 1.154.2.3 hubertf
288 1.154.2.2 lukem snap_pre:
289 1.154.2.2 lukem /bin/rm -rf ${RELEASEDIR}
290 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}
291 1.154.2.2 lukem .for dir in ${INSTALLATION_DIRS}
292 1.154.2.2 lukem ${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}/${dir}
293 1.154.2.2 lukem .endfor
294 1.154.2.2 lukem
295 1.154.2.2 lukem
296 1.154.2.2 lukem # This target builds the GENERIC kernel (which must exist for all
297 1.154.2.2 lukem # ports) and puts it in binary/sets/kern.tgz, and also builds any
298 1.154.2.2 lukem # kernels specified in EXTRA_KERNELS. Since NetBSD's kernel build
299 1.154.2.2 lukem # system can create more than one kernel from a single configuration
300 1.154.2.2 lukem # we figure out how many there are, what they're named, and move them
301 1.154.2.2 lukem # to binary/kernel/${KERNEL}.${CONFIGFILE}.gz - most often KERNEL will
302 1.154.2.2 lukem # simply be "netbsd". If we don't find the "config" line, assume the
303 1.154.2.2 lukem # kernel will be "netbsd" (some config files are simple additions on
304 1.154.2.2 lukem # GENERIC, and just include it).
305 1.154.2.2 lukem #
306 1.154.2.2 lukem GETKERNELAWK= awk '/^config/ {print $$2; found=1} \
307 1.154.2.2 lukem END{ if (found == 0) print "netbsd"; }'
308 1.154.2.2 lukem #
309 1.154.2.2 lukem .if !target(snap_kern)
310 1.154.2.2 lukem snap_kern:
311 1.154.2.2 lukem .ifndef KERNELS_DONE
312 1.154.2.2 lukem .for configfile in GENERIC ${EXTRA_KERNELS} ${BUILD_KERNELS}
313 1.154.2.2 lukem cd ${KERNCONFDIR} && ${CONFIG} \
314 1.154.2.2 lukem -b ${KERNOBJDIR}/${configfile} -s ${KERNSRCDIR} ${configfile}
315 1.154.2.2 lukem .ifndef UPDATE
316 1.154.2.2 lukem cd ${KERNOBJDIR}/${configfile} && ${MAKE} clean
317 1.154.2.2 lukem .endif
318 1.154.2.2 lukem cd ${KERNOBJDIR}/${configfile} && ${MAKE} depend && ${MAKE} ${_J}
319 1.154.2.2 lukem .endfor # kernels
320 1.154.2.2 lukem cd ${KERNOBJDIR}/GENERIC && \
321 1.154.2.2 lukem tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/GENERIC` |\
322 1.154.2.2 lukem gzip -c -9 > ${RELEASEDIR}/binary/sets/kern.tgz
323 1.154.2.2 lukem .for configfile in GENERIC ${EXTRA_KERNELS}
324 1.154.2.2 lukem cd ${KERNOBJDIR}/${configfile} && \
325 1.154.2.2 lukem for kernel in `${GETKERNELAWK} \
326 1.154.2.2 lukem ${KERNCONFDIR}/${configfile}` ; { \
327 1.154.2.2 lukem gzip -c -9 < $${kernel} > \
328 1.154.2.2 lukem ${RELEASEDIR}/binary/kernel/$${kernel}.${configfile}.gz ; }
329 1.154.2.2 lukem .endfor # EXTRA_KERNELS
330 1.154.2.2 lukem .endif # KERNELS_DONE
331 1.154.2.2 lukem .endif # no target(snap_kern)
332 1.154.2.2 lukem
333 1.154.2.2 lukem .endif # RELEASEDIR check
334 1.154.2.2 lukem
335 1.154.2.2 lukem snap_md_pre:
336 1.154.2.2 lukem # nothing here -- look in the machine-dependent Makefile.inc
337 1.154.2.2 lukem
338 1.154.2.2 lukem snap_md_post:
339 1.154.2.2 lukem # nothing here -- look in the machine-dependent Makefile.inc
340 1.154.2.2 lukem
341 1.154.2.2 lukem .endif # DESTDIR check
342 1.154.2.2 lukem
343 1.154.2.2 lukem .include <bsd.prog.mk>
344