From 7c9884d2926b86692e0a1907c0b8df217bd21bfd Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 7 Oct 2016 13:58:57 +1030 Subject: [PATCH] build: fix parallel initial build. Signed-off-by: Rusty Russell --- daemon/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/daemon/Makefile b/daemon/Makefile index 68b187680..b904dd18d 100644 --- a/daemon/Makefile +++ b/daemon/Makefile @@ -109,10 +109,15 @@ check-daemon-makefile: @if [ "`ls daemon/*.h | grep -v daemon/gen | tr '\012' ' '`" != "`echo $(DAEMON_HEADERS) ''`" ]; then echo DAEMON_HEADERS incorrect; exit 1; fi # Git submodules are seriously broken. -daemon/jsmn/jsmn.c daemon/jsmn/jsmn.h: +daemon/jsmn/jsmn.h: git submodule update daemon/jsmn/ [ -f $@ ] || git submodule update --init daemon/jsmn/ +# If we tell Make that the above builds both, it runs it twice in +# parallel. So we lie :( +daemon/jsmn/jsmn.c: daemon/jsmn/jsmn.h + [ -f $@ ] + daemon/jsmn.o: daemon/jsmn/jsmn.c $(COMPILE.c) -DJSMN_STRICT=1 $(OUTPUT_OPTION) $<