Patch attached.

I have on two occasions in a short period of time run into systems
where the pciutils check fails, while both packages are in fact
installed. In one case, no compiler was installed. The other case
has not been resolved yet, but the fact is that the check is not
precise enough.

It is also a waste of time to do the check on every single make
invocation.

The other hunk is about make clean. I think make clean should only
remove files that were created by other targets in the Makefile.
On principle I don't like make clean removing backups that someone
may want to keep. (I haven't gotten bit by this yet, but I would be
upset if it should happen.)

Hope you agree on these! :)


//Peter
flashrom: Remove Makefile pciutils check, and don't rm *~ in clean

Signed-off-by: Peter Stuge <[EMAIL PROTECTED]>

Index: Makefile
===================================================================
--- Makefile	(revision 3401)
+++ Makefile	(working copy)
@@ -31,7 +31,7 @@
 	flashrom.o w39v080fa.o sharplhf00l04.o w29ee011.o spi.o it87spi.o \
 	ichspi.o
 
-all: pciutils dep $(PROGRAM)
+all: dep $(PROGRAM)
 
 # Set the flashrom version string from the highest revision number
 # of the checked out flashrom files.
@@ -46,7 +46,7 @@
 	$(CC) -c $(CFLAGS) $(SVNDEF) $(CPPFLAGS) $< -o $@
 
 clean:
-	rm -f $(PROGRAM) *.o *~
+	rm -f $(PROGRAM) *.o
 
 distclean: clean
 	rm -f .dependencies
@@ -54,19 +54,6 @@
 dep:
 	@$(CC) -MM *.c > .dependencies
 
-pciutils:
-	@echo; echo -n "Checking for pciutils and zlib... "
-	@$(shell ( echo "#include <pci/pci.h>";		   \
-		   echo "struct pci_access *pacc;";	   \
-		   echo "int main(int argc, char **argv)"; \
-		   echo "{ pacc = pci_alloc(); return 0; }"; ) > .test.c )
-	@$(CC) $(CFLAGS) .test.c -o .test $(LDFLAGS) &>/dev/null &&	\
-		echo "found." || ( echo "not found."; echo;		\
-		echo "Please install pciutils-devel and zlib-devel.";	\
-		echo "See README for more information."; echo;		\
-		rm -f .test.c .test; exit 1)
-	@rm -f .test.c .test
-
 install: $(PROGRAM)
 	$(INSTALL) $(PROGRAM) $(PREFIX)/sbin
 	mkdir -p $(PREFIX)/share/man/man8
-- 
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to