summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-03-12 00:57:00 +0100
committerAlejandro Colomar <alx@kernel.org>2023-03-12 00:57:20 +0100
commitac288b42c4908e1bbcd18574bdc7172ebb759d72 (patch)
tree4e391d9c7449ffb7fcc922c8960ac363ef19a288
parentffac8276df958046d6b38ef21829f7c8d39eca19 (diff)
*.mk: Remove unnecessary '.' after directory names (but keep the '/')
I used it for some reason I don't remember, probably because I did something wrong, and didn't know how to do it right. I've tried now without it, and it's working, so let's just remove it. While we don't want trailing slashes in directory variables, we want them in targets, so we can distinguish directory targets. Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--lib/build-html.mk6
-rw-r--r--lib/build-src.mk2
-rw-r--r--lib/build.mk6
-rw-r--r--lib/dist.mk10
-rw-r--r--lib/install-html.mk6
-rw-r--r--lib/install-man.mk46
-rw-r--r--lib/install.mk6
-rw-r--r--lib/lint-man.mk18
-rw-r--r--lib/lint.mk4
9 files changed, 52 insertions, 52 deletions
diff --git a/lib/build-html.mk b/lib/build-html.mk
index d3cbf0ac6..2a07c0fd3 100644
--- a/lib/build-html.mk
+++ b/lib/build-html.mk
@@ -24,18 +24,18 @@ MAN2HTML := man2html
_HTMLPAGES := $(patsubst $(MANDIR)/%,$(_HTMLDIR)/%$(htmlext),$(MANPAGES))
-_HTMLDIRS := $(patsubst $(MANDIR)/%,$(_HTMLDIR)/%/.,$(MANDIRS))
+_HTMLDIRS := $(patsubst $(MANDIR)/%,$(_HTMLDIR)/%/,$(MANDIRS))
# Use with
# make MAN2HTMLFLAGS=whatever html
# The sed removes the lines "Content-type: text/html\n\n"
-$(_HTMLPAGES): $(_HTMLDIR)/%$(htmlext): $(MANDIR)/% | $$(@D)/.
+$(_HTMLPAGES): $(_HTMLDIR)/%$(htmlext): $(MANDIR)/% | $$(@D)/
$(info MAN2HTML $@)
$(MAN2HTML) $(MAN2HTMLFLAGS) $< \
| $(SED) -e 1,2d >$@
-$(_HTMLDIRS): %/.: | $$(dir %). $(_HTMLDIR)/.
+$(_HTMLDIRS): %/: | $$(dir %) $(_HTMLDIR)/
.PHONY: build-html html
diff --git a/lib/build-src.mk b/lib/build-src.mk
index 80ab7fe89..237d663b9 100644
--- a/lib/build-src.mk
+++ b/lib/build-src.mk
@@ -73,7 +73,7 @@ _UNITS_src_o := $(patsubst %.c,%.o,$(_UNITS_src_c))
_UNITS_src_bin := $(patsubst %.c,%,$(_UNITS_src_c))
-$(_SRCPAGEDIRS): $(_SRCDIR)/%.d: $(MANDIR)/% | $$(@D)/.
+$(_SRCPAGEDIRS): $(_SRCDIR)/%.d: $(MANDIR)/% | $$(@D)/
+$(info MKDIR $@)
+$(MKDIR) $@
+touch $@
diff --git a/lib/build.mk b/lib/build.mk
index 609b09580..ed1ae92ff 100644
--- a/lib/build.mk
+++ b/lib/build.mk
@@ -20,13 +20,13 @@ MKDIR := mkdir -p
RM := rm
-_SRCDIRS := $(patsubst $(MANDIR)/%,$(_SRCDIR)/%/.,$(MANDIRS))
+_SRCDIRS := $(patsubst $(MANDIR)/%,$(_SRCDIR)/%/,$(MANDIRS))
-$(_SRCDIRS): %/.: | $$(dir %). $(_SRCDIR)/.
+$(_SRCDIRS): %/: | $$(dir %) $(_SRCDIR)/
-$(builddir)/%/.:
+$(builddir)/%/:
+$(info MKDIR $(@D)/)
+$(MKDIR) $(@D)
diff --git a/lib/dist.mk b/lib/dist.mk
index 76b155282..926473f2c 100644
--- a/lib/dist.mk
+++ b/lib/dist.mk
@@ -28,18 +28,18 @@ compression := gz xz
dist := $(foreach x,$(compression),dist-$(x))
-$(_DISTPAGES): $(_DISTDIR)/man%: $(srcdir)/man% FORCE | $$(@D)/.
+$(_DISTPAGES): $(_DISTDIR)/man%: $(srcdir)/man% FORCE | $$(@D)/
$(info INSTALL $@)
$(INSTALL_DATA) -T $< $@
$(SED) -i '/^.TH/s/(unreleased)/$(DISTVERSION)/' $@
$(SED) -i "/^.TH/s/(date)/$$(git log --format=%cs -1 -- $<)/" $@
-$(_DISTOTHERS): $(_DISTDIR)/%: $(srcdir)/% | $$(@D)/.
+$(_DISTOTHERS): $(_DISTDIR)/%: $(srcdir)/% | $$(@D)/
$(info INSTALL $@)
$(INSTALL_DATA) -T $< $@
-$(DISTFILE): $(_DISTFILES) | $$(@D)/.
+$(DISTFILE): $(_DISTFILES) | $$(@D)/
$(info TAR $@)
$(TAR) cf $@ -T /dev/null
$(GIT) ls-files \
@@ -47,11 +47,11 @@ $(DISTFILE): $(_DISTFILES) | $$(@D)/.
| $(XARGS) $(TAR) rf $@ -C $(srcdir) \
--transform 's,^$(_DISTDIR),$(DISTNAME),'
-$(DISTFILE).gz: %.gz: % | $$(@D)/.
+$(DISTFILE).gz: %.gz: % | $$(@D)/
$(info GZIP $@)
$(GZIP) -knf $<
-$(DISTFILE).xz: %.xz: % | $$(@D)/.
+$(DISTFILE).xz: %.xz: % | $$(@D)/
$(info XZ $@)
$(XZ) -kf $<
diff --git a/lib/install-html.mk b/lib/install-html.mk
index 2531ad503..9e0a44961 100644
--- a/lib/install-html.mk
+++ b/lib/install-html.mk
@@ -21,14 +21,14 @@ _htmlpages := $(patsubst $(_HTMLDIR)/%,$(_htmldir)/%,$(_HTMLPAGES))
_htmldirs := $(patsubst $(_HTMLDIR)/%,$(_htmldir)/%,$(_HTMLDIRS))
_htmlpages_rm := $(addsuffix -rm,$(wildcard $(_htmlpages)))
_htmldirs_rmdir := $(addsuffix -rmdir,$(wildcard $(_htmldirs)))
-_htmldir_rmdir := $(addsuffix -rmdir,$(wildcard $(_htmldir)/.))
+_htmldir_rmdir := $(addsuffix -rmdir,$(wildcard $(_htmldir)/))
-$(_htmlpages): $(_htmldir)/%: $(_HTMLDIR)/% | $$(@D)/.
+$(_htmlpages): $(_htmldir)/%: $(_HTMLDIR)/% | $$(@D)/
$(info INSTALL $@)
$(INSTALL_DATA) -T $< $@
-$(_htmldirs): %/.: | $$(dir %). $(_htmldir)/.
+$(_htmldirs): %/: | $$(dir %) $(_htmldir)/
.PHONY: install-html
diff --git a/lib/install-man.mk b/lib/install-man.mk
index 643a23c33..d4c231cd8 100644
--- a/lib/install-man.mk
+++ b/lib/install-man.mk
@@ -70,14 +70,14 @@ _man5dir := $(DESTDIR)$(man5dir)
_man6dir := $(DESTDIR)$(man6dir)
_man7dir := $(DESTDIR)$(man7dir)
_man8dir := $(DESTDIR)$(man8dir)
-_mandirs := $(_man1dir)/. \
- $(_man2dir)/. $(_man2typedir)/. \
- $(_man3dir)/. $(_man3constdir)/. $(_man3headdir)/. $(_man3typedir)/. \
- $(_man4dir)/. \
- $(_man5dir)/. \
- $(_man6dir)/. \
- $(_man7dir)/. \
- $(_man8dir)/. \
+_mandirs := $(_man1dir)/ \
+ $(_man2dir)/ $(_man2typedir)/ \
+ $(_man3dir)/ $(_man3constdir)/ $(_man3headdir)/ $(_man3typedir)/ \
+ $(_man4dir)/ \
+ $(_man5dir)/ \
+ $(_man6dir)/ \
+ $(_man7dir)/ \
+ $(_man8dir)/ \
_man1pages := $(patsubst $(MANDIR)/man1/%,$(_man1dir)/%$(Z),$(MAN1PAGES))
_man2pages := $(patsubst $(MANDIR)/man2/%,$(_man2dir)/%$(Z),$(MAN2PAGES))
@@ -126,7 +126,7 @@ _man5dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man5dir)))
_man6dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man6dir)))
_man7dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man7dir)))
_man8dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man8dir)))
-_mandir_rmdir := $(addsuffix -rmdir,$(wildcard $(_mandir)/.))
+_mandir_rmdir := $(addsuffix -rmdir,$(wildcard $(_mandir)/))
MAN_SECTIONS := 1 2 2type 3 3const 3head 3type 4 5 6 7 8
install_manX := $(foreach x,$(MAN_SECTIONS),install-man$(x))
@@ -134,18 +134,18 @@ installdirs_manX := $(foreach x,$(MAN_SECTIONS),installdirs-man$(x))
uninstall_manX := $(foreach x,$(MAN_SECTIONS),uninstall-man$(x))
-$(_man1pages): $(_man1dir)/%$(Z): $(MANDIR)/man1/% | $$(@D)/.
-$(_man2pages): $(_man2dir)/%$(Z): $(MANDIR)/man2/% | $$(@D)/.
-$(_man2typepages): $(_man2typedir)/%$(Z): $(MANDIR)/man2type/% | $$(@D)/.
-$(_man3pages): $(_man3dir)/%$(Z): $(MANDIR)/man3/% | $$(@D)/.
-$(_man3constpages): $(_man3constdir)/%$(Z): $(MANDIR)/man3const/% | $$(@D)/.
-$(_man3headpages): $(_man3headdir)/%$(Z): $(MANDIR)/man3head/% | $$(@D)/.
-$(_man3typepages): $(_man3typedir)/%$(Z): $(MANDIR)/man3type/% | $$(@D)/.
-$(_man4pages): $(_man4dir)/%$(Z): $(MANDIR)/man4/% | $$(@D)/.
-$(_man5pages): $(_man5dir)/%$(Z): $(MANDIR)/man5/% | $$(@D)/.
-$(_man6pages): $(_man6dir)/%$(Z): $(MANDIR)/man6/% | $$(@D)/.
-$(_man7pages): $(_man7dir)/%$(Z): $(MANDIR)/man7/% | $$(@D)/.
-$(_man8pages): $(_man8dir)/%$(Z): $(MANDIR)/man8/% | $$(@D)/.
+$(_man1pages): $(_man1dir)/%$(Z): $(MANDIR)/man1/% | $$(@D)/
+$(_man2pages): $(_man2dir)/%$(Z): $(MANDIR)/man2/% | $$(@D)/
+$(_man2typepages): $(_man2typedir)/%$(Z): $(MANDIR)/man2type/% | $$(@D)/
+$(_man3pages): $(_man3dir)/%$(Z): $(MANDIR)/man3/% | $$(@D)/
+$(_man3constpages): $(_man3constdir)/%$(Z): $(MANDIR)/man3const/% | $$(@D)/
+$(_man3headpages): $(_man3headdir)/%$(Z): $(MANDIR)/man3head/% | $$(@D)/
+$(_man3typepages): $(_man3typedir)/%$(Z): $(MANDIR)/man3type/% | $$(@D)/
+$(_man4pages): $(_man4dir)/%$(Z): $(MANDIR)/man4/% | $$(@D)/
+$(_man5pages): $(_man5dir)/%$(Z): $(MANDIR)/man5/% | $$(@D)/
+$(_man6pages): $(_man6dir)/%$(Z): $(MANDIR)/man6/% | $$(@D)/
+$(_man7pages): $(_man7dir)/%$(Z): $(MANDIR)/man7/% | $$(@D)/
+$(_man8pages): $(_man8dir)/%$(Z): $(MANDIR)/man8/% | $$(@D)/
$(_manpages):
@@ -178,9 +178,9 @@ ifeq ($(Z),.gz)
fi
endif
-$(_mandirs): %/.: | $$(dir %). $(_mandir)/.
+$(_mandirs): %/: | $$(dir %) $(_mandir)/
-$(_mandirs_rmdir): $(_mandir)/man%/.-rmdir: $$(_man%pages_rm) FORCE
+$(_mandirs_rmdir): $(_mandir)/man%/-rmdir: $$(_man%pages_rm) FORCE
$(_mandir_rmdir): $(uninstall_manX) FORCE
diff --git a/lib/install.mk b/lib/install.mk
index 25dbc1b2f..23926d0e2 100644
--- a/lib/install.mk
+++ b/lib/install.mk
@@ -18,9 +18,9 @@ datarootdir := $(prefix)/share
docdir := $(datarootdir)/doc
-%/.:
- +$(info INSTALL $(@D)/)
- +$(INSTALL_DIR) $(@D)
+%/:
+ +$(info INSTALL $@/)
+ +$(INSTALL_DIR) $@
%-rm:
$(info RM $*)
diff --git a/lib/lint-man.mk b/lib/lint-man.mk
index d47aadc71..0dc2c4735 100644
--- a/lib/lint-man.mk
+++ b/lib/lint-man.mk
@@ -85,37 +85,37 @@ linters_man := groff mandoc tbl
lint_man := $(foreach x,$(linters_man),lint-man-$(x))
-$(_LINT_man_groff_tbl): $(_LINTDIR)/%.tbl: $(MANDIR)/% | $$(@D)/.
+$(_LINT_man_groff_tbl): $(_LINTDIR)/%.tbl: $(MANDIR)/% | $$(@D)/
$(info LINT (preconv) $@)
$(PRECONV) $(PRECONVFLAGS) $< >$@
-$(_LINT_man_groff_eqn): %.eqn: %.tbl | $$(@D)/.
+$(_LINT_man_groff_eqn): %.eqn: %.tbl | $$(@D)/
$(info LINT (tbl) $@)
$(TBL) <$< >$@
-$(_LINT_man_groff_troff): %.troff: %.eqn | $$(@D)/.
+$(_LINT_man_groff_troff): %.troff: %.eqn | $$(@D)/
$(info LINT (eqn) $@)
$(EQN) $(EQNFLAGS) <$< 2>&1 >$@ \
| ( ! $(GREP) ^ )
-$(_LINT_man_groff_grotty): %.grotty: %.troff | $$(@D)/.
+$(_LINT_man_groff_grotty): %.grotty: %.troff | $$(@D)/
$(info LINT (troff) $@)
$(TROFF) $(TROFFFLAGS) <$< >$@
-$(_LINT_man_groff_col): %.col: %.grotty | $$(@D)/.
+$(_LINT_man_groff_col): %.col: %.grotty | $$(@D)/
$(info LINT (grotty) $@)
$(GROTTY) $(GROTTYFLAGS) <$< >$@
-$(_LINT_man_groff_grep): %.grep: %.col | $$(@D)/.
+$(_LINT_man_groff_grep): %.grep: %.col | $$(@D)/
$(info LINT (col) $@)
$(COL) $(COLFLAGS) <$< >$@
-$(_LINT_man_groff): %.lint-man.groff.touch: %.grep | $$(@D)/.
+$(_LINT_man_groff): %.lint-man.groff.touch: %.grep | $$(@D)/
$(info LINT (grep) $@)
! $(GREP) -n '.\{$(MANWIDTH)\}.' $< /dev/null >&2
touch $@
-$(_LINT_man_mandoc): $(_LINTDIR)/%.lint-man.mandoc.touch: $(MANDIR)/% | $$(@D)/.
+$(_LINT_man_mandoc): $(_LINTDIR)/%.lint-man.mandoc.touch: $(MANDIR)/% | $$(@D)/
$(info LINT (mandoc) $@)
! ($(MANDOC) $(MANDOCFLAGS) $< 2>&1 \
| $(GREP) -v 'STYLE: lower case character in document title:' \
@@ -129,7 +129,7 @@ $(_LINT_man_mandoc): $(_LINTDIR)/%.lint-man.mandoc.touch: $(MANDIR)/% | $$(@D)/.
| $(GREP) '.' >&2
touch $@
-$(_LINT_man_tbl): $(_LINTDIR)/%.lint-man.tbl.touch: $(MANDIR)/% | $$(@D)/.
+$(_LINT_man_tbl): $(_LINTDIR)/%.lint-man.tbl.touch: $(MANDIR)/% | $$(@D)/
$(info LINT (tbl comment) $@)
if $(GREP) -q '^\.TS$$' $< && ! $(HEAD) -n1 $< | $(GREP) -q '\\" t$$'; \
then \
diff --git a/lib/lint.mk b/lib/lint.mk
index 9233372df..f287f973c 100644
--- a/lib/lint.mk
+++ b/lib/lint.mk
@@ -22,13 +22,13 @@ LINTMAN := $(shell $(FIND) $(MANDIR)/man*/ -type f \
| $(GREP) '$(MANEXT)' \
| $(XARGS) $(GREP) -l '^\.TH ' \
| $(SORT))
-_LINTDIRS := $(patsubst $(MANDIR)/%,$(_LINTDIR)/%/.,$(MANDIRS))
+_LINTDIRS := $(patsubst $(MANDIR)/%,$(_LINTDIR)/%/,$(MANDIRS))
lint := lint-c lint-man
-$(_LINTDIRS): %/.: | $$(dir %). $(_LINTDIR)/.
+$(_LINTDIRS): %/: | $$(dir %) $(_LINTDIR)/
.PHONY: lint