From 454128824eb11262d0f1f4c9c30930e01b595a94 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Mon, 21 Mar 2022 11:16:49 +0100 Subject: [PATCH] Fix build targets in Makefile.prebuild - config.h was used as target even when it wasn't generated. This only worked because the 'dummy' target always triggers a full rebuild. It is however better to specify the exact target that is to be rebuilt do avoid confusion. - Explicitly mark 'dummy' as a 'phony' target. Signed-off-by: Egbert Eich --- Makefile.prebuild | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.prebuild b/Makefile.prebuild index 5e8874d42..fe35832e3 100644 --- a/Makefile.prebuild +++ b/Makefile.prebuild @@ -53,7 +53,7 @@ all: getarch_2nd ./getarch_2nd 0 >> $(TARGET_MAKE) ./getarch_2nd 1 >> $(TARGET_CONF) -config.h : c_check f_check getarch +$(TARGET_CONF): c_check f_check getarch perl ./c_check $(TARGET_MAKE) $(TARGET_CONF) $(CC) $(TARGET_FLAGS) $(CFLAGS) ifneq ($(ONLY_CBLAS), 1) perl ./f_check $(TARGET_MAKE) $(TARGET_CONF) $(FC) $(TARGET_FLAGS) @@ -74,7 +74,7 @@ getarch : getarch.c cpuid.S dummy $(CPUIDEMU) avx512=$$(perl c_check - - $(CC) $(TARGET_FLAGS) $(CFLAGS) | grep NO_AVX512); \ $(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) $${avx512:+-D$${avx512}} -o $(@F) getarch.c cpuid.S $(CPUIDEMU) -getarch_2nd : getarch_2nd.c config.h dummy +getarch_2nd : getarch_2nd.c $(TARGET_CONF) dummy ifndef TARGET_CORE $(HOSTCC) -I. $(HOST_CFLAGS) -o $(@F) getarch_2nd.c else @@ -82,3 +82,5 @@ else endif dummy: + +.PHONY: dummy