Subject: Re: make: making .WAIT recursive
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Chuck Silvers <chuq@chuq.com>
List: tech-toolchain
Date: 02/13/2006 08:31:08
--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
if the problem at hand is src/etc/Makefile, how about the attached patch?
it replaces all the .WAITs with equivalent (but functional) dependencies.
-Chuck
--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="diff.etc-mk"
Index: src/etc/Makefile
===================================================================
RCS file: /cvsroot/src/etc/Makefile,v
retrieving revision 1.322
diff -u -p -r1.322 Makefile
--- src/etc/Makefile 11 Feb 2006 20:56:29 -0000 1.322
+++ src/etc/Makefile 13 Feb 2006 16:30:14 -0000
@@ -41,11 +41,6 @@
.include <bsd.kernobj.mk> # For KERNSRCDIR, KERNOBJDIR, ...
.include <bsd.endian.mk> # For TARGET_ENDIANNESS
-# XXX: .WAIT doesn't work the way this makefile needs it to.
-# So until that is fixed.
-# Actually that isn't enough either.... snap_pre must not depend on anything
-.NOTPARALLEL:
-
.MAKEOVERRIDES+= USETOOLS
TZDIR= /usr/share/zoneinfo
@@ -141,7 +136,7 @@ PWD_MKDB_ENDIAN=
# distribution --
# Build a distribution
#
-distribution: .PHONY check_DESTDIR .WAIT distrib-dirs
+distribution: .PHONY check_DESTDIR distrib-dirs
.if !defined(DISTRIBUTION_DONE)
.if !defined(INSTALL_DONE)
${MAKEDIRTARGET} ${NETBSDSRCDIR} include _DISTRIB=
@@ -392,10 +387,8 @@ distrib-dirs: .PHONY check_DESTDIR
# release, snapshot --
# Build a full distribution including kernels & install media.
#
-release snapshot: .PHONY check_DESTDIR check_RELEASEDIR .WAIT \
- distribution .WAIT \
- snap_pre .WAIT snap_kern .WAIT \
- snap_post .WAIT snap_md_post
+release snapshot: .PHONY check_DESTDIR check_RELEASEDIR distribution \
+ snap_pre snap_kern snap_post snap_md_post
${MAKEDIRTARGET} ${NETBSDSRCDIR}/distrib/sets sets
${MAKESUMS} -A -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets \
${KERNEL_SETS:@.SETS.@kern-${.SETS.}.tgz@}
@@ -413,7 +406,7 @@ CDROM.image=${RELEASEDIR}/${RELEASEMACHI
CDROM.dir= ${.OBJDIR}/cdrom.dir
CDROM.pathlist= ${.OBJDIR}/cdrom.pathlist
-iso-image: .PHONY check_DESTDIR check_RELEASEDIR .WAIT iso-image-md-post
+iso-image: .PHONY check_DESTDIR check_RELEASEDIR iso-image-md-post
${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom '*.iso'
@echo "iso-image created as: ${CDROM.image}"
@@ -431,8 +424,8 @@ iso-image-setup: .PHONY check_RELEASEDIR
# iso-image-mi --
# Create the image after the MD operations have completed.
#
-iso-image-mi: .PHONY check_DESTDIR check_RELEASEDIR .WAIT \
- iso-image-setup .WAIT iso-image-md-pre
+iso-image-mi: .PHONY check_DESTDIR check_RELEASEDIR \
+ iso-image-setup iso-image-md-pre
@if ! ${MKISOFS} --version; then \
echo "install pkgsrc/sysutils/cdrtools and run 'make iso-image'." ; \
false; \
@@ -444,21 +437,21 @@ iso-image-mi: .PHONY check_DESTDIR check
# Setup ${CDROM.dir} to produce a bootable CD image.
# Overridden by etc.$MACHINE/Makefile.inc
#
-iso-image-md-pre: .PHONY check_DESTDIR check_RELEASEDIR
+iso-image-md-pre: .PHONY check_DESTDIR check_RELEASEDIR iso-image-setup
# (empty -- look in the machine-dependent Makefile.inc)
# iso-image-md-post --
# Fixup the CD-image to be bootable.
# Overridden by etc.$MACHINE/Makefile.inc
#
-iso-image-md-post: .PHONY check_DESTDIR check_RELEASEDIR .WAIT iso-image-mi
+iso-image-md-post: .PHONY check_DESTDIR check_RELEASEDIR iso-image-mi
# (empty -- look in the machine-dependent Makefile.inc)
# snap_pre --
# Create ${RELEASEDIR} and necessary subdirectories.
#
-snap_pre: .PHONY # check_DESTDIR check_RELEASEDIR
+snap_pre: .PHONY check_DESTDIR check_RELEASEDIR distribution
${INSTALL} -d -m 755 ${RELEASEDIR}
.if ${MKUPDATE} == "no"
# Could be a mount point, ignore the errors
@@ -472,7 +465,7 @@ snap_pre: .PHONY # check_DESTDIR check_R
# snap_post --
# Build the install media and notes from distrib
#
-snap_post: .PHONY .MAKE check_DESTDIR check_RELEASEDIR
+snap_post: .PHONY .MAKE check_DESTDIR check_RELEASEDIR snap_kern
.if ${MKUPDATE} == "no"
cd ${NETBSDSRCDIR}/distrib && ${MAKE} cleandir
.endif
@@ -550,7 +543,7 @@ build_kernels: .PHONY ${_KERNELS_TO_BUIL
#
.for configfile in ${KERNEL_SETS} # {
_KERNELSETS_TO_BUILD+=kernset-${configfile}
-kernset-${configfile}: .PHONY
+kernset-${configfile}: .PHONY kern-${configfile}
@ kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile}`; \
kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \
@@ -586,7 +579,7 @@ build_kernelsets: ${_KERNELSETS_TO_BUILD
#
.for configfile in ${KERNEL_SETS} ${EXTRA_KERNELS} # {
_RELEASEKERNELS_TO_BUILD+=releasekern-${configfile}
-releasekern-${configfile}: .PHONY
+releasekern-${configfile}: .PHONY kern-${configfile}
@ kernlist=`${GETKERNELAWK} ${KERNCONFDIR}/${configfile:C/.*\///}`; \
kerndir=${KERNOBJDIR}/${configfile:C/.*\///}; \
kernsuffixes="${KERNEL_SUFFIXES:S/^/./}"; \
@@ -607,11 +600,9 @@ releasekern-${configfile}: .PHONY
build_releasekernels: ${_RELEASEKERNELS_TO_BUILD}
# snap_kern --
-# build the kernels, then the sets & release kernels
+# build the kernels, kernel sets & release kernels
#
-snap_kern: .PHONY check_DESTDIR check_RELEASEDIR .WAIT \
- build_kernels .WAIT \
- build_kernelsets build_releasekernels
+snap_kern: snap_pre build_kernels build_kernelsets build_releasekernels
.endif # !target(snap_kern) # }
@@ -620,7 +611,7 @@ snap_kern: .PHONY check_DESTDIR check_RE
# Machine dependent distribution media operations.
# Overridden by etc.$MACHINE/Makefile.inc
#
-snap_md_post: .PHONY check_DESTDIR check_RELEASEDIR
+snap_md_post: .PHONY check_DESTDIR check_RELEASEDIR snap_post
# (empty -- look in the machine-dependent Makefile.inc)
--k+w/mQv8wyuph6w0--