aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2022-10-21 00:27:46 +0200
committerAlejandro Colomar <alx@kernel.org>2022-10-21 00:27:48 +0200
commit92016b11b6f8b2f9e507ff88f298fe754b5d413f (patch)
tree1c3dcd2fd8b11505142a5f687345f95ae24a9807
parentc8c574860c22b2982ecabcb93337d12aa41865ca (diff)
downloadman-pages-92016b11b6f8b2f9e507ff88f298fe754b5d413f.tar.gz
Makefile: Remove installdirs* and builddirs* targets
Since our makefiles correctly state the dependencies of all targets, and allow fully-parallel builds and installs, there's no reason at all to allow creating the directories separately. That was an old recommendation for when makefiles were buggy, and you couldn't fully trust in them not having races or incorrect dependencies. Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--Makefile20
-rw-r--r--lib/build-html.mk6
-rw-r--r--lib/build-src.mk6
-rw-r--r--lib/dist.mk8
-rw-r--r--lib/install-html.mk6
-rw-r--r--lib/install-man.mk10
-rw-r--r--lib/install.mk6
-rw-r--r--lib/lint-c.mk2
-rw-r--r--lib/lint-man.mk2
-rw-r--r--lib/lint.mk4
10 files changed, 9 insertions, 61 deletions
diff --git a/Makefile b/Makefile
index 40b7c05bf0..a15d990eff 100644
--- a/Makefile
+++ b/Makefile
@@ -97,26 +97,6 @@ help:
$(info dist-gz Create a compressed tarball (.tar.gz))
$(info dist-xz Create a compressed tarball (.tar.xz))
$(info )
- $(info builddirs-dist Create directories needed by "dist")
- $(info builddirs-html Create directories needed by "build-html")
- $(info builddirs-src Create directories needed by "build-src")
- $(info lintdirs Create directories needed by "lint")
- $(info installdirs Create directories needed by "install")
- $(info installdirs-html Create directories needed by "install-html")
- $(info installdirs-man Create directories needed by "install-man")
- $(info installdirs-man1 Create directories needed by "install-man1")
- $(info installdirs-man2 Create directories needed by "install-man2")
- $(info installdirs-man2type Create directories needed by "install-man2type")
- $(info installdirs-man3 Create directories needed by "install-man3")
- $(info installdirs-man3const Create directories needed by "install-man3const")
- $(info installdirs-man3head Create directories needed by "install-man3head")
- $(info installdirs-man3type Create directories needed by "install-man3type")
- $(info installdirs-man4 Create directories needed by "install-man4")
- $(info installdirs-man5 Create directories needed by "install-man5")
- $(info installdirs-man6 Create directories needed by "install-man6")
- $(info installdirs-man7 Create directories needed by "install-man7")
- $(info installdirs-man8 Create directories needed by "install-man8")
- $(info )
$(info help Print this help)
$(info )
$(info Variables:)
diff --git a/lib/build-html.mk b/lib/build-html.mk
index 412a1f6b0b..b29a4f64f6 100644
--- a/lib/build-html.mk
+++ b/lib/build-html.mk
@@ -39,11 +39,7 @@ $(_HTMLDIRS): %/.: | $$(dir %). $(_HTMLDIR)/.
.PHONY: build-html html
-build-html html: $(_HTMLPAGES) | builddirs-html
- @:
-
-.PHONY: builddirs-html
-builddirs-html: $(_HTMLDIRS)
+build-html html: $(_HTMLPAGES)
@:
diff --git a/lib/build-src.mk b/lib/build-src.mk
index 79c224edba..4cc9b1ffe3 100644
--- a/lib/build-src.mk
+++ b/lib/build-src.mk
@@ -100,7 +100,7 @@ $(_UNITS_src_bin): $(_SRCDIR)/%: $(_SRCDIR)/%.o
.PHONY: build-src-c
-build-src-c: $(_UNITS_src_c) | builddirs-src
+build-src-c: $(_UNITS_src_c)
@:
.PHONY: build-src-cc
@@ -111,10 +111,6 @@ build-src-cc: $(_UNITS_src_o)
build-src-ld: $(_UNITS_src_bin)
@:
-.PHONY: builddirs-src
-builddirs-src: $(_SRCDIRS)
- @:
-
.PHONY: build-src
build-src: build-src-ld
diff --git a/lib/dist.mk b/lib/dist.mk
index c95189fc44..4339c18ef0 100644
--- a/lib/dist.mk
+++ b/lib/dist.mk
@@ -57,15 +57,11 @@ $(DISTFILE).xz: %.xz: % | $$(@D)/.
.PHONY: dist-tar
-dist-tar: $(DISTFILE) | builddirs-dist
+dist-tar: $(DISTFILE)
@:
.PHONY: $(dist)
-$(dist): dist-%: $(DISTFILE).% | builddirs-dist
- @:
-
-.PHONY: builddirs-dist
-builddirs-dist: $(builddir)/.
+$(dist): dist-%: $(DISTFILE).%
@:
.PHONY: dist
diff --git a/lib/install-html.mk b/lib/install-html.mk
index 0ae4df9d82..4417985ba3 100644
--- a/lib/install-html.mk
+++ b/lib/install-html.mk
@@ -32,11 +32,7 @@ $(_htmldirs): %/.: | $$(dir %). $(_htmldir)/.
.PHONY: install-html
-install-html: $(_htmlpages) | installdirs-html
- @:
-
-.PHONY: installdirs-html
-installdirs-html: $(_htmldirs)
+install-html: $(_htmlpages)
@:
.PHONY: uninstall-html
diff --git a/lib/install-man.mk b/lib/install-man.mk
index e5b871bec2..77947b6fbc 100644
--- a/lib/install-man.mk
+++ b/lib/install-man.mk
@@ -112,21 +112,13 @@ $(_mandir_rmdir): $(uninstall_manX) FORCE
.PHONY: $(install_manX)
-$(install_manX): install-man%: $$(_man%pages) | installdirs-man%
+$(install_manX): install-man%: $$(_man%pages)
@:
.PHONY: install-man
install-man: $(install_manX)
@:
-.PHONY: $(installdirs_manX)
-$(installdirs_manX): installdirs-man%: $$(_man%dir)
- @:
-
-.PHONY: installdirs-man
-installdirs-man: $(installdirs_manX)
- @:
-
.PHONY: $(uninstall_manX)
$(uninstall_manX): uninstall-man%: $$(_man%pages_rm) $$(_man%dir_rmdir)
@:
diff --git a/lib/install.mk b/lib/install.mk
index 57712b3dcb..4ae2bc4e22 100644
--- a/lib/install.mk
+++ b/lib/install.mk
@@ -32,11 +32,7 @@ docdir := $(datarootdir)/doc
.PHONY: install
-install: install-man | installdirs
- @:
-
-.PHONY: installdirs
-installdirs: | installdirs-man
+install: install-man
@:
.PHONY: uninstall
diff --git a/lib/lint-c.mk b/lib/lint-c.mk
index 9d27da7868..809d23ca88 100644
--- a/lib/lint-c.mk
+++ b/lib/lint-c.mk
@@ -74,7 +74,7 @@ $(_LINT_c_iwyu): %.lint-c.iwyu.touch: %.c
.PHONY: $(lint_c)
-$(lint_c): lint-c-%: $$(_LINT_c_%) | lintdirs
+$(lint_c): lint-c-%: $$(_LINT_c_%)
@:
.PHONY: lint-c
diff --git a/lib/lint-man.mk b/lib/lint-man.mk
index 33d45b60cc..61487bba8d 100644
--- a/lib/lint-man.mk
+++ b/lib/lint-man.mk
@@ -89,7 +89,7 @@ $(_LINT_man_mandoc): $(_LINTDIR)/%.lint-man.mandoc.touch: $(MANDIR)/% | $$(@D)/.
.PHONY: $(lint_man)
-$(lint_man): lint-man-%: $$(_LINT_man_%) | lintdirs
+$(lint_man): lint-man-%: $$(_LINT_man_%)
@:
.PHONY: lint-man
diff --git a/lib/lint.mk b/lib/lint.mk
index 1fb15c79a2..c4011fe9db 100644
--- a/lib/lint.mk
+++ b/lib/lint.mk
@@ -31,10 +31,6 @@ lint := lint-c lint-man
$(_LINTDIRS): %/.: | $$(dir %). $(_LINTDIR)/.
-.PHONY: lintdirs
-lintdirs: $(_LINTDIRS) $(_SRCDIRS)
- @:
-
.PHONY: lint
lint: $(lint)
@: