Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
build: add GZIP_COMPRESSION Make variable
Make gzip compression configurable for source, header, and binary
tarballs. Keep level 9 as the default.

Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
  • Loading branch information
inoway46 committed Sep 25, 2026
commit 2e40657491e3bfe3172cadd26bd3575ec58326a0
7 changes: 4 additions & 3 deletions Makefile
Comment thread
aduh95 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,7 @@ HAS_XZ ?= $(shell command -v xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || ech
SKIP_XZ ?= 0
XZ = $(shell [ $(HAS_XZ) -eq 1 ] && [ $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0)
XZ_COMPRESSION ?= 9e
GZIP_COMPRESSION ?= 9
PKG=$(TARNAME).pkg
MACOSOUTDIR=out/macos

Expand Down Expand Up @@ -1345,7 +1346,7 @@ endif
find $(TARNAME)/ -type l | xargs $(RM)
tar -cf $(TARNAME).tar $(TARNAME)
$(RM) -r $(TARNAME)
gzip -c -f -9 $(TARNAME).tar > $(TARNAME).tar.gz
gzip -c -f -$(GZIP_COMPRESSION) $(TARNAME).tar > $(TARNAME).tar.gz
ifeq ($(XZ), 1)
xz -c -f -$(XZ_COMPRESSION) $(TARNAME).tar > $(TARNAME).tar.xz
endif
Expand Down Expand Up @@ -1390,7 +1391,7 @@ $(TARBALL)-headers: release-only
find $(TARNAME)/ -type l | xargs $(RM)
tar -cf $(TARNAME)-headers.tar $(TARNAME)
$(RM) -r $(TARNAME)
gzip -c -f -9 $(TARNAME)-headers.tar > $(TARNAME)-headers.tar.gz
gzip -c -f -$(GZIP_COMPRESSION) $(TARNAME)-headers.tar > $(TARNAME)-headers.tar.gz
ifeq ($(XZ), 1)
xz -c -f -$(XZ_COMPRESSION) $(TARNAME)-headers.tar > $(TARNAME)-headers.tar.xz
endif
Expand Down Expand Up @@ -1435,7 +1436,7 @@ ifeq ($(OSTYPE),darwin)
endif
tar -cf $(BINARYNAME).tar $(BINARYNAME)
$(RM) -r $(BINARYNAME)
gzip -c -f -9 $(BINARYNAME).tar > $(BINARYNAME).tar.gz
gzip -c -f -$(GZIP_COMPRESSION) $(BINARYNAME).tar > $(BINARYNAME).tar.gz
ifeq ($(XZ), 1)
xz -c -f -$(XZ_COMPRESSION) $(BINARYNAME).tar > $(BINARYNAME).tar.xz
endif
Expand Down