From 041cf66df44f191c6117c22c4c815e7ef1486a68 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 10 Mar 2022 22:01:44 +0100 Subject: Replace '$(dir $@)' with '$(@D)' in Makefile. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1d09ff2..5ecff73 100644 --- a/Makefile +++ b/Makefile @@ -26,18 +26,18 @@ manual: $(MANUAL_FILES) html: $(HTML_FILES) $(PROGRAMS): $(builddir)/%: $(srcdir)/% - @mkdir -vp $(dir $@) + @mkdir -vp -- $(@D) perl -Te "print \"\$$_\\0\" foreach @INC;" | grep -Fxzq -e "$(sitelib)" && prefix="#" || prefix=""; \ sed -r "0,/^(use\\s+\lib\\s+)([\"'])[^\"']*\\2\\s*;/ s||$$prefix\\1\"$(sitelib)\";|" <"$<" >"$@" chmod --reference="$<" -- "$@" # upper case the headers and remove the links $(MANUAL_FILES): $(builddir)/doc/%: $(srcdir)/doc/%.md - @mkdir -vp $(dir $@) + @mkdir -vp -- $(@D) pandoc -f markdown -t json -- "$<" | $(srcdir)/pandoc2man.jq | pandoc -s -f json -t man -o "$@" $(SERVICE_FILES): $(builddir)/%.service: $(srcdir)/%.service - @mkdir -vp $(dir $@) + @mkdir -vp -- $(@D) sed "s|@bindir@|$(bindir)|" <"$<" >"$@" testcerts: @@ -74,7 +74,7 @@ release: git -C $(srcdir) tag -sm "Release version $$VERS" "v$$VERS" $(HTML_FILES): $(builddir)/doc/%.html: $(srcdir)/doc/%.md $(HTML_TEMPLATE) - @mkdir -vp $(dir $@) + @mkdir -vp -- $(@D) mtime="$$(git -C $(srcdir) --no-pager log -1 --pretty="format:%ct" -- "$<" 2>/dev/null)"; \ [ -n "$$mtime" ] || mtime="$$(date +%s -r "$<")"; \ pandoc -sp -f markdown -t html+smart --css=$(CSS) --template=$(HTML_TEMPLATE) \ -- cgit v1.2.3