diff options
-rw-r--r-- | Makefile | 27 |
1 files changed, 14 insertions, 13 deletions
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 |