chiark / gitweb /
Makefile: Use order-only prerequisite for making directories.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 5 May 2024 11:42:04 +0000 (12:42 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 5 May 2024 11:42:04 +0000 (12:42 +0100)
It looks cooler and involves running fewer processes in parallel builds.

Makefile

index 6e0ee10a4a968852e528bbe465374bcde120960f..2add093441ed278646397a7881e2a1c08edd8536 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -68,10 +68,11 @@ all: $(TARGETS)
 clean::; rm -f $(TARGETS)
 
 ## Installation.
+%/:; install -d $@
+
 INSTALLS                = $(addprefix install/, $(INSTDIRS))
 install: $(INSTALLS)
-$(INSTALLS): install/%: $$($$*_FILES)
-       install -d $($*dir)
+$(INSTALLS): install/%: $$($$*_FILES) | $$($$*dir)/
        $($*_INSTCMD) $+
 
 UNINSTALLS              = $(addprefix uninstall/, $(INSTDIRS))