From 0b81d525f86dc27ee8f1892732cce9924e9c53cf Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Wed, 6 May 2020 22:57:33 +0200 Subject: Add verbose variable to Makefile To make output more intelligible. --- repo/www/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'repo') 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: -- cgit v1.2.3