From e1ce6b79dc1682de0ccb1ca4f20a95e9b9fd0536 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 6 Jul 2023 16:15:14 +0930 Subject: [PATCH] Makefile: add dependencies to fix parallel build. ``` cc tools/headerversions.c tools/headerversions.c:3:10: fatal error: 'config.h' file not found #include "config.h" ^~~~~~~~~~ 1 error generated. make: *** [Makefile:299: tools/headerversions.o] Error 1 ``` And then: ``` tools/test/enum.c:1:10: fatal error: 'config.h' file not found #include "config.h" ^~~~~~~~~~ 1 error generated. make: *** [Makefile:299: tools/test/enum.o] Error 1 ``` Signed-off-by: Rusty Russell --- tools/Makefile | 1 + tools/test/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/Makefile b/tools/Makefile index a8241f61270c..52384caf0afa 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -15,6 +15,7 @@ TOOLS_COMMON_OBJS = common/utils.o tools/headerversions: $(FORCE) tools/headerversions.o libccan.a @trap "rm -f $@.tmp.$$$$" EXIT; $(LINK.o) tools/headerversions.o libccan.a $(LOADLIBES) $(LDLIBS) -o $@.tmp.$$$$ && mv $@.tmp.$$$$ $@ +tools/headerversions.o: ccan/config.h tools/check-bolt: tools/check-bolt.o $(TOOLS_COMMON_OBJS) tools/hsmtool: tools/hsmtool.o $(TOOLS_COMMON_OBJS) $(BITCOIN_OBJS) common/amount.o common/autodata.o common/bech32.o common/bigsize.o common/configdir.o common/configvar.o common/derive_basepoints.o common/descriptor_checksum.o common/hsm_encryption.o common/node_id.o common/type_to_string.o common/version.o wire/fromwire.o wire/towire.o diff --git a/tools/test/Makefile b/tools/test/Makefile index 39258d9c685e..e067590dc0fc 100644 --- a/tools/test/Makefile +++ b/tools/test/Makefile @@ -32,6 +32,7 @@ TOOL_TEST_COMMON_OBJS := \ TOOLS_WIRE_DEPS := $(BOLT_DEPS) tools/test/test_cases $(wildcard tools/gen/*_template) +tools/test/enum.o: ccan/config.h $(TOOL_TEST_OBJS) $(TOOL_GEN_OBJS): $(TOOL_GEN_HEADER) $(TOOL_TEST_PROGRAMS): $(TOOL_TEST_COMMON_OBJS) $(TOOL_GEN_OBJS) tools/test/enum.o