summaryrefslogtreecommitdiff
path: root/repo/www
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-03-14 12:23:13 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-03-14 12:23:13 +0100
commit63fe3bafdd43c21987d90c299854dd0fa5ba1f2d (patch)
treed0c3235668c67bf154b85fc3a7bb6917602db4aa /repo/www
parentb4c9498a5ae11b3c3230317c5a5df0b332104eee (diff)
downloadmemory-leaks-63fe3bafdd43c21987d90c299854dd0fa5ba1f2d.tar.xz
Update page list whenever folders changed
Diffstat (limited to 'repo/www')
-rw-r--r--repo/www/Makefile8
-rw-r--r--repo/www/TODO1
-rwxr-xr-xrepo/www/make-deps.py2
3 files changed, 7 insertions, 4 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile
index 7ae0e5e..2cf5f9c 100644
--- a/repo/www/Makefile
+++ b/repo/www/Makefile
@@ -1,16 +1,20 @@
TOP_DIR = ../..
OUT_DIR = $(TOP_DIR)/public
+text_files = md org
+text_patterns = $(foreach ext,$(text_files),'$(TOP_DIR)/**.$(ext)')
+text_folders = $(sort $(dir $(shell git ls-files $(text_patterns))))
+
all: site
include deps.mk
-deps.mk: make-deps.py
+deps.mk: make-deps.py $(text_folders)
python3 $< $(TOP_DIR) $(OUT_DIR)
site: $(pages)
-$(folders):
+$(page_folders):
mkdir -p $@
%.html:
diff --git a/repo/www/TODO b/repo/www/TODO
index a7e3b3a..4a9a976 100644
--- a/repo/www/TODO
+++ b/repo/www/TODO
@@ -1,4 +1,3 @@
-- make deps.mk depend on all source folders
- "leak count" on toplevel index
- autogenerated index.html's for subfolders lacking READMEs
- stylin'
diff --git a/repo/www/make-deps.py b/repo/www/make-deps.py
index 92da680..4045580 100755
--- a/repo/www/make-deps.py
+++ b/repo/www/make-deps.py
@@ -50,7 +50,7 @@ def write_dependencies(output, sources, top_dir, out_dir):
print(file=output)
print(f'pages = {" ".join(pages)}', file=output)
- print(f'folders = {" ".join(directories)}', file=output)
+ print(f'page_folders = {" ".join(directories)}', file=output)
def main(argv):