diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2022-02-23 19:55:05 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2022-02-23 21:23:57 +0100 |
commit | 9f73064e09cc22326c876c2e493b9994b027db27 (patch) | |
tree | 79a1b3fe41105731e3798fe80cd49b2ec08159a7 /Makefile | |
parent | 28b2728a3232741ab3e4ccc8ced585d75fffddb1 (diff) |
Makefile: Replace shell test with $(if ,,).
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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 |