summaryrefslogtreecommitdiff
path: root/repo/www/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'repo/www/Makefile')
-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