[PATCH] fix parallel install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The current make rules for 'install' were mixing pure declarative
and procedural style. As consequence, the binaries or the manpages
could be installed before their target directory was created.

Fix this by removing the rule to create these dirs and use install
with the '-D' option to create them.
Also remove the first prerequisites '$(INST_PROGRAMS) $(INST_MAN1)'
since these are not needed (the effective install rules already depend
them) and somehow misleading (it's not because they're first in
the dependencies list that they will be created before the next ones).

Spotted-by: Uwe Kleine-König <uwe@xxxxxxxxxxxxxxxxx>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 Makefile | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 025bce296..bd2b089f3 100644
--- a/Makefile
+++ b/Makefile
@@ -241,19 +241,16 @@ clean-check:
 	                  \) -exec rm {} \;
 
 
-install: $(INST_PROGRAMS) $(INST_MAN1) install-dirs install-bin install-man
-install-dirs:
-	$(Q)install -d $(DESTDIR)$(BINDIR)
-	$(Q)install -d $(DESTDIR)$(MAN1DIR)
+install: install-bin install-man
 install-bin: $(INST_PROGRAMS:%=$(DESTDIR)$(BINDIR)/%)
 install-man: $(INST_MAN1:%=$(DESTDIR)$(MAN1DIR)/%)
 
 $(DESTDIR)$(BINDIR)/%: %
 	@echo "  INSTALL $@"
-	$(Q)install        $< $@ || exit 1;
+	$(Q)install -D        $< $@ || exit 1;
 $(DESTDIR)$(MAN1DIR)/%: %
 	@echo "  INSTALL $@"
-	$(Q)install -m 644 $< $@ || exit 1;
+	$(Q)install -D -m 644 $< $@ || exit 1;
 
 .PHONY: FORCE
 
-- 
2.20.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux