]> mj.ucw.cz Git - pciutils.git/commitdiff
Fixed parallel builds
authorMartin Mares <mj@ucw.cz>
Fri, 26 Dec 2003 20:19:17 +0000 (20:19 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:18:09 +0000 (14:18 +0200)
Makefile: Added missing dependencies. Parallel builds work now.
Problem reported by Andreas Haumer <andreas@xss.co.at>, but I chose
a different fix.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-8

ChangeLog
Makefile

index bced15fae1137cd345657f5093698c68d264be35..0fff412462207ee231232486efb2d3c0a39957cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2003-12-26  Martin Mares  <mj@ucw.cz>
 
+       * Makefile: Added missing dependencies. Parallel builds work now.
+       Problem reported by Andreas Haumer <andreas@xss.co.at>, but I chose
+       a different fix.
+
        * Makefile (MANDIR): Use `:=' instead of `=' to avoid executing the shell
        command every time $(MANDIR) is referenced.
 
index 3b6cd2567cf19a01f9f1ea9d1d8295dd5bb0ed0d..65436dbd3eb9e6f3338657ce747adc6ca8e627c4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,8 @@ SHAREDIR=$(PREFIX)/share
 MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi)
 INSTALL=install
 DIRINSTALL=install -d
-PCILIB=libpci.a
+PCILIB=lib/libpci.a
+PCIINC=lib/config.h lib/header.h lib/pci.h
 
 ifeq ($(shell uname),NetBSD)
 PCILIB=libpciutils.a
@@ -29,20 +30,20 @@ endif
 
 export
 
-all: lib lspci setpci lspci.8 setpci.8 update-pciids update-pciids.8 pci.ids
+all: $(PCILIB) lspci setpci lspci.8 setpci.8 update-pciids update-pciids.8 pci.ids
 
-lib: lib/config.h
+$(PCILIB): $(PCIINC)
        $(MAKE) -C lib all
 
 lib/config.h:
        cd lib && ./configure $(SHAREDIR) $(VERSION)
 
-lspci: lspci.o common.o lib/$(PCILIB)
-setpci: setpci.o common.o lib/$(PCILIB)
+lspci: lspci.o common.o $(PCILIB)
+setpci: setpci.o common.o $(PCILIB)
 
-lspci.o: lspci.c pciutils.h
-setpci.o: setpci.c pciutils.h
-common.o: common.c pciutils.h
+lspci.o: lspci.c pciutils.h $(PCIINC)
+setpci.o: setpci.c pciutils.h $(PCIINC)
+common.o: common.c pciutils.h $(PCIINC)
 
 update-pciids: update-pciids.sh
        sed <$< >$@ "s@^DEST=.*@DEST=$(SHAREDIR)/pci.ids@"