Parallel make: additional fixes
authorMarc Dionne <marc.c.dionne@gmail.com>
Sat, 11 Jul 2009 22:18:08 +0000 (18:18 -0400)
committerDerrick Brashear <shadow@dementia.org>
Sat, 11 Jul 2009 23:35:25 +0000 (17:35 -0600)
Testing turned up a few more errors with parallel builds:

- Linux: Apply a similar fix for "make dest" to the one in the previous
patch for "make install".  Avoid conflict between DESTDIRS and COMPDIRS,
which also prevents unneeded duplicate work.

- Fix a couple of cases where we have 2 targets in a single rule with a
command that generates both of them.  Two parallel jobs can run this
command at the same time, with missing or corrrupted files as a result.
The workaround: make one of the targets build the files, and make the
second target depend on the other one.

Reviewed-on: http://gerrit.openafs.org/57
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/bozo/Makefile.in
src/kauth/Makefile.in
src/libafs/MakefileProto.LINUX.in

index 306fa47..d148c6b 100644 (file)
@@ -76,7 +76,9 @@ bosint.cs.c: bosint.h
 bosint.ss.c: bosint.h
 bosint.xdr.c: bosint.h
 
-bnode.h boserr.c: bnode.p.h boserr.et
+bnode.h: boserr.c
+
+boserr.c: bnode.p.h boserr.et
        $(RM) -f boserr.c bnode.h
        ${COMPILE_ET} -p ${srcdir} boserr -h bnode
 
index 121d0e4..8f98dc4 100644 (file)
@@ -103,7 +103,9 @@ authclient.o: authclient.c ${INCLS}
 
 kaerrors.o: kaerrors.c
 
-kaerrors.c kautils.h: kaerrors.et kautils.p.h
+kautils.h: kaerrors.c
+
+kaerrors.c: kaerrors.et kautils.p.h
        $(RM) -f kautils.h kaerrors.c
        ${COMPILE_ET} -p ${srcdir} kaerrors -h kautils
 
index 823928b..e3babb5 100644 (file)
@@ -170,7 +170,9 @@ setup:
 
 ${INSTDIRS}:
 
-${COMPDIRS} ${DESTDIRS}: setup
+${DESTDIRS}:
+
+${COMPDIRS}: setup
        $(RM) -f h 
        $(RM) -f sys
        $(RM) -f netinet