From 994fb96cf94676e400b44584249cf91314d778c4 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 1 Aug 2023 19:58:07 +0200 Subject: Fix html -> md dependencies --- Makefile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 53121cb..294b75e 100644 --- a/Makefile +++ b/Makefile @@ -4,13 +4,14 @@ 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 -- cgit 1.4.1