Make concurrent builds work.

To stop the errors when building concurrently, we make a number of
changes:

        1.  stop including generated files in *_SOURCES,

        2.  make *-protos.h and *-private.h depend on the *_SOURCES,

        3.  make all objects depend on *-{protos,private}.h,

        4.  in a few places change dir/header.h to $(srcdir)/dir/header.h,

This appears to work for me with make -j16 on a 4-way box.
This commit is contained in:
Roland C. Dowdeswell
2012-08-08 00:04:04 +01:00
parent d9d8e94d66
commit be5afdbf7f
10 changed files with 102 additions and 45 deletions

View File

@@ -17,14 +17,13 @@ kcm_SOURCES = \
glue.c \
headers.h \
kcm_locl.h \
kcm-protos.h \
log.c \
main.c \
protocol.c \
sessions.c \
renew.c
$(srcdir)/kcm-protos.h:
$(srcdir)/kcm-protos.h: $(kcm_SOURCES)
cd $(srcdir); perl ../cf/make-proto.pl -o kcm-protos.h -q -P comment $(kcm_SOURCES) || rm -f kcm-protos.h
$(kcm_OBJECTS): $(srcdir)/kcm-protos.h