diff --git a/Makefile b/Makefile index 2d8753ee9..0a0fc25a9 100644 --- a/Makefile +++ b/Makefile @@ -256,9 +256,9 @@ config.vars: # Git doesn't maintain timestamps, so we only regen if sources actually changed: # We place the SHA inside some generated files so we can tell if they need updating. # Usage: $(call SHA256STAMP_CHANGED,prefix) -SHA256STAMP_CHANGED = [ x"`sed -n 's/.*SHA256STAMP://p' $@ 2>/dev/null`" != x"$(1)`cat $^ | sha256sum | cut -c1-64`" ] +SHA256STAMP_CHANGED = [ x"`sed -n 's/.*SHA256STAMP://p' $@ 2>/dev/null`" != x"$(1)`cat $(filter-out FORCE,$^) | sha256sum | cut -c1-64`" ] # Usage: $(call SHA256STAMP,prefix,commentprefix) -SHA256STAMP = echo '$(2) SHA256STAMP:$(1)'`cat $^ | sha256sum | cut -c1-64` >> $@ +SHA256STAMP = echo '$(2) SHA256STAMP:$(1)'`cat $(filter-out FORCE,$^) | sha256sum | cut -c1-64` >> $@ # generate-wire.py --page [header|impl] hdrfilename wirename < csv > file %_wiregen.h: %_wire.csv $(WIRE_GEN_DEPS) @@ -300,6 +300,10 @@ ALL_NONGEN_SRCFILES := $(filter-out gen%.h %printgen.h %wiregen.h,$(ALL_C_HEADER # Every single object file. ALL_OBJS := $(ALL_C_SOURCES:.c=.o) +# We always regen wiregen and printgen files, since SHA256STAMP protects against +# spurious rebuilds. +$(filter %printgen.h %printgen.c %wiregen.h %wiregen.c, $(ALL_C_HEADERS) $(ALL_C_SOURCES)): FORCE + # Generated from PLUGINS definition in plugins/Makefile gen_list_of_builtin_plugins.h : plugins/Makefile Makefile @echo GEN $@ diff --git a/doc/Makefile b/doc/Makefile index 60f3a9c70..d83114a27 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -60,6 +60,8 @@ doc-all: $(MANPAGES) doc/index.rst $(MANPAGES): doc/%: doc/%.md @if $(call SHA256STAMP_CHANGED,); then $(call VERBOSE, "mrkd $<", mrkd $< $@ && $(call SHA256STAMP,,\")); else touch $@; fi +$(MANPAGES): FORCE + doc/protocol-%.svg: test/test_protocol test/test_protocol --svg < test/commits/$*.script > $@