Makefile revision 1.196
11.196Sthorpej# $NetBSD: Makefile,v 1.196 2001/11/29 22:45:53 thorpej Exp $ 21.66Smikel# from: @(#)Makefile 8.7 (Berkeley) 5/25/95 31.1Scgd 41.96Scjs# Environment variables without default values: 51.96Scjs# DESTDIR must be set before anything in this file will work. 61.96Scjs# RELEASEDIR is where the tarred up stuff for a snapshot or 71.96Scjs# release will be placed. 81.96Scjs# 91.96Scjs# Environment variables with default values: 101.96Scjs# LOCALTIME will set the default local time for the system you 111.96Scjs# build; it determines what /etc/localtime is symlink'd to. 121.96Scjs# KERNSRCDIR points to kernel source; it is set by default to ../sys, 131.96Scjs# but can be overridden. 141.96Scjs# KERNOBJDIR is the kernel build directory, it defaults to 151.172Sjlam# ${KERNSRCDIR}/arch/${MACHINE}/compile, but can be overridden. 161.96Scjs# KERNCONFDIR is where the configuration files for kernels are found; 171.96Scjs# default is ${KERNSRCDIR}/arch/${MACHINE}/conf but can be overridden. 181.97Scjs# UPDATE is normally undefined; if defined, don't do a 'make clean' 191.97Scjs# before kernel compile 201.96Scjs# NO_SENDMAIL is normally undefined; if defined, it will not do a 211.96Scjs# `make distribution' in the sendmail config file source directory. 221.154Sthorpej# 231.96Scjs# Targets: 241.96Scjs# distribution: makes a full NetBSD distribution in DESTDIR. If 251.96Scjs# INSTALL_DONE is set, it will not do a `make install.' 261.182Schs# if DISTRIBUTION_DONE is set, it will not do anything. 271.96Scjs# distrib-dirs: creates an empty NetBSD directory tree in DESTDIR. 281.96Scjs# Called by distribution. 291.96Scjs# snapshot: calls distribution, above, and then tars up the files 301.96Scjs# into a release(7) format in RELEASEDIR. Any port-dependent 311.96Scjs# stuff for this target is found in etc.${MACHINE}/Makefile.inc. 321.106Scjs# release: a synonym for `snapshot' 331.96Scjs 341.149Ssjg# do this before bsd.own.mk so we get correct KERNSRCDIR 351.145Ssjg.include "../Makefile.inc" 361.145Ssjg 371.155Sthorpej# For NO_SENDMAIL, INSTPRIV, MKCRYPTO 381.90Skim.include <bsd.own.mk> 391.187Sjmc 401.187Sjmc.MAKEOVERRIDES+= USETOOLS 411.90Skim 421.23ScgdTZDIR= /usr/share/zoneinfo 431.157SkleinkLOCALTIME?= UTC 441.19Sderaadt 451.161Shubertf# Flags for creating ISO CDROM image 461.161Shubertf# mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrecord 471.161ShubertfMKISOFS?= mkisofs 481.161ShubertfMKISOFS_FLAGS+= -J -l \ 491.161Shubertf -r -T -v \ 501.161Shubertf -P "The NetBSD Project" \ 511.164Shubertf -m "${RELEASEDIR}/installation/cdrom" 521.161Shubertf 531.55Sperry# setting NOOBJ prevents "make obj" from doing anything; 541.55Sperry# an objdir would break the installation stuff below 551.101SlukemMKOBJ= no 561.1Scgd 571.80Sjonathan# MD Makefile.inc may append MD targets to BIN[123]. Make sure all 581.80Sjonathan# are empty, to preserve the old semantics of setting them below with "=". 591.80SjonathanBIN1= 601.80SjonathanBIN2= 611.80SjonathanBIN3= 621.80Sjonathan 631.117Ssimonb# Directories to build in ${RELEASEDIR}. MD Makefile.inc files can 641.117Ssimonb# add to this. 651.117Ssimonb# NOTE: Parent directories must be listed before subdirectories. 661.117SsimonbINSTALLATION_DIRS= \ 671.158Sfvdl binary binary/sets binary/kernel installation 681.117Ssimonb 691.71Scjs.if exists(etc.${MACHINE}/Makefile.inc) 701.71Scjs.include "etc.${MACHINE}/Makefile.inc" 711.71Scjs.endif 721.32Sjtc 731.96Scjs# Use multiple jobs for kernel builds, if NBUILDJOBS set. 741.96Scjs# (Taken from src/Makefile.) 751.96Scjs.if defined(NBUILDJOBS) 761.96Scjs_J= -j${NBUILDJOBS} 771.96Scjs.endif 781.96Scjs 791.21Scgd# -rw-r--r-- 801.21ScgdBINOWN= root 811.21ScgdBINGRP= wheel 821.184SlukemBIN1+= bootptab changelist csh.cshrc csh.login csh.logout daily \ 831.131Sveego daily.conf dm.conf floppytab ftpchroot ftpusers ftpwelcome \ 841.131Sveego gettytab group hosts hosts.lpd inetd.conf lkm.conf \ 851.131Sveego mailer.conf man.conf monthly monthly.conf mrouted.conf \ 861.151Sfvdl netconfig networks newsyslog.conf nsswitch.conf ntp.conf \ 871.131Sveego phones printcap profile protocols rbootd.conf rc rc.conf \ 881.159Slukem rc.lkm rc.local rc.subr rc.shutdown remote rpc \ 891.142Stsarna security security.conf services shells sysctl.conf syslog.conf \ 901.142Stsarna weekly weekly.conf wscons.conf \ 911.109Sdrochner etc.${MACHINE}/ttys etc.${MACHINE}/disktab 921.105Smycroft 931.121Sfvdl.if (${MACHINE_ARCH} == "m68k") || \ 941.105Smycroft (${MACHINE_ARCH} == "ns32k") || \ 951.105Smycroft (${MACHINE_ARCH} == "vax") || \ 961.105Smycroft (${MACHINE_ARCH} == "arm32") 971.129SchristosBIN1+= ld.so.conf 981.129Schristos.elif exists(etc.${MACHINE_ARCH}/ld.so.conf) 991.132SjlamBIN1+= etc.${MACHINE_ARCH}/ld.so.conf 1001.152Sperry.endif 1011.152Sperry 1021.152Sperry.if exists(etc.${MACHINE_ARCH}/ttyaction) 1031.152SperryBIN1+= etc.${MACHINE_ARCH}/ttyaction 1041.105Smycroft.endif 1051.1Scgd 1061.46Sderaadt# -rw-rw-r-- 1071.80SjonathanBIN2+= motd 1081.1Scgd 1091.77Smycroft# -rw------- 1101.80SjonathanBIN3+= hosts.equiv 1111.77Smycroft 1121.144SthorpejNAMEDB= 127 root.cache named.conf localhost loopback.v6 1131.1ScgdPCS= pcs750.bin 1141.1Scgd 1151.191Stv.if make(release) || make(snapshot) || make(distribution) 1161.170Sjdolecek# find out endianness of target and set proper flag for pwd_mkdb so that 1171.170Sjdolecek# it creates database in same endianness 1181.191Stv.if exists(${DESTDIR}/usr/include/sys/endian.h) 1191.171SsimonbTARGET_ENDIANNESS!= \ 1201.191Stv printf '\#include <sys/endian.h>\n_BYTE_ORDER\n' | \ 1211.171Ssimonb ${CC} -I${DESTDIR}/usr/include -E - | tail -1 | awk '{print $$1}' 1221.170Sjdolecek.else 1231.170SjdolecekTARGET_ENDIANNESS= 1241.170Sjdolecek.endif 1251.170Sjdolecek 1261.191Stv.if ${TARGET_ENDIANNESS} == "1234" 1271.170SjdolecekTARGET_ENDIANNESS= -L 1281.191Stv.elif ${TARGET_ENDIANNESS} == "4321" 1291.170SjdolecekTARGET_ENDIANNESS= -B 1301.170Sjdolecek.else 1311.170SjdolecekTARGET_ENDIANNESS= 1321.191Stv.endif 1331.170Sjdolecek.endif 1341.170Sjdolecek 1351.149Ssjg.include <bsd.kernobj.mk> 1361.149Ssjg 1371.149Ssjgobj: 1381.149Ssjg mkdir -p ${KERNOBJDIR} 1391.149Ssjg 1401.190Sjmc.if !defined(DESTDIR) || ${DESTDIR} == "" 1411.174Schristos__warndestdir: .USE 1421.36Scgd @echo setenv DESTDIR before doing that! 1431.34Scgd @false 1441.174Schristosdistribution distrib-dirs release snapshot snap_pre snap_md_pre \ 1451.174Schristosiso-image: __warndestdir 1461.174Schristos.if !target(snap_md_post) 1471.174Schristossnap_md_post: __warndestdir 1481.174Schristos.endif 1491.34Scgd.else 1501.7Scgddistribution: distrib-dirs 1511.182Schs.if !defined(DISTRIBUTION_DONE) 1521.87Sperry.if !defined(INSTALL_DONE) 1531.107Sscottr (cd ..; ${MAKE} _DISTRIB= includes) 1541.107Sscottr (cd ..; ${MAKE} _DISTRIB= install) 1551.87Sperry.endif 1561.193Sthorpej ${MAKE} install-etc-files 1571.195Sthorpej.endif 1581.193Sthorpej 1591.193Sthorpejinstall-etc-files: 1601.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} \ 1611.124Ssimonb ${DESTDIR}/etc 1621.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 ${BIN2} \ 1631.124Ssimonb ${DESTDIR}/etc 1641.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 ${BIN3} \ 1651.124Ssimonb ${DESTDIR}/etc 1661.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 aliases \ 1671.147Sitojun ${DESTDIR}/etc/mail 1681.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 crontab \ 1691.56Sthorpej ${DESTDIR}/var/cron/tabs/root 1701.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 master.passwd \ 1711.124Ssimonb ${DESTDIR}/etc 1721.171Ssimonb pwd_mkdb -p ${TARGET_ENDIANNESS} -d ${DESTDIR}/ \ 1731.171Ssimonb ${DESTDIR}/etc/master.passwd 1741.194Sperry.if defined(UNPRIVED) 1751.194Sperry echo "${DESTDIR}/etc/passwd type=file mode=0644 uname=root gname=wheel" \ 1761.194Sperry | sed -e 's|^/|./|g' -e 's|//|/|g' >>${METALOG} 1771.194Sperry echo "${DESTDIR}/etc/pwd.db type=file mode=0644 uname=root gname=wheel" \ 1781.194Sperry | sed -e 's|^/|./|g' -e 's|//|/|g' >>${METALOG} 1791.194Sperry echo "${DESTDIR}/etc/spwd.db type=file mode=0600 uname=root gname=wheel" \ 1801.194Sperry | sed -e 's|^/|./|g' -e 's|//|/|g' >>${METALOG} 1811.194Sperry.endif 1821.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 555 \ 1831.1Scgd MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev 1841.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 minfree \ 1851.73Sperry ${DESTDIR}/var/crash 1861.1Scgd (cd root; \ 1871.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.cshrc \ 1881.1Scgd ${DESTDIR}/root/.cshrc; \ 1891.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 dot.klogin \ 1901.1Scgd ${DESTDIR}/root/.klogin; \ 1911.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.login \ 1921.1Scgd ${DESTDIR}/root/.login; \ 1931.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.profile \ 1941.1Scgd ${DESTDIR}/root/.profile; \ 1951.128Smycroft ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 644 dot.shrc \ 1961.128Smycroft ${DESTDIR}/root/.shrc; \ 1971.189Sperry rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ 1981.188Sperry ${INSTALL} ${INSTPRIV} -l h \ 1991.188Sperry ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ 2001.188Sperry ${INSTALL} ${INSTPRIV} -l h \ 2011.188Sperry ${DESTDIR}/root/.profile ${DESTDIR}/.profile) 2021.162Slukem (cd defaults; ${MAKE} install) 2031.83Smrg (cd mtree; ${MAKE} install) 2041.63Smikel (cd namedb; \ 2051.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 \ 2061.124Ssimonb ${NAMEDB} ${DESTDIR}/etc/namedb) 2071.140Slukem (cd rc.d; ${MAKE} install) 2081.188Sperry ${INSTALL} ${INSTPRIV} -l s -o root -g wheel -m 755 \ 2091.188Sperry ${TZDIR}/${LOCALTIME} ${DESTDIR}/etc/localtime 2101.188Sperry ${INSTALL} ${INSTPRIV} -l s -o root -g wheel -m 755 \ 2111.188Sperry /usr/sbin/rmt ${DESTDIR}/etc/rmt 2121.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g operator -m 664 /dev/null \ 2131.32Sjtc ${DESTDIR}/etc/dumpdates 2141.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g operator -m 600 /dev/null \ 2151.44Sderaadt ${DESTDIR}/etc/skeykeys 2161.127Sperry ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 /dev/null \ 2171.127Sperry ${DESTDIR}/var/at/at.deny 2181.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o root -g wheel -m 600 /dev/null \ 2191.38Scgd ${DESTDIR}/var/cron/log 2201.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o nobody -g ${BINGRP} -m 664 /dev/null \ 2211.32Sjtc ${DESTDIR}/var/db/locate.database 2221.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o uucp -g dialer -m 640 /dev/null \ 2231.113Sfair ${DESTDIR}/var/log/aculog 2241.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 2251.69Sperry ${DESTDIR}/var/log/authlog 2261.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 2271.32Sjtc ${DESTDIR}/var/log/lastlog 2281.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 640 /dev/null \ 2291.32Sjtc ${DESTDIR}/var/log/lpd-errs 2301.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 2311.32Sjtc ${DESTDIR}/var/log/maillog 2321.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 2331.32Sjtc ${DESTDIR}/var/log/messages 2341.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 2351.58Slukem ${DESTDIR}/var/log/secure 2361.137Smycroft ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 2371.137Smycroft ${DESTDIR}/var/log/sendmail.st 2381.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 2391.32Sjtc ${DESTDIR}/var/log/wtmp 2401.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ 2411.69Sperry ${DESTDIR}/var/log/xferlog 2421.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o daemon -g staff -m 664 /dev/null \ 2431.39Scgd ${DESTDIR}/var/msgs/bounds 2441.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \ 2451.32Sjtc ${DESTDIR}/var/run/utmp 2461.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2471.81Smrg ${DESTDIR}/var/games/atc_scores 2481.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2491.81Smrg ${DESTDIR}/var/games/battlestar.log 2501.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2511.81Smrg ${DESTDIR}/var/games/cfscores 2521.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2531.82Sperry ${DESTDIR}/var/games/criblog 2541.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2551.81Smrg ${DESTDIR}/var/games/robots_roll 2561.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2571.81Smrg ${DESTDIR}/var/games/rogue.scores 2581.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2591.81Smrg ${DESTDIR}/var/games/saillog 2601.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2611.81Smrg ${DESTDIR}/var/games/snakerawscores 2621.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2631.81Smrg ${DESTDIR}/var/games/snake.log 2641.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2651.81Smrg ${DESTDIR}/var/games/tetris.scores 2661.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2671.81Smrg ${DESTDIR}/var/games/larn/llog12.0 2681.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2691.81Smrg ${DESTDIR}/var/games/larn/lscore12.0 2701.124Ssimonb ${INSTALL} ${INSTPRIV} -c -o games -g games -m 664 /dev/null \ 2711.81Smrg ${DESTDIR}/var/games/larn/playerids 2721.124Ssimonb (cd etc.${MACHINE}; ${INSTALL} ${INSTPRIV} -c -o ${BINOWN} \ 2731.124Ssimonb -g ${BINGRP} -m 444 fstab.* ${DESTDIR}/etc) 2741.165Ssimonb (cd skel; ${MAKE} distribution) 2751.62Sperry (cd ../usr.bin/mail; ${MAKE} distribution) 2761.143Sperry (cd ../gnu/usr.sbin/postfix/; ${MAKE} distribution) 2771.155Sthorpej.if (${MKCRYPTO} != "no") 2781.155Sthorpej (cd ../usr.bin/ssh; ${MAKE} distribution) 2791.155Sthorpej.endif 2801.90Skim.ifndef NO_SENDMAIL 2811.133Stron (cd ../gnu/usr.sbin/sendmail/cf/cf; ${MAKE} distribution) 2821.90Skim.endif 2831.1Scgd 2841.7Scgddistrib-dirs: 2851.124Ssimonb ${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${DESTDIR} 2861.192Sperry ${MTREE} -def mtree/NetBSD.dist -p ${DESTDIR}/ -U ${UNPRIVED:D-W} 2871.189Sperry rm -f ${DESTDIR}/sys 2881.188Sperry ${INSTALL} ${INSTPRIV} -l s -o root -g wheel -m 755 \ 2891.188Sperry usr/src/sys ${DESTDIR}/sys 2901.99Scjs 2911.96Scjs.if !defined(RELEASEDIR) 2921.175Schristos__warnreleasedir: .USE 2931.96Scjs @echo setenv RELEASEDIR before doing that! 2941.96Scjs @false 2951.175Schristosrelease snapshot snap_pre snap_md_pre iso-image: __warnreleasedir 2961.175Schristos.if !target(snap_md_post) 2971.175Schristossnap_md_post: __warnreleasedir 2981.175Schristos.endif 2991.96Scjs.else 3001.117Ssimonbrelease snapshot: distribution snap_pre snap_md_pre snap_kern snap_md_post 3011.141Sthorpej (cd ../distrib/sets; ${MAKE} sets) 3021.123Sis sh ../distrib/sets/makesums -t ${RELEASEDIR}/binary/kernel '*.gz' 3031.161Shubertf 3041.161Shubertf# Standalone target to create a CDROM image after the release 3051.161Shubertf# was composed. Should be run after "make build" in both src and xsrc 3061.161Shubertfiso-image: iso-image_md_post 3071.161Shubertf 3081.161Shubertfiso-image_mi: iso-image_md_pre 3091.161Shubertf @if ${MKISOFS} --version; then \ 3101.161Shubertf mkdir -p ${RELEASEDIR}/installation/cdrom ; \ 3111.161Shubertf ${MKISOFS} ${MKISOFS_FLAGS} \ 3121.161Shubertf -o ${RELEASEDIR}/installation/cdrom/netbsd-${MACHINE}.iso \ 3131.161Shubertf ${RELEASEDIR} ; \ 3141.161Shubertf sh ../distrib/sets/makesums -t ${RELEASEDIR}/installation/cdrom '*.iso' ; \ 3151.161Shubertf else \ 3161.161Shubertf echo "install pkgsrc/sysutils/cdrecord and type 'make iso-image'." ; \ 3171.161Shubertf fi 3181.161Shubertf 3191.161Shubertf# Setup the $RELEASEDIR to produce a bootable CD image: 3201.161Shubertfiso-image_md_pre: 3211.161Shubertf# nothing here -- look in the machine-dependent Makefile.inc 3221.161Shubertf 3231.161Shubertf# Fixup the CD-image to be bootable 3241.161Shubertfiso-image_md_post: iso-image_mi 3251.161Shubertf# nothing here -- look in the machine-dependent Makefile.inc 3261.41Scgd 3271.41Scgdsnap_pre: 3281.168Sjmc# Could be a mount point, ignore the errors 3291.167Sjmc -/bin/rm -rf ${RELEASEDIR} 3301.124Ssimonb ${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR} 3311.117Ssimonb.for dir in ${INSTALLATION_DIRS} 3321.124Ssimonb ${INSTALL} ${INSTPRIV} -d -o root -g wheel -m 755 ${RELEASEDIR}/${dir} 3331.117Ssimonb.endfor 3341.96Scjs 3351.196Sthorpej# This target builds the kernels specified by each port. A port may 3361.196Sthorpej# specify the following kernels: 3371.196Sthorpej# 3381.196Sthorpej# KERNEL_SETS The list of kernels that will be 3391.196Sthorpej# packaged into sets, named 3401.196Sthorpej# kern-${kernel}.tgz. These kernels 3411.196Sthorpej# are also placed in the binary/kernels 3421.196Sthorpej# area of the release package as 3431.196Sthorpej# netbsd-${kernel}.gz. 3441.196Sthorpej# 3451.196Sthorpej# EXTRA_KERNELS Additional kernels to place in the 3461.196Sthorpej# binary/kernels area of the release 3471.196Sthorpej# package as netbsd-${kernel}.gz, but 3481.196Sthorpej# which are not placed into sets. This 3491.196Sthorpej# allows a port to provide e.g. a netbootable 3501.196Sthorpej# installation kernel containing a ramdisk. 3511.196Sthorpej# 3521.196Sthorpej# BUILD_KERNELS Additional kernels to build which are 3531.196Sthorpej# not placed into sets nor into the 3541.196Sthorpej# binary/kernels area of the release 3551.196Sthorpej# package. These are typically kernels 3561.196Sthorpej# that are built for inclusion only in 3571.196Sthorpej# installation disk/CD-ROM/tape images. 3581.116Sfair# 3591.116SfairGETKERNELAWK= awk '/^config/ {print $$2; found=1} \ 3601.116Sfair END{ if (found == 0) print "netbsd"; }' 3611.96Scjs# 3621.118Sgwr.if !target(snap_kern) 3631.96Scjssnap_kern: 3641.145Ssjg.ifndef KERNELS_DONE 3651.196Sthorpej.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} ${BUILD_KERNELS} 3661.125Ssommerfe cd ${KERNCONFDIR} && ${CONFIG} \ 3671.179Smrg -b ${KERNOBJDIR}/${configfile:C/.*\///} -s ${KERNSRCDIR} ${configfile} 3681.97Scjs.ifndef UPDATE 3691.179Smrg cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean 3701.96Scjs.endif 3711.179Smrg cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} depend && ${MAKE} ${_J} 3721.196Sthorpej.endfor # build kernels 3731.196Sthorpej.for configfile in ${KERNEL_SETS} 3741.196Sthorpej cd ${KERNOBJDIR}/${configfile:C/.*\///} && \ 3751.196Sthorpej tar cf - `${GETKERNELAWK} ${KERNCONFDIR}/${configfile}` | \ 3761.196Sthorpej gzip -c -9 > ${RELEASEDIR}/binary/sets/kern-${configfile}.tgz 3771.196Sthorpej.endfor # make kernel sets 3781.196Sthorpej.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} 3791.179Smrg cd ${KERNOBJDIR}/${configfile:C/.*\///} && \ 3801.116Sfair for kernel in `${GETKERNELAWK} \ 3811.179Smrg ${KERNCONFDIR}/${configfile:C/.*\///}` ; do \ 3821.114Sfair gzip -c -9 < $${kernel} > \ 3831.196Sthorpej ${RELEASEDIR}/binary/kernel/$${kernel}-${configfile:C/.*\///}.gz ; done 3841.196Sthorpej.endfor # place KERNEL_SETS kernels + EXTRA_KERNELS in binary/kernel/... 3851.145Ssjg.endif # KERNELS_DONE 3861.118Sgwr.endif # no target(snap_kern) 3871.108Sdrochner 3881.96Scjs.endif # RELEASEDIR check 3891.41Scgd 3901.117Ssimonbsnap_md_pre: 3911.117Ssimonb# nothing here -- look in the machine-dependent Makefile.inc 3921.117Ssimonb 3931.117Ssimonbsnap_md_post: 3941.41Scgd# nothing here -- look in the machine-dependent Makefile.inc 3951.41Scgd 3961.34Scgd.endif # DESTDIR check 3971.7Scgd 3981.1Scgd.include <bsd.prog.mk> 399