[flashrom] [PATCH] Add infrastructure to support libusb-1.0.

Stefan Tauner stefan.tauner at alumni.tuwien.ac.at
Fri Jan 15 00:07:21 CET 2016


On Sun, 10 Jan 2016 15:07:20 +0100
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> wrote:

> On 07.01.2016 19:50, Stefan Tauner wrote:
> > Signed-off-by: Stefan Tauner <stefan.tauner at 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...

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner




More information about the flashrom mailing list