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