commit 0b81d525f86dc27ee8f1892732cce9924e9c53cf
parent 2226dca17b915763d2a35e60df2af3ecbd2bd44e
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date: Wed, 6 May 2020 22:57:33 +0200
Add verbose variable to Makefile
To make output more intelligible.
Diffstat:
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git 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: