wip static xxhash
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user