tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: build.sh: set creation is serialized
On Wed, 30 Apr 2008, Andrew Doran wrote:
> In src/src/distrib/sets/Makefile:
[...]
> Serialise making the "sets" tarballs in the maketars target.
[...]
Here's a patch that changes the default to make the sets in parallel,
and adds a knob to make them in series.
--apb (Alan Barrett)
Index: src/distrib/sets/Makefile
===================================================================
--- Makefile 16 Mar 2008 07:02:22 -0000 1.57
+++ Makefile 2 May 2008 09:31:05 -0000
@@ -110,12 +110,24 @@
${SETSCMD} ./checkflist -x ${CHECKFLIST_FLAGS}
-# Note that the .WAIT inside the ${MAKETARSETS:@...} loop is not
-# logically necessary, but many systems exhibit poor performance when
-# running multiple parallel disk-intensive processes.
+# If MAKETARS_SERIAL is set to "YES" or "yes", then the tar sets will be
+# made in series, even if make's "-j" flag requests multiple parallel
+# jobs. This is useful on systems that exhibit poor performance when
+# running multiple parallel disk-intensive operations. The default is
+# MAKETARS_SERIAL=NO, which will obey the "-j" flag passed to the make
+# command.
+#
+MAKETARS_SERIAL?= NO
+.if empty(MAKETARS_SERIAL:M[Yy][Ee][Ss])
+_MAKETARS_WAIT= # empty
+.else
+_MAKETARS_WAIT= .WAIT
+.endif
+
maketars: .PRECIOUS .PHONY check_DESTDIR check_RELEASEDIR \
sanitise_METALOG checkflist_if_DESTDIR .WAIT \
- maketarsetup .WAIT ${MAKETARSETS:@.TARS.@.WAIT do-${.TARS.}@}
+ maketarsetup .WAIT \
+ ${MAKETARSETS:@.TARS.@${_MAKETARS_WAIT} do-${.TARS.}@}
@true
maketarsetup: .EXEC
Home |
Main Index |
Thread Index |
Old Index