aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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