Skip to content

Commit 22f8f3e

Browse files
committed
Define TAR_CF and TAR_XF variables in Makefile
Plan 9's tar(1) don't support o option. So I changed Makefiles to replace tar commands if needed. Signed-off-by: lufia <[email protected]>
1 parent 1f63b4f commit 22f8f3e

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,8 @@ AR = ar
547547
RM = rm -f
548548
DIFF = diff
549549
TAR = tar
550+
TAR_CF = $(TAR) cf
551+
TAR_XF = $(TAR) xof
550552
FIND = find
551553
INSTALL = install
552554
TCL_PATH = tclsh
@@ -2926,13 +2928,13 @@ endif
29262928
$(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
29272929
ifndef NO_GETTEXT
29282930
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(localedir_SQ)'
2929-
(cd po/build/locale && $(TAR) cf - .) | \
2930-
(cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR) xof -)
2931+
(cd po/build/locale && $(TAR_CF) - .) | \
2932+
(cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR_XF) -)
29312933
endif
29322934
ifndef NO_PERL
29332935
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perllibdir_SQ)'
2934-
(cd perl/build/lib && $(TAR) cf - .) | \
2935-
(cd '$(DESTDIR_SQ)$(perllibdir_SQ)' && umask 022 && $(TAR) xof -)
2936+
(cd perl/build/lib && $(TAR_CF) - .) | \
2937+
(cd '$(DESTDIR_SQ)$(perllibdir_SQ)' && umask 022 && $(TAR_XF) -)
29362938
$(MAKE) -C gitweb install
29372939
endif
29382940
ifndef NO_TCLTK
@@ -2999,8 +3001,8 @@ install-man: install-man-perl
29993001

30003002
install-man-perl: man-perl
30013003
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mandir_SQ)/man3'
3002-
(cd perl/build/man/man3 && $(TAR) cf - .) | \
3003-
(cd '$(DESTDIR_SQ)$(mandir_SQ)/man3' && umask 022 && $(TAR) xof -)
3004+
(cd perl/build/man/man3 && $(TAR_CF) - .) | \
3005+
(cd '$(DESTDIR_SQ)$(mandir_SQ)/man3' && umask 022 && $(TAR_XF) -)
30043006

30053007
install-html:
30063008
$(MAKE) -C Documentation install-html

templates/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ endif
66

77
INSTALL ?= install
88
TAR ?= tar
9+
TAR_CF ?= tar cf
10+
TAR_XF ?= tar xof
911
RM ?= rm -f
1012
prefix ?= $(HOME)
1113
template_instdir ?= $(prefix)/share/git-core/templates
@@ -62,5 +64,5 @@ clean:
6264

6365
install: all
6466
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
65-
(cd blt && $(TAR) cf - .) | \
66-
(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xof -)
67+
(cd blt && $(TAR_CF) - .) | \
68+
(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR_XF) -)

0 commit comments

Comments
 (0)