These commits do two things:

1. Provide a consistent and extensible framework for compiling
kernels for the "make snapshot" target.

2. Add OBJDIR support for the "make snapshot" target, in the form
of three new make variables: KERNOBJDIR, KERNSRCDIR, and KERNCONFDIR.
Default values are in the Makefile.inc, and for OBJDIR they should
be defined in /etc/mk.conf as

	KERNSRCDIR=${BSDSRCDIR}/sys
	KERNOBJDIR=${BSDOBJDIR}/sys/arch/${MACHINE}/compile

The next step is to make a new target in the src/etc/Makefile for "release"
(or something like that) to make release(7) format files.
This commit is contained in:
fair 1998-06-28 09:38:40 +00:00
parent 9609289966
commit 75f8e74b32
9 changed files with 125 additions and 108 deletions

View File

@ -1,14 +1,25 @@
#
# etc.amiga/Makefile.inc -- amiga-specific etc Makefile targets
#
# $NetBSD: Makefile.inc,v 1.8 1996/10/09 00:40:33 jtc Exp $
# $NetBSD: Makefile.inc,v 1.9 1998/06/28 09:38:40 fair Exp $
.ifdef DESTDIR
snap_md: netbsd-generic
cp ${.CURDIR}/../sys/arch/amiga/compile/GENERIC/netbsd.gz \
${DESTDIR}/snapshot/netbsd-generic.gz
netbsd-generic:
cd ${.CURDIR}/../sys/arch/amiga/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/amiga/compile/GENERIC && \
make clean && make depend && make && gzip -c -9 netbsd >netbsd.gz
# the regular expression does a basename(1) on .CURDIR so that we don't
# have to keep looking up .. at compile time.
KERNSRCDIR?= ${.CURDIR:C/[^\/]+$//}sys
KERNOBJDIR?= ${KERNSRCDIR}/arch/${MACHINE}/compile
KERNCONFDIR?= ${KERNSRCDIR}/arch/${MACHINE}/conf
snap_md:
.for kernel in GENERIC
cd ${KERNCONFDIR} && config \
-b ${KERNOBJDIR}/${kernel} \
-s ${KERNSRCDIR} \
${kernel}
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make && \
gzip -c -9 netbsd > ${DESTDIR}/snapshot/netbsd.${kernel}.gz
.endfor
.endif # DESTDIR check

View File

@ -1,16 +1,25 @@
# $NetBSD: Makefile.inc,v 1.2 1996/05/07 20:33:53 mark Exp $
# $NetBSD: Makefile.inc,v 1.3 1998/06/28 09:38:41 fair Exp $
#
# etc.arm32/Makefile.inc -- arm32-specific etc Makefile targets
#
.ifdef DESTDIR
snap_md: netbsd-gen
netbsd-gen:
cd ${.CURDIR}/../sys/arch/arm32/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/arm32/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/arm32/compile/GENERIC/netbsd \
${DESTDIR}/snapshot/netbsd-gen
# the regular expression does a basename(1) on .CURDIR so that we don't
# have to keep looking up .. at compile time.
KERNSRCDIR?= ${.CURDIR:C/[^\/]+$//}sys
KERNOBJDIR?= ${KERNSRCDIR}/arch/${MACHINE}/compile
KERNCONFDIR?= ${KERNSRCDIR}/arch/${MACHINE}/conf
snap_md:
.for kernel in GENERIC
cd ${KERNCONFDIR} && config \
-b ${KERNOBJDIR}/${kernel} \
-s ${KERNSRCDIR} \
${kernel}
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make && \
cp netbsd ${DESTDIR}/snapshot/netbsd.${kernel}
.endfor
.endif # DESTDIR check

View File

@ -1,45 +1,26 @@
#
# $NetBSD: Makefile.inc,v 1.2 1997/10/29 10:36:24 leo Exp $
# $NetBSD: Makefile.inc,v 1.3 1998/06/28 09:38:42 fair Exp $
#
# etc.atari/Makefile.inc -- atari-specific etc Makefile targets
#
.ifdef DESTDIR
snap_md: netbsd-ataritt netbsd-boot netbsd-bootx netbsd-generic netbsd-hades
cp ${.CURDIR}/../sys/arch/atari/compile/ATARITT/netbsd.gz \
${DESTDIR}/snapshot/netbsd-ataritt.gz
cp ${.CURDIR}/../sys/arch/atari/compile/BOOT/netbsd.gz \
${DESTDIR}/snapshot/netbsd-boot.gz
cp ${.CURDIR}/../sys/arch/atari/compile/BOOTX/netbsd.gz \
${DESTDIR}/snapshot/netbsd-bootx.gz
cp ${.CURDIR}/../sys/arch/atari/compile/GENERIC/netbsd.gz \
${DESTDIR}/snapshot/netbsd-generic.gz
cp ${.CURDIR}/../sys/arch/atari/compile/HADES/netbsd.gz \
${DESTDIR}/snapshot/netbsd-hades.gz
netbsd-ataritt:
cd ${.CURDIR}/../sys/arch/atari/conf && config ATARITT
cd ${.CURDIR}/../sys/arch/atari/compile/ATARITT && \
make clean && make depend && make && gzip -9 netbsd
# the regular expression does a basename(1) on .CURDIR so that we don't
# have to keep looking up .. at compile time.
netbsd-boot:
cd ${.CURDIR}/../sys/arch/atari/conf && config BOOT
cd ${.CURDIR}/../sys/arch/atari/compile/BOOT && \
make clean && make depend && make && gzip -9 netbsd
KERNSRCDIR?= ${.CURDIR:C/[^\/]+$//}sys
KERNOBJDIR?= ${KERNSRCDIR}/arch/${MACHINE}/compile
KERNCONFDIR?= ${KERNSRCDIR}/arch/${MACHINE}/conf
netbsd-bootx:
cd ${.CURDIR}/../sys/arch/atari/conf && config BOOTX
cd ${.CURDIR}/../sys/arch/atari/compile/BOOTX && \
make clean && make depend && make && gzip -9 netbsd
netbsd-generic:
cd ${.CURDIR}/../sys/arch/atari/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/atari/compile/GENERIC && \
make clean && make depend && make && gzip -9 netbsd
netbsd-hades:
cd ${.CURDIR}/../sys/arch/atari/conf && config HADES
cd ${.CURDIR}/../sys/arch/atari/compile/HADES && \
make clean && make depend && make && gzip -9 netbsd
snap_md:
.for kernel in GENERIC ATARITT BOOT BOOTX HADES
cd ${KERNCONFDIR} && config \
-b ${KERNOBJDIR}/${kernel} \
-s ${KERNSRCDIR} \
${kernel}
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make && \
gzip -c -9 netbsd > ${DESTDIR}/snapshot/netbsd.${kernel}.gz
.endfor
.endif # DESTDIR check

View File

@ -1,28 +1,24 @@
# $NetBSD: Makefile.inc,v 1.3 1997/03/06 23:41:26 mikel Exp $
# $NetBSD: Makefile.inc,v 1.4 1998/06/28 09:38:42 fair Exp $
#
# etc.hp300/Makefile.inc -- hp300-specific etc Makefile targets
.ifdef DESTDIR
snap_md: netbsd-gen.gz netbsd-dl.gz
netbsd-gen:
cd ${.CURDIR}/../sys/arch/hp300/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/hp300/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/hp300/compile/GENERIC/netbsd \
${DESTDIR}/snapshot/netbsd-gen
# the regular expression does a basename(1) on .CURDIR so that we don't
# have to keep looking up .. at compile time.
netbsd-dl:
cd ${.CURDIR}/../sys/arch/hp300/conf && config DISKLESS
cd ${.CURDIR}/../sys/arch/hp300/compile/DISKLESS && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/hp300/compile/DISKLESS/netbsd \
${DESTDIR}/snapshot/netbsd-dl
KERNSRCDIR?= ${.CURDIR:C/[^\/]+$//}sys
KERNOBJDIR?= ${KERNSRCDIR}/arch/${MACHINE}/compile
KERNCONFDIR?= ${KERNSRCDIR}/arch/${MACHINE}/conf
netbsd-gen.gz: netbsd-gen
gzip -f9 ${DESTDIR}/snapshot/netbsd-gen
netbsd-dl.gz: netbsd-dl
gzip -f9 ${DESTDIR}/snapshot/netbsd-dl
snap_md:
.for kernel in GENERIC DISKLESS
cd ${KERNCONFDIR} && config \
-b ${KERNOBJDIR}/${kernel} \
-s ${KERNSRCDIR} \
${kernel}
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make && \
gzip -c -9 netbsd > ${DESTDIR}/snapshot/netbsd.${kernel}.gz
.endfor
.endif # DESTDIR check

View File

@ -1,16 +1,25 @@
# $NetBSD: Makefile.inc,v 1.9 1997/03/04 06:30:01 mikel Exp $
# $NetBSD: Makefile.inc,v 1.10 1998/06/28 09:38:42 fair Exp $
#
# etc.i386/Makefile.inc -- i386-specific etc Makefile targets
#
.ifdef DESTDIR
snap_md: netbsd
netbsd:
cd ${.CURDIR}/../sys/arch/i386/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/i386/compile/GENERIC && \
make clean && make depend && make
cp ${.CURDIR}/../sys/arch/i386/compile/GENERIC/netbsd \
${DESTDIR}/snapshot/netbsd
# the regular expression does a basename(1) on .CURDIR so that we don't
# have to keep looking up .. at compile time.
KERNSRCDIR?= ${.CURDIR:C/[^\/]+$//}sys
KERNOBJDIR?= ${KERNSRCDIR}/arch/${MACHINE}/compile
KERNCONFDIR?= ${KERNSRCDIR}/arch/${MACHINE}/conf
snap_md:
.for kernel in GENERIC
cd ${KERNCONFDIR} && config \
-b ${KERNOBJDIR}/${kernel} \
-s ${KERNSRCDIR} \
${kernel}
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make && \
cp netbsd ${DESTDIR}/snapshot/netbsd.${kernel}
.endfor
.endif # DESTDIR check

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.10 1998/06/24 08:15:47 fair Exp $
# $NetBSD: Makefile.inc,v 1.11 1998/06/28 09:38:43 fair Exp $
#
# etc.sparc/Makefile.inc -- sparc-specific etc Makefile targets
#
@ -18,11 +18,8 @@ snap_md:
-b ${KERNOBJDIR}/${kernel} \
-s ${KERNSRCDIR} \
${kernel}
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make && \
cp netbsd ${DESTDIR}/snapshot/netbsd.${kernel}
.endfor
cp ${KERNOBJDIR}/GENERIC/netbsd \
${DESTDIR}/snapshot/netbsd
cp ${KERNOBJDIR}/GENERIC_SCSI3/netbsd \
${DESTDIR}/snapshot/netbsd.scsi3
.endif # DESTDIR check

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.5 1998/06/25 17:54:05 fair Exp $
# $NetBSD: Makefile.inc,v 1.6 1998/06/28 09:38:43 fair Exp $
#
# etc.sun3/Makefile.inc -- sun3-specific etc Makefile targets
#
@ -14,19 +14,14 @@ KERNSRCDIR?= ${.CURDIR:C/[^\/]+$//}sys
KERNOBJDIR?= ${KERNSRCDIR}/arch/${MACHINE}/compile
KERNCONFDIR?= ${KERNSRCDIR}/arch/${MACHINE}/conf
snap_md: netbsd
cp ${KERNOBJDIR}/GENERIC/netbsd \
${DESTDIR}/snapshot/netbsd.sun3
cp ${KERNOBJDIR}/GENERIC3X/netbsd \
${DESTDIR}/snapshot/netbsd.sun3x
netbsd:
snap_md:
.for kernel in GENERIC GENERIC3X
cd ${KERNCONFDIR} && config \
-b ${KERNOBJDIR}/${kernel} \
-s ${KERNSRCDIR} \
${kernel}
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make && \
cp netbsd ${DESTDIR}/snapshot/netbsd.${kernel}
.endfor
.endif # DESTDIR check

View File

@ -1,9 +1,27 @@
# $NetBSD: Makefile.inc,v 1.2 1996/10/26 08:12:12 ragge Exp $
# $NetBSD: Makefile.inc,v 1.3 1998/06/28 09:38:44 fair Exp $
#
# etc.vax/Makefile.inc -- vax-specific etc Makefile targets
#
.ifdef DESTDIR
# the regular expression does a basename(1) on .CURDIR so that we don't
# have to keep looking up .. at compile time.
KERNSRCDIR?= ${.CURDIR:C/[^\/]+$//}sys
KERNOBJDIR?= ${KERNSRCDIR}/arch/${MACHINE}/compile
KERNCONFDIR?= ${KERNSRCDIR}/arch/${MACHINE}/conf
snap_md:
.for kernel in GENERIC
cd ${KERNCONFDIR} && config \
-b ${KERNOBJDIR}/${kernel} \
-s ${KERNSRCDIR} \
${kernel}
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make && \
cp netbsd ${DESTDIR}/snapshot/netbsd.${kernel}
.endfor
distribution: pcs750.bin
pcs750.bin:
@ -11,4 +29,4 @@ pcs750.bin:
(cd etc.vax; install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${PCS} \
${DESTDIR}/)
.endif
.endif # DESTDIR check

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.2 1996/05/21 15:15:18 oki Exp $
# $NetBSD: Makefile.inc,v 1.3 1998/06/28 09:38:44 fair Exp $
#
# etc.x68k/Makefile.inc -- x68k-specific etc Makefile targets
#
@ -6,20 +6,21 @@
.ifdef DESTDIR
LOCALTIME= Japan
snap_md: netbsd-generic netbsd-all
cp ${.CURDIR}/../sys/arch/x68k/compile/GENERIC/netbsd.gz \
${DESTDIR}/snapshot/netbsd-generic.gz
cp ${.CURDIR}/../sys/arch/x68k/compile/ALL/netbsd.gz \
${DESTDIR}/snapshot/netbsd-all.gz
# the regular expression does a basename(1) on .CURDIR so that we don't
# have to keep looking up .. at compile time.
netbsd-generic:
cd ${.CURDIR}/../sys/arch/x68k/conf && config GENERIC
cd ${.CURDIR}/../sys/arch/x68k/compile/GENERIC && \
make clean && make depend && make && gzip -9 netbsd
KERNSRCDIR?= ${.CURDIR:C/[^\/]+$//}sys
KERNOBJDIR?= ${KERNSRCDIR}/arch/${MACHINE}/compile
KERNCONFDIR?= ${KERNSRCDIR}/arch/${MACHINE}/conf
netbsd-all:
cd ${.CURDIR}/../sys/arch/x68k/conf && config ALL
cd ${.CURDIR}/../sys/arch/x68k/compile/ALL && \
make clean && make depend && make && gzip -9 netbsd
snap_md:
.for kernel in GENERIC ALL
cd ${KERNCONFDIR} && config \
-b ${KERNOBJDIR}/${kernel} \
-s ${KERNSRCDIR} \
${kernel}
cd ${KERNOBJDIR}/${kernel} && make clean && make depend && make && \
gzip -c -9 netbsd > ${DESTDIR}/snapshot/netbsd.${kernel}.gz
.endfor
.endif # DESTDIR check