Skip to content

Commit 4541288

Browse files
committed
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 <eich@suse.com>
1 parent 4dbdc28 commit 4541288

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile.prebuild

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ all: getarch_2nd
5353
./getarch_2nd 0 >> $(TARGET_MAKE)
5454
./getarch_2nd 1 >> $(TARGET_CONF)
5555

56-
config.h : c_check f_check getarch
56+
$(TARGET_CONF): c_check f_check getarch
5757
perl ./c_check $(TARGET_MAKE) $(TARGET_CONF) $(CC) $(TARGET_FLAGS) $(CFLAGS)
5858
ifneq ($(ONLY_CBLAS), 1)
5959
perl ./f_check $(TARGET_MAKE) $(TARGET_CONF) $(FC) $(TARGET_FLAGS)
@@ -74,11 +74,13 @@ getarch : getarch.c cpuid.S dummy $(CPUIDEMU)
7474
avx512=$$(perl c_check - - $(CC) $(TARGET_FLAGS) $(CFLAGS) | grep NO_AVX512); \
7575
$(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) $${avx512:+-D$${avx512}} -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
7676

77-
getarch_2nd : getarch_2nd.c config.h dummy
77+
getarch_2nd : getarch_2nd.c $(TARGET_CONF) dummy
7878
ifndef TARGET_CORE
7979
$(HOSTCC) -I. $(HOST_CFLAGS) -o $(@F) getarch_2nd.c
8080
else
8181
$(HOSTCC) -I. $(HOST_CFLAGS) -DBUILD_KERNEL -o $(@F) getarch_2nd.c
8282
endif
8383

8484
dummy:
85+
86+
.PHONY: dummy

0 commit comments

Comments
 (0)