diff --git a/Makefile b/Makefile index 583dbc9665ba..62583726acc5 100644 --- a/Makefile +++ b/Makefile @@ -232,7 +232,7 @@ ALL_TEST_PROGRAMS := ALL_TEST_GEN := ALL_FUZZ_TARGETS := ALL_C_SOURCES := -ALL_C_HEADERS := header_versions_gen.h version_gen.h +ALL_C_HEADERS := # Extra (non C) targets that should be built by default. DEFAULT_TARGETS := @@ -640,7 +640,7 @@ version_gen.h: $(FORCE) endif # That forces this rule to be run every time, too. -header_versions_gen.h: tools/headerversions +header_versions_gen.h: tools/headerversions $(FORCE) @tools/headerversions $@ # We make a static library, this way linker can discard unused parts. diff --git a/lightningd/Makefile b/lightningd/Makefile index e9766343b60b..77f86286d4bc 100644 --- a/lightningd/Makefile +++ b/lightningd/Makefile @@ -69,6 +69,9 @@ ALL_C_SOURCES += $(LIGHTNINGD_SRC) $(LIGHTNINGD_SRC_NOHDR) ALL_C_HEADERS += $(LIGHTNINGD_HDRS) ALL_PROGRAMS += lightningd/lightningd +# We explicitly check header versions in lightningd.c +lightningd/lightningd.o: header_versions_gen.h + # Common source we use. LIGHTNINGD_COMMON_OBJS := \ common/addr.o \