summaryrefslogtreecommitdiff
path: root/repo/www
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-03-14 16:30:20 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-03-14 16:30:20 +0100
commite98158a2aa08ef0dfade513d79073e8accbc9bca (patch)
tree5ff67936136dee6a2d92d372418f273f8b2114e7 /repo/www
parente598068b7b99002121d1646a913bebedf8df1ee3 (diff)
downloadmemory-leaks-e98158a2aa08ef0dfade513d79073e8accbc9bca.tar.xz
Make path concatenation more to my liking
I prefer thinking of slashes as concatenation operators, always accompanied by operands on both sides. I don't like them hanging there at the end of my variables, which is what $(dir …) causes.
Diffstat (limited to 'repo/www')
-rw-r--r--repo/www/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile
index b30f600..6bc53ea 100644
--- a/repo/www/Makefile
+++ b/repo/www/Makefile
@@ -2,10 +2,13 @@ TOP_DIR = ../..
OUT_DIR = $(TOP_DIR)/public
TEXT_FILES = md org
+dirname = $(patsubst %/,%,$(dir $(1)))
+
text_patterns = $(foreach ext,$(TEXT_FILES),'$(TOP_DIR)/**.$(ext)')
-text_folders = $(sort $(dir $(shell git ls-files $(text_patterns))))
-page_folders = $(patsubst $(TOP_DIR)%/,$(OUT_DIR)%,$(text_folders))
+text_folders = $(sort $(call dirname,$(shell git ls-files $(text_patterns))))
+
+page_folders = $(patsubst $(TOP_DIR)%,$(OUT_DIR)%,$(text_folders))
all: site