diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-02-08 15:01:38 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-02-08 15:17:05 +0100 |
commit | b40a6cb5d68b309aaceff9beacb0919e7f9b5232 (patch) | |
tree | 85eeac47a2dda64f7d33a0f4eb47d5b2817cea92 | |
parent | ec2c615d630bbec82c5f3d2bcbd82273ffadf8f4 (diff) | |
download | sparse-b40a6cb5d68b309aaceff9beacb0919e7f9b5232.tar.gz |
fix parallel install
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@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | Makefile | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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 |