aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2022-02-23 19:55:05 +0100
committerGuilhem Moulin <guilhem@fripost.org>2022-02-23 21:23:57 +0100
commit9f73064e09cc22326c876c2e493b9994b027db27 (patch)
tree79a1b3fe41105731e3798fe80cd49b2ec08159a7 /Makefile
parent28b2728a3232741ab3e4ccc8ced585d75fffddb1 (diff)
Makefile: Replace shell test with $(if ,,).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 1 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0c01999..6d5fd4f 100644
--- a/Makefile
+++ b/Makefile
@@ -69,12 +69,11 @@ $(HTML_FILES): $(builddir)/doc/%.html: $(srcdir)/doc/%.md $(HTML_TEMPLATE)
@mkdir -vp $(dir $@)
mtime="$$(git -C $(srcdir) --no-pager log -1 --pretty="format:%ct" -- "$<" 2>/dev/null)"; \
[ -n "$$mtime" ] || mtime="$$(date +%s -r "$<")"; \
- [ "$<" = "doc/index.md" ] && parent="" || parent="./index.html"; \
pandoc -sp -f markdown -t html+smart --css=$(CSS) --template=$(HTML_TEMPLATE) \
--variable=date:"$$(LC_TIME=C date +"Last modified on %a, %d %b %Y at %T %z" -d @"$$mtime")" \
--variable=keywords:"interimap" \
--variable=lang:"en" \
- --variable=parent:"$$parent" \
+ --variable=parent:"$(if $(filter $@,$(builddir)/doc/index.html),,./index.html)" \
--output="$@" -- "$<"
INSTALL ?= install