[PATCH 2/4] Define TAR_CF and TAR_XF variables in Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: lufia <lufia@xxxxxxxxx>

Plan 9's tar(1) don't support o option.
So I changed Makefiles to replace tar commands if needed.

Signed-off-by: lufia <lufia@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux