diff options
| author | Joe Carstairs <me@joeac.net> | 2026-06-17 18:19:09 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-06-17 18:19:09 +0100 |
| commit | 70689047cae29c6a2c7f633531f97405c2e8f5a1 (patch) | |
| tree | f83a063fce82f2c285a8b8ccc5b0672681a57bf6 /http | |
| parent | b4be3ed2a66b034796abb8a6b58c96d85d21d338 (diff) | |
macroises blog_rule
Diffstat (limited to 'http')
| -rw-r--r-- | http/Makefile | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/http/Makefile b/http/Makefile index fcb2448..60f4252 100644 --- a/http/Makefile +++ b/http/Makefile @@ -29,11 +29,16 @@ endef blogs := $(subst blogs/,,$(wildcard blogs/*)) -blog_deps = $(patsubst \ +blog_src = $(patsubst \ blogs/$(blog)/%.$(BLOG_EXT_$(blog)),\ src/$(blog)/%$(if $(BLOG_LAYOUT_$(blog)),.$(BLOG_LAYOUT_$(blog))).upphtml,\ $(shell find -L "blogs/$(blog)" -type f -and -name *.$(BLOG_EXT_$(blog)))) +define blog_rule = +.PHONY: $(blog) +$(blog): $(blog_src) +endef + all: microlog blog public out .PHONY: out @@ -45,11 +50,7 @@ $(foreach layout,$(layouts),\ $(foreach ext,$(sort $(out_deps_ext)),\ $(eval $(call out_rule,$(ext),.$(layout))))) -.PHONY: microlog -microlog: $(let blog,microlog,$(blog_deps)) - -.PHONY: blog -blog: $(let blog,blog,$(blog_deps)) +$(foreach blog,$(blogs),$(eval $(blog_rule))) $(foreach blog,$(blogs),\ $(foreach layout,$(layouts),\ |
