summaryrefslogtreecommitdiff
path: root/repo/www/Makefile
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-09-28 19:49:44 +0200
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-09-28 19:49:44 +0200
commit8822043d6bc93571e400f6e236900a8668a5d724 (patch)
tree49819e64ccc5ba982c2f084acd6cbaf4822b577a /repo/www/Makefile
parent4e695c301cae8fa2e6d6ab582de2415fc481e1b6 (diff)
parent7bc5ee87b62ab7dffd16913e6864b49e2dbfad06 (diff)
downloadmemory-leaks-8822043d6bc93571e400f6e236900a8668a5d724.tar.xz
Merge branch 'crumbs'
Diffstat (limited to 'repo/www/Makefile')
-rw-r--r--repo/www/Makefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile
index aa48971..9a2c90e 100644
--- a/repo/www/Makefile
+++ b/repo/www/Makefile
@@ -14,6 +14,7 @@ page_patterns = $(foreach ext,$(EXTENSIONS),'$(TOP_DIR)/**.$(ext)')
page_folders = $(call dirnames,$(shell git ls-files $(page_patterns)))
top_readme = $(shell git ls-files $(addprefix $(TOP_DIR)/README.,$(EXTENSIONS)))
html_template = template.html
+stylesheets_src = crumbs.css
lua_filters = convert-internal-links.lua
all: site
@@ -42,14 +43,20 @@ $(dependencies): $(site_tree) | $(cache)
include $(dependencies)
-site: $(pages) $(indices)
+stylesheets_dir = $(OUT_DIR)/style
+stylesheets = $(foreach s,$(stylesheets_src),$(stylesheets_dir)/$(s))
+
+site: $(pages) $(indices) $(stylesheets)
# List of output folders. Compute this from the full list of HTML
# pages, since $(page_folders) may be missing some intermediate
# directories (e.g. folders that only contain subfolders).
html_folders = $(call dirnames,$(pages) $(indices))
-$(html_folders) $(cache):
+top_index = $(OUT_DIR)/index.html
+subindices = $(filter-out $(top_index),$(indices))
+
+$(html_folders) $(stylesheets_dir) $(cache):
mkdir -p $@
$(pages) $(subindices): $(title)
@@ -60,11 +67,9 @@ $(pages): $(OUT_DIR)/%.html:
$(call v,PAGE,$*) \
./generate-page.py --site-title="$$(cat $(title))" --title="$*" \
$(foreach f,$(lua_filters),--lua-filter $(f)) \
+ $(foreach s,$(stylesheets_src),--stylesheet style/$(s)) \
--template=$(html_template) $< $@
-top_index = $(OUT_DIR)/index.html
-subindices = $(filter-out $(top_index),$(indices))
-
$(top_index): index_options =
$(subindices): index_options = --site-title="$$(cat $(title))"
@@ -74,8 +79,12 @@ $(indices): $(OUT_DIR)/%index.html:
$(call v,INDEX,$*) \
./generate-index.py $(index_options) --template=$(html_template) \
$(foreach f,$(lua_filters),--lua-filter $(f)) \
+ $(foreach s,$(stylesheets_src),--stylesheet style/$(s)) \
$(site_tree) "$(patsubst %/,%,$*)" $@
+$(stylesheets): $(stylesheets_dir)/%.css: %.css | $(stylesheets_dir)
+ cp $< $@
+
clean:
-rm -r $(cache)
-rm -r $(OUT_DIR)