[PATCH 2/4] Define TAR_CF and TAR_XF variables in Makefile
From: lufia via GitGitGadget <hidden>
Date: 2020-08-06 01:05:31
Subsystem:
kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers:
Nathan Chancellor, Nicolas Schier, Linus Torvalds
From: lufia <redacted> Plan 9's tar(1) don't support o option. So I changed Makefiles to replace tar commands if needed. Signed-off-by: lufia <redacted> --- Makefile | 14 ++++++++------ templates/Makefile | 6 ++++-- 2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 372139f1f2..e222241509 100644
--- a/Makefile
+++ b/Makefile@@ -547,6 +547,8 @@ AR = ar RM = rm -f DIFF = diff TAR = tar +TAR_CF = $(TAR) cf +TAR_XF = $(TAR) xof FIND = find INSTALL = install TCL_PATH = tclsh
@@ -2926,13 +2928,13 @@ endif $(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)' ifndef NO_GETTEXT $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(localedir_SQ)' - (cd po/build/locale && $(TAR) cf - .) | \ - (cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR) xof -) + (cd po/build/locale && $(TAR_CF) - .) | \ + (cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR_XF) -) endif ifndef NO_PERL $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perllibdir_SQ)' - (cd perl/build/lib && $(TAR) cf - .) | \ - (cd '$(DESTDIR_SQ)$(perllibdir_SQ)' && umask 022 && $(TAR) xof -) + (cd perl/build/lib && $(TAR_CF) - .) | \ + (cd '$(DESTDIR_SQ)$(perllibdir_SQ)' && umask 022 && $(TAR_XF) -) $(MAKE) -C gitweb install endif ifndef NO_TCLTK
@@ -2999,8 +3001,8 @@ install-man: install-man-perl install-man-perl: man-perl $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mandir_SQ)/man3' - (cd perl/build/man/man3 && $(TAR) cf - .) | \ - (cd '$(DESTDIR_SQ)$(mandir_SQ)/man3' && umask 022 && $(TAR) xof -) + (cd perl/build/man/man3 && $(TAR_CF) - .) | \ + (cd '$(DESTDIR_SQ)$(mandir_SQ)/man3' && umask 022 && $(TAR_XF) -) install-html: $(MAKE) -C Documentation install-html
diff --git a/templates/Makefile b/templates/Makefile
index d22a71a399..eddc07effb 100644
--- a/templates/Makefile
+++ b/templates/Makefile@@ -6,6 +6,8 @@ endif INSTALL ?= install TAR ?= tar +TAR_CF ?= tar cf +TAR_XF ?= tar xof RM ?= rm -f prefix ?= $(HOME) template_instdir ?= $(prefix)/share/git-core/templates
@@ -62,5 +64,5 @@ clean: install: all $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)' - (cd blt && $(TAR) cf - .) | \ - (cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xof -) + (cd blt && $(TAR_CF) - .) | \ + (cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR_XF) -)
--
gitgitgadget