From 90cdae43a6d7c8fe00dc2cc54cce44ef989d2075 Mon Sep 17 00:00:00 2001 From: Daniel Roggow Date: Tue, 5 Mar 2019 14:54:42 -0600 Subject: Build system: Use GZIP_ENV instead of GZIP Older versions of gzip assume the GZIP environment variable contains flags[1]. Building netsniff-ng on a system with such a version of gzip will yield the following error: INST netsniff-ng/netsniff-ng gzip -9 -c netsniff-ng.8 > netsniff-ng/netsniff-ng.8.gz gzip: gzip: No such file or directory A practical alternative to redefining GZIP in the Makefile seems to be to use the GZIP_ENV make variable[2] instead. [1] The GZIP environment variable was deprecated in gzip version 1.7. See https://www.gnu.org/software/gzip/manual/html_node/Environment.html and https://git.savannah.gnu.org/cgit/gzip.git/tree/NEWS for more information. [2] https://www.gnu.org/software/automake/manual/automake.html#index-GZIP_005fENV Signed-off-by: Daniel Roggow --- Cmds | 2 +- Template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cmds b/Cmds index e841d26..e590b38 100644 --- a/Cmds +++ b/Cmds @@ -52,7 +52,7 @@ MKDIR = echo -e " MKDIR\t$(1)" && mkdir -p $(1) RM = echo -e " RM\t$(1)" && rm -rf $(1) RMDIR = echo -e " RM\t$(1)" && rmdir --ignore-fail-on-non-empty $(1) 2> /dev/null || true -GZIP = gzip -9 -c +GZIP_ENV = -9 -c # Git related GIT_LAST_TAG = git describe --abbrev=0 v$(VERSION_SHORT)^ diff --git a/Template b/Template index 0847cdb..056f594 100644 --- a/Template +++ b/Template @@ -9,7 +9,7 @@ define TOOL_templ $(Q)$$(call RM,$(1)/*.o $(1)/$(1) $(1)/*.gz) $(1)_do_install: $(Q)$$(call INSTX,$(1)/$(1),$$(DESTDIR)$$(SBINDIR)) - $(Q)$(GZIP) $(1).8 > $(1)/$(1).8.gz + $(Q)eval GZIP= gzip $(GZIP_ENV) $(1).8 > $(1)/$(1).8.gz $(Q)$$(call INST,$(1)/$(1).8.gz,$$(DESTDIR)$$(MAN8DIR)) $(Q)$$(foreach file,$$($(1)-confs),$$(call INST,$$(file),$$(DESTDIR)$$(ETCDIRE));) $(1)_install: $(1)_do_install $(1)_post_install -- cgit v1.2.3-54-g00ecf