tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
make -j8 and .END
It is very handy to be able to accumulate dependencies for targets
like .BEGIN and .END. Our make has supported this for quite some
time. Turns out though, that a makefile like:
all bye:
@echo $@
.END: bye
doesn't work with -j, though it works as expected without.
$ make -f /homes/sjg/make-tests/end
all
bye
$ make -f /homes/sjg/make-tests/end -j2
--- all ---
all
$
the patch below fixes that.
--sjg
Index: job.c
===================================================================
RCS file: /cvsroot/src/usr.bin/make/job.c,v
retrieving revision 1.140
diff -u -p -r1.140 job.c
--- job.c 6 Oct 2008 22:09:21 -0000 1.140
+++ job.c 29 Oct 2008 06:11:31 -0000
@@ -2530,7 +2530,9 @@ JobInterrupt(int runINTERRUPT, int signo
int
Job_Finish(void)
{
- if (postCommands != NILGNODE && !Lst_IsEmpty(postCommands->commands)) {
+ if (postCommands != NILGNODE &&
+ (!Lst_IsEmpty(postCommands->commands) ||
+ !Lst_IsEmpty(postCommands->children))) {
if (errors) {
Error("Errors reported so .END ignored");
} else {
Home |
Main Index |
Thread Index |
Old Index