Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc NetBSD's very clever kernel build system can make more t...



details:   https://anonhg.NetBSD.org/src/rev/95acab480bcc
branches:  trunk
changeset: 471538:95acab480bcc
user:      fair <fair%NetBSD.org@localhost>
date:      Sun Apr 04 09:57:11 1999 +0000

description:
NetBSD's very clever kernel build system can make more than one
kernel per config file and the resulting kernel need not be named
"netbsd"; therefore paw through the config file after the kernel
builds are done, find them all, and put them where they belong per
release(7). This all done with some clever awk/sh scripting, from
PR 7180 by David Forbes.

diffstat:

 etc/Makefile |  26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diffs (52 lines):

diff -r d8db28a4abda -r 95acab480bcc etc/Makefile
--- a/etc/Makefile      Sun Apr 04 09:56:44 1999 +0000
+++ b/etc/Makefile      Sun Apr 04 09:57:11 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.113 1999/04/03 09:40:38 fair Exp $
+#      $NetBSD: Makefile,v 1.114 1999/04/04 09:57:11 fair Exp $
 #      from: @(#)Makefile      8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -261,8 +261,11 @@
 
 # This target builds the GENERIC kernel (which must exist for all
 # ports) and puts it in binary/sets/kern.tgz, and also builds any
-# kernels specified in EXTRA_KERNELS and puts them in
-# binary/kernel/netbsd.${KERN}.gz
+# kernels specified in EXTRA_KERNELS. Since NetBSD's kernel build
+# system can create more than one kernel from a single configuration
+# we figure out how many there are, what they're named, and move them
+# to binary/kernel/${KERNEL}.${CONFIGFILE}.gz - most often KERNEL will
+# simply be "netbsd".
 #
 snap_kern:
        cd ${KERNCONFDIR} && config \
@@ -272,18 +275,21 @@
 .endif
        cd ${KERNOBJDIR}/GENERIC &&     \
                ${MAKE} depend && ${MAKE} ${_J} &&      \
-               tar cf - netbsd |\
+               tar cf - `awk '$$1=="config" {print $$2}'  \
+                       ${KERNCONFDIR}/GENERIC` |\
                gzip -c -9 > ${RELEASEDIR}/binary/sets/kern.tgz
-.for kernel in ${EXTRA_KERNELS}
+.for configfile in ${EXTRA_KERNELS}
        cd ${KERNCONFDIR} && config \
-               -b ${KERNOBJDIR}/${kernel} -s ${KERNSRCDIR} ${kernel}
+               -b ${KERNOBJDIR}/${configfile} -s ${KERNSRCDIR} ${configfile}
 .ifndef UPDATE
-       cd ${KERNOBJDIR}/${kernel} && ${MAKE} clean 
+       cd ${KERNOBJDIR}/${configfile} && ${MAKE} clean 
 .endif
-       cd ${KERNOBJDIR}/${kernel} &&   \
+       cd ${KERNOBJDIR}/${configfile} &&       \
                ${MAKE} depend && ${MAKE} ${_J} &&      \
-               gzip -c -9 < netbsd > \
-                       ${RELEASEDIR}/binary/kernel/netbsd.${kernel}.gz
+               for kernel in `awk '$$1=="config" {print $$2}' \
+                       ${KERNCONFDIR}/${configfile}` ; {   \
+               gzip -c -9 < $${kernel} > \
+                       ${RELEASEDIR}/binary/kernel/$${kernel}.${configfile}.gz ; }
 .endfor # EXTRA_KERNELS
 
 .endif # RELEASEDIR check



Home | Main Index | Thread Index | Old Index