summaryrefslogtreecommitdiff
path: root/repo/www/Makefile
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-05-06 22:57:33 +0200
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-05-06 22:58:54 +0200
commit0b81d525f86dc27ee8f1892732cce9924e9c53cf (patch)
treeb0c2790fb9bdcce5d972b99122d8746f2ca502f1 /repo/www/Makefile
parent2226dca17b915763d2a35e60df2af3ecbd2bd44e (diff)
downloadmemory-leaks-0b81d525f86dc27ee8f1892732cce9924e9c53cf.tar.xz
Add verbose variable to Makefile
To make output more intelligible.
Diffstat (limited to 'repo/www/Makefile')
-rw-r--r--repo/www/Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile
index db656f2..d74a77c 100644
--- a/repo/www/Makefile
+++ b/repo/www/Makefile
@@ -1,6 +1,11 @@
TOP_DIR = ../..
OUT_DIR = $(TOP_DIR)/public
TEXT_FILES = md org
+V = 0
+
+v = $(call v_$(V),$(1),$(2))
+v_0 = @echo $(1) $(2);
+v_1 =
dirname = $(patsubst %/,%,$(dir $(1)))
dirnames = $(sort $(call dirname,$(1)))
@@ -43,9 +48,9 @@ $(html_folders) $(cache):
$(pages) $(subindices): $(title)
$(pages): $(OUT_DIR)/%.html:
- TEXT_FILES="$(TEXT_FILES)" \
- pandoc -s $< -o $@ \
- -T "$$(cat $(title))" -M title="$*" \
+ $(call v,PAGE,$*) TEXT_FILES="$(TEXT_FILES)" \
+ pandoc -s $< -o $@ \
+ -T "$$(cat $(title))" -M title="$*" \
--lua-filter convert-internal-links.lua
top_index = $(OUT_DIR)/index.html
@@ -57,7 +62,7 @@ $(subindices): index_options = --site-title="$$(cat $(title))"
# ⚠ When tweaking this rule, check whether it still works for the
# top-level index.html.
$(indices): $(OUT_DIR)/%index.html:
- TEXT_FILES="$(TEXT_FILES)" \
+ $(call v,INDEX,$*) TEXT_FILES="$(TEXT_FILES)" \
./generate-index.py $(index_options) $(site_tree) "$(patsubst %/,%,$*)" $@
clean: