From 24f87fa4ec6797358ddb2cd0750425de90132187 Mon Sep 17 00:00:00 2001 From: niry1 Date: Tue, 9 Jun 2026 18:17:40 +0300 Subject: [PATCH] Issue #427 - Prevent build_info regen on make run_tests and install --- specs/src/setup.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/specs/src/setup.py b/specs/src/setup.py index 8323792..5f6977e 100644 --- a/specs/src/setup.py +++ b/specs/src/setup.py @@ -186,12 +186,18 @@ def python_search(arg): LIBOBJS = $(CCSRC:.cc=.{}) TESTOBJS = $(TESTSRC:.cc=.{}) -BUILD_INFO = utils/build_info.h +# build_info.h is regenerated only when one of the core objects would be +# rebuilt (Config.o is excluded to avoid a cycle, since Config.cc includes +# build_info.h). This keeps an up-to-date tree a no-op instead of forcing a +# spurious header regeneration, Config.o recompile and relink on every build. +BUILD_INFO_DEPS = $(filter-out processing/Config.o processing/Config.obj,$(LIBOBJS)) #default goal -some: directories $(BUILD_INFO) $(EXE_DIR)/specs $(EXE_DIR)/specs-autocomplete +some: directories $(EXE_DIR)/specs $(EXE_DIR)/specs-autocomplete -all: directories $(BUILD_INFO) $(TEST_EXES) +all: directories $(TEST_EXES) + +specs: directories $(EXE_DIR)/specs %.obj : %.cc $(CXX) $(CPPFLAGS) /Fo$@ /c $< @@ -214,9 +220,9 @@ def python_search(arg): body2 = \ """ -.PHONY: utils/build_info.h +.PHONY: specs -utils/build_info.h: +utils/build_info.h: $(BUILD_INFO_DEPS) @python3 generate_build_info.py run_tests: $(TEST_EXES)