wip static xxhash

This commit is contained in:
2025-11-27 07:54:57 +00:00
parent 60384962e9
commit 089f23f446

View File

@@ -7,11 +7,20 @@ GZ = $(patsubst %,%.gz,$(SRCS))
.PHONY: all .PHONY: all
all: $(ZSTD) $(BR) $(GZ) all: $(ZSTD) $(BR) $(GZ)
%.br: % .SECONDARY:
brotli $<
%.zst: % %.br: %.xxhash
zstd -19 $< brotli -f $*
%.gz: % %.zst: %.xxhash
zopfli $< zstd -f -19 $*
%.gz: %.xxhash
zopfli $*
# https://github.com/gohugoio/hugo/issues/10842
%.xxhash: %
current=$$(xxhsum $< | cut -d' ' -f1); \
if [ ! -f $< ] || [ "$$(cat $@ 2>/dev/null)" != "$$current" ]; then \
echo "$$current" > $@; \
fi