Fix html -> md dependencies
Alan Pearce alan@alanpearce.eu
Tue, 01 Aug 2023 19:58:07 +0200
1 files changed, 14 insertions(+), 13 deletions(-)
jump to
M Makefile → Makefile
@@ -4,13 +4,14 @@ .DELETE_ON_ERROR: PREFIX ?= public +md_files := $(shell fd . content --type=file -e md) brotli := brotli --force --no-copy-stat gzip := gzip --best --keep --force zstd := zstd --force --no-pass-through -19 --quiet --stdout build: $(PREFIX)/index.html -$(PREFIX)/index.html: config.toml content/**.md static/** templates/** themes/**/* +$(PREFIX)/index.html: config.toml $(md_files) zola build --force --output-dir $(PREFIX) format: .formatstamp @@ -28,40 +29,40 @@ brotli_files := $(patsubst %, %.br, $(to_compress)) gzip_files := $(patsubst %, %.gz, $(to_compress)) zstd_files := $(patsubst %, %.zst, $(to_compress)) -${PREFIX}/%.html.br: ${PREFIX}/%.html +%.html.br: %.html $(brotli) $< -${PREFIX}/%.xml.br: ${PREFIX}/%.xml +%.xml.br: %.xml $(brotli) $< -${PREFIX}/%.txt.br: ${PREFIX}/%.txt +%.txt.br: %.txt $(brotli) $< -${PREFIX}/%.asc.br: ${PREFIX}/%.asc +%.asc.br: %.asc $(brotli) $< -${PREFIX}/%.html.gz: ${PREFIX}/%.html +%.html.gz: %.html $(gzip) $< -${PREFIX}/%.xml.gz: ${PREFIX}/%.xml +%.xml.gz: %.xml $(gzip) $< -${PREFIX}/%.txt.gz: ${PREFIX}/%.txt +%.txt.gz: %.txt $(gzip) $< -${PREFIX}/%.asc.gz: ${PREFIX}/%.asc +%.asc.gz: %.asc $(gzip) $< -${PREFIX}/%.html.zst: ${PREFIX}/%.html +%.html.zst: %.html $(zstd) $< > $@ -${PREFIX}/%.xml.zst: ${PREFIX}/%.xml +%.xml.zst: %.xml $(zstd) $< > $@ -${PREFIX}/%.txt.zst: ${PREFIX}/%.txt +%.txt.zst: %.txt $(zstd) $< > $@ -${PREFIX}/%.asc.zst: ${PREFIX}/%.asc +%.asc.zst: %.asc $(zstd) $< > $@ compress: .compressstamp