On 07.01.2016 19:50, Stefan Tauner wrote:
Signed-off-by: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at
Thanks!
Comments below.
diff --git a/Makefile b/Makefile index 6ddca58..500f71f 100644 --- a/Makefile +++ b/Makefile @@ -966,6 +986,24 @@ ifeq ($(CHECK_LIBUSB0), yes) rm -f .test.c .test.o .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.o .test$(EXEC_SUFFIX) endif +ifeq ($(CHECK_LIBUSB1), yes)
- @printf "Checking for libusb-1.0 headers... "
- @echo "$$LIBUSB1_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 >/dev/null && \
echo "found." || ( echo "not found."; echo; \
echo "Please install libusb-1.0 headers."; \
echo "See README for more information."; echo; \
rm -f .test.c .test.o; exit 1)
- @printf "Checking if libusb-1.0 is usable... "
- @printf "\nexec: %s\n" "$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(USB1LIBS)" >>$(BUILD_DETAILS_FILE)
- @$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(USB1LIBS) >/dev/null && \
echo "yes." || ( echo "no."; \
echo "Please install libusb-1.0."; \
echo "See README for more information."; echo; \
rm -f .test.c .test.o .test$(EXEC_SUFFIX); exit 1)
- @rm -f .test.c .test.o .test$(EXEC_SUFFIX)
+endif
The libusb1 test doesn't use the same fd redirect and tee operations which are present in the libusb0 test. Is that intentional?
Regards, Carl-Daniel
On Sun, 10 Jan 2016 15:07:20 +0100 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
On 07.01.2016 19:50, Stefan Tauner wrote:
Signed-off-by: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at
Thanks!
Comments below.
diff --git a/Makefile b/Makefile index 6ddca58..500f71f 100644 --- a/Makefile +++ b/Makefile @@ -966,6 +986,24 @@ ifeq ($(CHECK_LIBUSB0), yes) rm -f .test.c .test.o .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.o .test$(EXEC_SUFFIX) endif +ifeq ($(CHECK_LIBUSB1), yes)
- @printf "Checking for libusb-1.0 headers... "
- @echo "$$LIBUSB1_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 >/dev/null && \
echo "found." || ( echo "not found."; echo; \
echo "Please install libusb-1.0 headers."; \
echo "See README for more information."; echo; \
rm -f .test.c .test.o; exit 1)
- @printf "Checking if libusb-1.0 is usable... "
- @printf "\nexec: %s\n" "$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(USB1LIBS)" >>$(BUILD_DETAILS_FILE)
- @$(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(USB1LIBS) >/dev/null && \
echo "yes." || ( echo "no."; \
echo "Please install libusb-1.0."; \
echo "See README for more information."; echo; \
rm -f .test.c .test.o .test$(EXEC_SUFFIX); exit 1)
- @rm -f .test.c .test.o .test$(EXEC_SUFFIX)
+endif
The libusb1 test doesn't use the same fd redirect and tee operations which are present in the libusb0 test. Is that intentional?
Of course not...
Signed-off-by: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile index 21fa8b0..b4c6d86 100644 --- a/Makefile +++ b/Makefile @@ -845,6 +845,7 @@ export COMPILER_TEST compiler: featuresavailable @printf "Checking for a C compiler... " | tee -a $(BUILD_DETAILS_FILE) @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 && \ 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 @@ -927,6 +928,7 @@ hwlibs: compiler ifeq ($(CHECK_LIBPCI), yes) @printf "Checking for libpci headers... " | tee -a $(BUILD_DETAILS_FILE) @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 && \ echo "found." || { echo "not found."; echo; \ echo "Please install libpci headers."; \ @@ -934,14 +936,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 @printf "Checking version of pci_get_dev... " | tee -a $(BUILD_DETAILS_FILE) @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 && \ ( 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) @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 && \ echo "yes." || { echo "no."; \ printf "Checking if libz+libpci are present and sufficient..." ; \ - { $(CC) $(LDFLAGS) .test.o -o .test$(EXEC_SUFFIX) $(LIBS) $(PCILIBS) -lz >&2 && \ + { echo $(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 "Please install libpci (package pciutils) and/or libz."; \ echo "See README for more information."; echo; \ @@ -951,12 +956,14 @@ endif ifeq ($(CHECK_LIBUSB0), yes) @printf "Checking for libusb-0.1/libusb-compat headers... " | tee -a $(BUILD_DETAILS_FILE) @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 && \ echo "found." || { echo "not found."; echo; \ echo "Please install libusb-0.1 headers or libusb-compat headers."; \ 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 @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 && \ echo "yes." || { echo "no."; \ echo "Please install libusb-0.1 or libusb-compat."; \ @@ -1044,10 +1051,12 @@ features: compiler ifeq ($(NEED_FTDI), yes) @printf "Checking for FTDI support... " | tee -a $(BUILD_DETAILS_FILE) @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 && \ ( echo "found."; echo "FTDISUPPORT := yes" >> .features.tmp ; \ printf "Checking for FT232H support in libftdi... " ; \ echo "$$FTDI_232H_TEST" >> .featuretest.c ; \ + echo $(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 && \ ( echo "found."; echo "FT232H := yes" >> .features.tmp ) || \ ( echo "not found."; echo "FT232H := no" >> .features.tmp ) } \ @@ -1058,6 +1067,7 @@ endif ifeq ($(CONFIG_LINUX_SPI), yes) @printf "Checking if Linux SPI headers are present... " | tee -a $(BUILD_DETAILS_FILE) @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 && \ ( echo "yes."; echo "LINUX_SPI_SUPPORT := yes" >> .features.tmp ) || \ ( echo "no."; echo "LINUX_SPI_SUPPORT := no" >> .features.tmp ) } \ @@ -1066,6 +1076,7 @@ endif ifeq ($(NEED_LINUX_I2C), yes) @printf "Checking if Linux I2C headers are present... " | tee -a $(BUILD_DETAILS_FILE) @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 && \ ( echo "yes."; echo "LINUX_I2C_SUPPORT := yes" >> .features.tmp ) || \ ( echo "no."; echo "LINUX_I2C_SUPPORT := no" >> .features.tmp ) } \ @@ -1073,6 +1084,7 @@ ifeq ($(NEED_LINUX_I2C), yes) endif @printf "Checking for utsname support... " | tee -a $(BUILD_DETAILS_FILE) @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 && \ ( echo "found."; echo "UTSNAME := yes" >> .features.tmp ) || \ ( echo "not found."; echo "UTSNAME := no" >> .features.tmp ) } 2>>$(BUILD_DETAILS_FILE) | tee -a $(BUILD_DETAILS_FILE)