diff options
author | Thomas Heijligen <thomas.heijligen@secunet.de> | 2021-10-12 15:16:46 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-10-15 14:35:12 +0000 |
commit | cf542aa1ce3caabe5184fde77a39bbd3cca763ef (patch) | |
tree | 499cb480cbea0fdc5c71c46422eef469fa9bf803 /Makefile | |
parent | ba275d8bdb1eacd357b942b0aa7df5612f751fc5 (diff) | |
download | flashrom-cf542aa1ce3caabe5184fde77a39bbd3cca763ef.tar.gz flashrom-cf542aa1ce3caabe5184fde77a39bbd3cca763ef.tar.bz2 flashrom-cf542aa1ce3caabe5184fde77a39bbd3cca763ef.zip |
Makefile: move determination test for the architecture to Makefile.d
Move the test code for architecture detection in a extra directory to
split it from the main flashrom code.
Change-Id: I29ce73be9c5cbe259a2471f8eea2f8745b68cdfa
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58269
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -163,8 +163,7 @@ endif # is ever used (of course), but should come after any lines setting CC because # the lines below use CC itself. override TARGET_OS := $(call c_macro_test, Makefile.d/os_test.h) -override ARCH := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E archtest.c 2>/dev/null \ - | tail -1 | cut -f 2 -d'"')) +override ARCH := $(call c_macro_test, Makefile.d/arch_test.h) override ENDIAN := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E endiantest.c 2>/dev/null \ | tail -1)) @@ -866,11 +865,8 @@ compiler: featuresavailable echo "found." || { echo "not found."; \ rm -f .test.c .test$(EXEC_SUFFIX); exit 1; }; } 2>>$(BUILD_DETAILS_FILE); echo $? >&3 ; } | tee -a $(BUILD_DETAILS_FILE) >&4; } 3>&1;} | { read rc ; exit ${rc}; } } 4>&1 @rm -f .test.c .test$(EXEC_SUFFIX) - @printf "Target arch is " - @# FreeBSD wc will output extraneous whitespace. - @echo $(ARCH)|wc -w|grep -q '^[[:blank:]]*1[[:blank:]]*$$' || \ - ( echo "unknown (\"$(ARCH)\"). Aborting."; exit 1) - @printf "%s\n" '$(ARCH)' + @echo Target arch is $(ARCH) + @if [ $(ARCH) = unknown ]; then echo Aborting.; exit 1; fi @echo Target OS is $(TARGET_OS) @if [ $(TARGET_OS) = unknown ]; then echo Aborting.; exit 1; fi ifeq ($(TARGET_OS), libpayload) |