From 983821fd73393aa2389dc41f07a63b5a61eb05c6 Mon Sep 17 00:00:00 2001 From: lukem Date: Fri, 12 Apr 2002 03:21:09 +0000 Subject: [PATCH] - replace image_md_post: target with IMAGE_MD_POST variable, and use that after building ${IMAGE} - use ${IMAGEBUILT} to ensure that IMAGE_MD_POST is only run if IMAGE changes --- distrib/amiga/miniroot/Makefile.inc | 5 ++--- distrib/hp300/miniroot/Makefile.inc | 4 +--- distrib/miniroot/Makefile | 17 +++++++++-------- distrib/mvme68k/miniroot/Makefile.inc | 5 +---- distrib/pmax/miniroot/Makefile.inc | 5 ++--- distrib/sparc/miniroot/Makefile.inc | 10 +++++----- distrib/sun2/miniroot/Makefile | 5 ++--- distrib/sun3/miniroot/Makefile | 5 ++--- distrib/vax/miniroot/Makefile.inc | 5 ++--- 9 files changed, 26 insertions(+), 35 deletions(-) diff --git a/distrib/amiga/miniroot/Makefile.inc b/distrib/amiga/miniroot/Makefile.inc index 239898a20d25..2ca6bd65524e 100644 --- a/distrib/amiga/miniroot/Makefile.inc +++ b/distrib/amiga/miniroot/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.7 2002/03/06 12:04:50 lukem Exp $ +# $NetBSD: Makefile.inc,v 1.8 2002/04/12 03:21:09 lukem Exp $ IMAGESIZE= 5m IMAGEENDIAN= be @@ -8,5 +8,4 @@ IMAGEDEPENDS+= ${ARCHDIR}/disktab.shadow ${ARCHDIR}/dot.profile \ ${DESTDIR}/boot.amiga ${DESTDIR}/etc/spwd.db \ ${KERNOBJDIR}/INSTALL/netbsd -image_md_post: - dd if=${DESTDIR}/usr/mdec/bootxx_ffs of=${IMAGE} bs=8192 conv=notrunc +IMAGE_MD_POST= dd if=${DESTDIR}/usr/mdec/bootxx_ffs of=${IMAGE} bs=8192 conv=notrunc diff --git a/distrib/hp300/miniroot/Makefile.inc b/distrib/hp300/miniroot/Makefile.inc index 0196680e82b3..2cbcb0f4fbf4 100644 --- a/distrib/hp300/miniroot/Makefile.inc +++ b/distrib/hp300/miniroot/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.6 2002/03/14 23:17:00 gmcgarry Exp $ +# $NetBSD: Makefile.inc,v 1.7 2002/04/12 03:21:10 lukem Exp $ IMAGESIZE= 7m IMAGEENDIAN= be @@ -8,5 +8,3 @@ IMAGEDEPENDS+= ${ARCHDIR}/dot.profile ${ARCHDIR}/install.md \ ${DESTDIR}/etc/disktab \ ${KERNOBJDIR}/INSTALL/netbsd \ ${_SRC_TOP_}/share/termcap/termcap.src - -image_md_post: diff --git a/distrib/miniroot/Makefile b/distrib/miniroot/Makefile index 76e0485f95d0..53ff65dad40e 100644 --- a/distrib/miniroot/Makefile +++ b/distrib/miniroot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.56 2002/04/12 02:34:21 lukem Exp $ +# $NetBSD: Makefile,v 1.57 2002/04/12 03:21:12 lukem Exp $ .include .include "${_SRC_TOP_}/distrib/Makefile.inc" @@ -23,20 +23,21 @@ PARSELISTENV= ARCHDIR=${ARCHDIR:Q} \ .include "${ARCHDIR}/Makefile.inc" +IMAGEBUILT= image.built +CLEANFILES+= ${IMAGEBUILT} +IMAGE_MD_POST?= true -realall: check_DESTDIR .WAIT image +realall: check_DESTDIR .WAIT ${IMAGEBUILT} -release: check_RELEASEDIR .WAIT image +release: check_RELEASEDIR .WAIT ${IMAGEBUILT} mkdir -p ${RELEASEDIR}/installation/miniroot gzip -c -9 < ${.OBJDIR}/miniroot.fs \ > ${RELEASEDIR}/installation/miniroot/miniroot.fs.gz ${MAKESUMS} -t ${RELEASEDIR}/installation/miniroot miniroot.fs.gz -image: ${IMAGE} image_md_post - -image_md_post: -# nothing here; refer to machine-dependant ${ARCHDIR}/Makefile.inc - +${IMAGEBUILT}: ${IMAGE} + ${IMAGE_MD_POST} \ + && touch ${IMAGEBUILT} .include "${DISTRIBDIR}/common/Makefile.crunch" .if defined(MAKEDEVTARGETS) diff --git a/distrib/mvme68k/miniroot/Makefile.inc b/distrib/mvme68k/miniroot/Makefile.inc index cb0634886e9c..5f6631f04bb4 100644 --- a/distrib/mvme68k/miniroot/Makefile.inc +++ b/distrib/mvme68k/miniroot/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.5 2002/04/03 19:23:08 scw Exp $ +# $NetBSD: Makefile.inc,v 1.6 2002/04/12 03:21:10 lukem Exp $ IMAGESIZE= 7m MAKEFS_FLAGS= -o density=4096 @@ -9,6 +9,3 @@ IMAGEDEPENDS+= ${ARCHDIR}/dot.profile ${ARCHDIR}/install.md \ ${KERNOBJDIR}/GENERIC/netbsd \ ${_SRC_TOP_}/share/termcap/termcap.src LISTS+= ${DISTRIBDIR}/common/list.sysinst - -image_md_post: - diff --git a/distrib/pmax/miniroot/Makefile.inc b/distrib/pmax/miniroot/Makefile.inc index 59dbe290bf14..04a89f45fe3f 100644 --- a/distrib/pmax/miniroot/Makefile.inc +++ b/distrib/pmax/miniroot/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.8 2002/04/03 06:38:26 lukem Exp $ +# $NetBSD: Makefile.inc,v 1.9 2002/04/12 03:21:11 lukem Exp $ IMAGESIZE= 32m MAKEFS_FLAGS= -f 15 @@ -13,5 +13,4 @@ IMAGEDEPENDS+= ${ARCHDIR}/dot.profile ${ARCHDIR}/termcap.rcons \ ${KERNOBJDIR}/GENERIC/netbsd.ecoff \ ${KERNOBJDIR}/INSTALL/nfsnetbsd.ecoff -image_md_post: - ${INSTALLBOOT} -m ${MACHINE} ${IMAGE} ${DESTDIR}/usr/mdec/bootxx_ffs +IMAGE_MD_POST= ${INSTALLBOOT} -m ${MACHINE} ${IMAGE} ${DESTDIR}/usr/mdec/bootxx_ffs diff --git a/distrib/sparc/miniroot/Makefile.inc b/distrib/sparc/miniroot/Makefile.inc index c2473986a48f..01ce6ff4a915 100644 --- a/distrib/sparc/miniroot/Makefile.inc +++ b/distrib/sparc/miniroot/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.3 2002/04/10 14:44:02 lukem Exp $ +# $NetBSD: Makefile.inc,v 1.4 2002/04/12 03:21:11 lukem Exp $ IMAGESIZE= 7296k MAKEFS_FLAGS= -o density=4k @@ -11,7 +11,7 @@ IMAGEDEPENDS+= ${ARCHDIR}/../install.md ${ARCHDIR}/dot.profile \ ${DESTDIR}/usr/mdec/boot ${DESTDIR}/usr/share/misc/magic \ ${KERNOBJDIR}/GENERIC/netbsd -# XXXIMAGE: binstall needs to be MI and work on image files -image_md_post: - ${DESTDIR}/usr/mdec/binstall -f miniroot.fs -m ${DESTDIR}/usr/mdec \ - -i ${SPARCINSTALLBOOT} -v ffs ${TARGETDIR} +# XXXDISTRIB: binstall needs to be MI and work on image files +IMAGE_MD_POST= ${DESTDIR}/usr/mdec/binstall -f miniroot.fs \ + -m ${DESTDIR}/usr/mdec -i ${SPARCINSTALLBOOT} \ + -v ffs ${TARGETDIR} diff --git a/distrib/sun2/miniroot/Makefile b/distrib/sun2/miniroot/Makefile index cd2e8974f31a..432b587978f8 100644 --- a/distrib/sun2/miniroot/Makefile +++ b/distrib/sun2/miniroot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2002/03/06 12:14:26 lukem Exp $ +# $NetBSD: Makefile,v 1.5 2002/04/12 03:21:11 lukem Exp $ TOP= ${.CURDIR}/.. @@ -82,8 +82,7 @@ release: .else # RELEASEDIR release: ${IMAGE}.gz -mkdir -p ${RELEASEDIR}/installation/miniroot - cp -p ${IMAGE}.gz \ - ${RELEASEDIR}/installation/miniroot/${IMAGE}.gz + ${RELINSTALL} ${IMAGE}.gz ${RELEASEDIR}/installation/miniroot .endif # RELEASEDIR # Standard rules needed by the above... diff --git a/distrib/sun3/miniroot/Makefile b/distrib/sun3/miniroot/Makefile index 4ac12b24fe8b..bf019ea6edd7 100644 --- a/distrib/sun3/miniroot/Makefile +++ b/distrib/sun3/miniroot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2002/03/06 12:15:19 lukem Exp $ +# $NetBSD: Makefile,v 1.23 2002/04/12 03:21:11 lukem Exp $ TOP= ${.CURDIR}/.. @@ -80,8 +80,7 @@ release: .else # RELEASEDIR release: ${IMAGE}.gz -mkdir -p ${RELEASEDIR}/installation/miniroot - cp -p ${IMAGE}.gz \ - ${RELEASEDIR}/installation/miniroot/${IMAGE}.gz + ${RELINSTALL} ${IMAGE}.gz ${RELEASEDIR}/installation/miniroot .endif # RELEASEDIR # Standard rules needed by the above... diff --git a/distrib/vax/miniroot/Makefile.inc b/distrib/vax/miniroot/Makefile.inc index a1c7972412d9..5ad2ea272672 100644 --- a/distrib/vax/miniroot/Makefile.inc +++ b/distrib/vax/miniroot/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.9 2002/04/03 06:06:43 lukem Exp $ +# $NetBSD: Makefile.inc,v 1.10 2002/04/12 03:21:12 lukem Exp $ IMAGESIZE= 7m MAKEFS_FLAGS= -o density=5k @@ -13,5 +13,4 @@ IMAGEDEPENDS+= ${ARCHDIR}/../install.md \ ${KERNOBJDIR}/GENERIC/netbsd \ ${_SRC_TOP_}/share/termcap/termcap.src -image_md_post: - ${INSTALLBOOT} -m ${MACHINE} ${IMAGE} ${DESTDIR}/usr/mdec/xxboot +IMAGE_MD_POST= ${INSTALLBOOT} -m ${MACHINE} ${IMAGE} ${DESTDIR}/usr/mdec/xxboot