From 0c84302d9a307c12121a100e4965f6e965e1663c Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sun, 18 Oct 2020 22:06:47 -0400 Subject: [PATCH] lib: don't rebuild libcrucible unless there is a version change If we create an identical .version.cc then don't bother keeping it. This prevents libcrucible from rebuilding if there are no other changes, which in turn prevents all the binaries from rebuilding unconditionally. Signed-off-by: Zygo Blaxell --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 0328039..75184b5 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -40,7 +40,7 @@ depends.mk: $(CRUCIBLE_OBJS:%.o=.depends/%.dep) .version.cc: configure.h Makefile ../makeflags $(CRUCIBLE_OBJS:.o=.cc) ../include/crucible/*.h echo "namespace crucible { const char *VERSION = \"$(TAG)\"; }" > $@.new - mv -f $@.new $@ + if ! cmp "$@.new" "$@"; then mv -fv $@.new $@; fi include depends.mk