From 4afd29d32fa8ddb279b0f73e1dfd313375ed9daa Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 26 Dec 2003 20:19:17 +0000 Subject: [PATCH] Fixed parallel builds Makefile: Added missing dependencies. Parallel builds work now. Problem reported by Andreas Haumer , but I chose a different fix. git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-8 --- ChangeLog | 4 ++++ Makefile | 17 +++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index bced15f..0fff412 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2003-12-26 Martin Mares + * Makefile: Added missing dependencies. Parallel builds work now. + Problem reported by Andreas Haumer , but I chose + a different fix. + * Makefile (MANDIR): Use `:=' instead of `=' to avoid executing the shell command every time $(MANDIR) is referenced. diff --git a/Makefile b/Makefile index 3b6cd25..65436db 100644 --- 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@" -- 2.39.2