1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-28 15:33:42 +02:00

Makefile: print compile commands of configure steps to the build details file

This allows for even more easy debugging of build failures due to
problems with libraries.

Corresponding to flashrom svn r1919.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
Stefan Tauner 2016-01-24 22:37:10 +00:00
parent ae61651bfa
commit c83ddc1769

View File

@ -856,6 +856,7 @@ export COMPILER_TEST
compiler: featuresavailable compiler: featuresavailable
@printf "Checking for a C compiler... " | tee -a $(BUILD_DETAILS_FILE) @printf "Checking for a C compiler... " | tee -a $(BUILD_DETAILS_FILE)
@echo "$$COMPILER_TEST" > .test.c @echo "$$COMPILER_TEST" > .test.c
@printf "\nexec: %s\n" "$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .test.c -o .test$(EXEC_SUFFIX)" >>$(BUILD_DETAILS_FILE)
@{ { { { { $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .test.c -o .test$(EXEC_SUFFIX) >&2 && \ @{ { { { { $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .test.c -o .test$(EXEC_SUFFIX) >&2 && \
echo "found." || { echo "not found."; \ 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); exit 1; }; } 2>>$(BUILD_DETAILS_FILE); echo $? >&3 ; } | tee -a $(BUILD_DETAILS_FILE) >&4; } 3>&1;} | { read rc ; exit ${rc}; } } 4>&1
@ -938,6 +939,7 @@ hwlibs: compiler
ifeq ($(CHECK_LIBPCI), yes) ifeq ($(CHECK_LIBPCI), yes)
@printf "Checking for libpci headers... " | tee -a $(BUILD_DETAILS_FILE) @printf "Checking for libpci headers... " | tee -a $(BUILD_DETAILS_FILE)
@echo "$$LIBPCI_TEST" > .test.c @echo "$$LIBPCI_TEST" > .test.c
@printf "\nexec: %s\n" "$(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o" >>$(BUILD_DETAILS_FILE)
@{ { { { { $(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o >&2 && \ @{ { { { { $(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o >&2 && \
echo "found." || { echo "not found."; echo; \ echo "found." || { echo "not found."; echo; \
echo "Please install libpci headers."; \ echo "Please install libpci headers."; \
@ -945,14 +947,17 @@ ifeq ($(CHECK_LIBPCI), yes)
rm -f .test.c .test.o; 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.o; exit 1; }; } 2>>$(BUILD_DETAILS_FILE); echo $? >&3 ; } | tee -a $(BUILD_DETAILS_FILE) >&4; } 3>&1;} | { read rc ; exit ${rc}; } } 4>&1
@printf "Checking version of pci_get_dev... " | tee -a $(BUILD_DETAILS_FILE) @printf "Checking version of pci_get_dev... " | tee -a $(BUILD_DETAILS_FILE)
@echo "$$PCI_GET_DEV_TEST" > .test.c @echo "$$PCI_GET_DEV_TEST" > .test.c
@printf "\nexec: %s\n" "$(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o" >>$(BUILD_DETAILS_FILE)
@ { $(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o >&2 && \ @ { $(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o >&2 && \
( echo "new version (including PCI domain parameter)."; echo "OLD_PCI_GET_DEV := no" >> .libdeps ) || \ ( echo "new version (including PCI domain parameter)."; echo "OLD_PCI_GET_DEV := no" >> .libdeps ) || \
( echo "old version (without PCI domain parameter)."; echo "OLD_PCI_GET_DEV := yes" >> .libdeps ) } 2>>$(BUILD_DETAILS_FILE) | tee -a $(BUILD_DETAILS_FILE) ( echo "old version (without PCI domain parameter)."; echo "OLD_PCI_GET_DEV := yes" >> .libdeps ) } 2>>$(BUILD_DETAILS_FILE) | tee -a $(BUILD_DETAILS_FILE)
@printf "Checking if libpci is present and sufficient... " | tee -a $(BUILD_DETAILS_FILE) @printf "Checking if libpci is present and sufficient... " | tee -a $(BUILD_DETAILS_FILE)
@printf "\nexec: %s\n" "$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(PCILIBS)" >>$(BUILD_DETAILS_FILE)
@{ { { { $(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(PCILIBS) 2>>$(BUILD_DETAILS_FILE) >&2 && \ @{ { { { $(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(PCILIBS) 2>>$(BUILD_DETAILS_FILE) >&2 && \
echo "yes." || { echo "no."; \ echo "yes." || { echo "no."; \
printf "Checking if libz+libpci are present and sufficient..." ; \ printf "Checking if libz+libpci are present and sufficient..." ; \
{ $(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(PCILIBS) -lz >&2 && \ { printf "\nexec: %s\n" "$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(PCILIBS) -lz" >>$(BUILD_DETAILS_FILE) ; \
$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(PCILIBS) -lz >&2 && \
echo "yes." && echo "NEEDLIBZ := yes" > .libdeps } || { echo "no."; echo; \ echo "yes." && echo "NEEDLIBZ := yes" > .libdeps } || { echo "no."; echo; \
echo "Please install libpci (package pciutils) and/or libz."; \ echo "Please install libpci (package pciutils) and/or libz."; \
echo "See README for more information."; echo; \ echo "See README for more information."; echo; \
@ -962,12 +967,14 @@ endif
ifeq ($(CHECK_LIBUSB0), yes) ifeq ($(CHECK_LIBUSB0), yes)
@printf "Checking for libusb-0.1/libusb-compat headers... " | tee -a $(BUILD_DETAILS_FILE) @printf "Checking for libusb-0.1/libusb-compat headers... " | tee -a $(BUILD_DETAILS_FILE)
@echo "$$LIBUSB0_TEST" > .test.c @echo "$$LIBUSB0_TEST" > .test.c
@printf "\nexec: %s\n" "$(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o" >>$(BUILD_DETAILS_FILE)
@{ { { { { $(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o >&2 && \ @{ { { { { $(CC) -c $(CPPFLAGS) $(CFLAGS) .test.c -o .test.o >&2 && \
echo "found." || { echo "not found."; echo; \ echo "found." || { echo "not found."; echo; \
echo "Please install libusb-0.1 headers or libusb-compat headers."; \ echo "Please install libusb-0.1 headers or libusb-compat headers."; \
echo "See README for more information."; echo; \ echo "See README for more information."; echo; \
rm -f .test.c .test.o; 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.o; exit 1; }; } 2>>$(BUILD_DETAILS_FILE); echo $? >&3 ; } | tee -a $(BUILD_DETAILS_FILE) >&4; } 3>&1;} | { read rc ; exit ${rc}; } } 4>&1
@printf "Checking if libusb-0.1 is usable... " | tee -a $(BUILD_DETAILS_FILE) @printf "Checking if libusb-0.1 is usable... " | tee -a $(BUILD_DETAILS_FILE)
@printf "\nexec: %s\n" "$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(USBLIBS)" >>$(BUILD_DETAILS_FILE)
@{ { { { { $(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(USBLIBS) >&2 && \ @{ { { { { $(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(USBLIBS) >&2 && \
echo "yes." || { echo "no."; \ echo "yes." || { echo "no."; \
echo "Please install libusb-0.1 or libusb-compat."; \ echo "Please install libusb-0.1 or libusb-compat."; \
@ -1055,10 +1062,12 @@ features: compiler
ifeq ($(NEED_FTDI), yes) ifeq ($(NEED_FTDI), yes)
@printf "Checking for FTDI support... " | tee -a $(BUILD_DETAILS_FILE) @printf "Checking for FTDI support... " | tee -a $(BUILD_DETAILS_FILE)
@echo "$$FTDI_TEST" > .featuretest.c @echo "$$FTDI_TEST" > .featuretest.c
@printf "\nexec: %s\n" "$(CC) $(CPPFLAGS) $(CFLAGS) $(FTDI_INCLUDES) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS)" >>$(BUILD_DETAILS_FILE)
@ { $(CC) $(CPPFLAGS) $(CFLAGS) $(FTDI_INCLUDES) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >&2 && \ @ { $(CC) $(CPPFLAGS) $(CFLAGS) $(FTDI_INCLUDES) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >&2 && \
( echo "found."; echo "FTDISUPPORT := yes" >> .features.tmp ; \ ( echo "found."; echo "FTDISUPPORT := yes" >> .features.tmp ; \
printf "Checking for FT232H support in libftdi... " ; \ printf "Checking for FT232H support in libftdi... " ; \
echo "$$FTDI_232H_TEST" >> .featuretest.c ; \ echo "$$FTDI_232H_TEST" >> .featuretest.c ; \
printf "\nexec: %s\n" "$(CC) $(CPPFLAGS) $(CFLAGS) $(FTDI_INCLUDES) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS)" >>$(BUILD_DETAILS_FILE) ; \
{ $(CC) $(CPPFLAGS) $(CFLAGS) $(FTDI_INCLUDES) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >&2 && \ { $(CC) $(CPPFLAGS) $(CFLAGS) $(FTDI_INCLUDES) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >&2 && \
( echo "found."; echo "FT232H := yes" >> .features.tmp ) || \ ( echo "found."; echo "FT232H := yes" >> .features.tmp ) || \
( echo "not found."; echo "FT232H := no" >> .features.tmp ) } \ ( echo "not found."; echo "FT232H := no" >> .features.tmp ) } \
@ -1069,6 +1078,7 @@ endif
ifeq ($(CONFIG_LINUX_SPI), yes) ifeq ($(CONFIG_LINUX_SPI), yes)
@printf "Checking if Linux SPI headers are present... " | tee -a $(BUILD_DETAILS_FILE) @printf "Checking if Linux SPI headers are present... " | tee -a $(BUILD_DETAILS_FILE)
@echo "$$LINUX_SPI_TEST" > .featuretest.c @echo "$$LINUX_SPI_TEST" > .featuretest.c
@printf "\nexec: %s\n" "$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX)" >>$(BUILD_DETAILS_FILE)
@ { $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) >&2 && \ @ { $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) >&2 && \
( echo "yes."; echo "LINUX_SPI_SUPPORT := yes" >> .features.tmp ) || \ ( echo "yes."; echo "LINUX_SPI_SUPPORT := yes" >> .features.tmp ) || \
( echo "no."; echo "LINUX_SPI_SUPPORT := no" >> .features.tmp ) } \ ( echo "no."; echo "LINUX_SPI_SUPPORT := no" >> .features.tmp ) } \
@ -1077,6 +1087,7 @@ endif
ifeq ($(NEED_LINUX_I2C), yes) ifeq ($(NEED_LINUX_I2C), yes)
@printf "Checking if Linux I2C headers are present... " | tee -a $(BUILD_DETAILS_FILE) @printf "Checking if Linux I2C headers are present... " | tee -a $(BUILD_DETAILS_FILE)
@echo "$$LINUX_I2C_TEST" > .featuretest.c @echo "$$LINUX_I2C_TEST" > .featuretest.c
@printf "\nexec: %s\n" "$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX)" >>$(BUILD_DETAILS_FILE)
@ { $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) >&2 && \ @ { $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) >&2 && \
( echo "yes."; echo "LINUX_I2C_SUPPORT := yes" >> .features.tmp ) || \ ( echo "yes."; echo "LINUX_I2C_SUPPORT := yes" >> .features.tmp ) || \
( echo "no."; echo "LINUX_I2C_SUPPORT := no" >> .features.tmp ) } \ ( echo "no."; echo "LINUX_I2C_SUPPORT := no" >> .features.tmp ) } \
@ -1084,6 +1095,7 @@ ifeq ($(NEED_LINUX_I2C), yes)
endif endif
@printf "Checking for utsname support... " | tee -a $(BUILD_DETAILS_FILE) @printf "Checking for utsname support... " | tee -a $(BUILD_DETAILS_FILE)
@echo "$$UTSNAME_TEST" > .featuretest.c @echo "$$UTSNAME_TEST" > .featuretest.c
@printf "\nexec: %s\n" "$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX)" >>$(BUILD_DETAILS_FILE)
@ { $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) >&2 && \ @ { $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) >&2 && \
( echo "found."; echo "UTSNAME := yes" >> .features.tmp ) || \ ( echo "found."; echo "UTSNAME := yes" >> .features.tmp ) || \
( echo "not found."; echo "UTSNAME := no" >> .features.tmp ) } 2>>$(BUILD_DETAILS_FILE) | tee -a $(BUILD_DETAILS_FILE) ( echo "not found."; echo "UTSNAME := no" >> .features.tmp ) } 2>>$(BUILD_DETAILS_FILE) | tee -a $(BUILD_DETAILS_FILE)