From: Ian Jackson Date: Fri, 15 Nov 2019 22:56:34 +0000 (+0000) Subject: build system: Do always regenerate version.o X-Git-Tag: v0.5.1~17 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=commitdiff_plain;h=24f0256843ba5ab135d04e552c2424212b1ffd04 build system: Do always regenerate version.o We make two changes which affect only the litle recursive make of version.o. We only build version.o in the little sub-make when relinking and then we want to always do it. So the setting of OBJECTS is pointless, and instead we make version.c depend on FORCE. Signed-off-by: Ian Jackson --- diff --git a/Subdir.sd.mk b/Subdir.sd.mk index aad2f68..93a8ac6 100644 --- a/Subdir.sd.mk +++ b/Subdir.sd.mk @@ -61,7 +61,7 @@ TEST_OBJECTS:=eax-aes-test.o eax-serpent-test.o eax-serpentbe-test.o \ eax-test.o aes.o ifeq (version.o,$(MAKECMDGOALS)) -OBJECTS:=version.o +OBJECTS:= TEST_OBJECTS:= endif @@ -129,7 +129,8 @@ recheck: rm -rf $(addsuffix /d-*, $(TESTDIRS)) $(MAKE) check -version.c: Makefile +.PHONY: FORCE +version.c: FORCE echo "#include \"secnet.h\"" >$@.new @set -ex; if test -e .git && type -p git >/dev/null; then \ v=$$(git describe --match 'v*'); v=$${v#v}; \