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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-07-06 17:06:50 +09:30
parent 016e48f8d3
commit b08791d4fa
2 changed files with 2 additions and 0 deletions

View file

@ -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

View file

@ -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