summaryrefslogtreecommitdiff
path: root/http/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'http/Makefile')
-rw-r--r--http/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/http/Makefile b/http/Makefile
index 45dba95..5dbca5b 100644
--- a/http/Makefile
+++ b/http/Makefile
@@ -51,7 +51,7 @@ endef
define blog_rule =
.PHONY: $(blog)
-$(blog): $(blog_src_without_post_src) $(blog_src)
+$(blog): $(blog_src_without_post_src) $(blog_src) out/$(blog).html
endef
define blog_post_rule =
@@ -63,6 +63,11 @@ $(blog_post_target): $(blog_post_src) $(let ext,html,$(layout_file) $(component_
-f $$*.$(BLOG_EXT_$(blog))
endef
+define blog_index_rule =
+out/$(blog).html: src/$(blog).upphtml $(blog_src) $(wildcard bin/*)
+ ./bin/mkws https://joeac.net "$$(realpath src/$(blog).upphtml)"
+endef
+
define prune_blog_src_file_rule =
$(let rel_basename,$(patsubst src/$(blog)/%.$(BLOG_LAYOUT_$(blog)).upphtml,%,$(file)),
blogs/$(blog)/$(rel_basename).$(BLOG_EXT_$(blog)):
@@ -113,6 +118,7 @@ $(foreach layout,$(layouts),\
$(eval $(out_rule))))
$(foreach blog,$(blogs),$(eval $(blog_rule)))
+$(foreach blog,$(blogs),$(eval $(blog_index_rule)))
$(foreach blog,$(blogs),\
$(foreach layout,$(layouts),\