[patch 04/15] diff-export.patch

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Gary V. Vaughan
Date: Monday, March 15, 2010 - 10:42 pm

Some of the flags used with the first diff found in PATH cause the
vendor diff to choke.
---
 Documentation/install-webdoc.sh |    2 +-
 Makefile                        |    4 +++-
 config.mak.in                   |    1 +
 configure.ac                    |    1 +
 git-merge-one-file.sh           |    2 +-
 t/Makefile                      |    1 +
 6 files changed, 8 insertions(+), 3 deletions(-)

Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -280,6 +280,7 @@ export prefix bindir sharedir sysconfdir
 CC = gcc
 AR = ar
 RM = rm -f
+DIFF = diff
 TAR = tar
 FIND = find
 INSTALL = install
@@ -1408,7 +1409,7 @@ endif
 ALL_CFLAGS += $(BASIC_CFLAGS)
 ALL_LDFLAGS += $(BASIC_LDFLAGS)
 
-export TAR INSTALL DESTDIR SHELL_PATH
+export DIFF TAR INSTALL DESTDIR SHELL_PATH
 
 
 ### Build rules
@@ -1698,6 +1699,7 @@ GIT-CFLAGS: FORCE
 GIT-BUILD-OPTIONS: FORCE
 	@echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
 	@echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@
+	@echo DIFF=\''$(subst ','\'',$(subst ','\'',$(DIFF)))'\' >>$@
 	@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
 	@echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
 	@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -342,6 +342,7 @@ fi
 #AC_PROG_INSTALL		# needs install-sh or install.sh in sources
 AC_CHECK_TOOLS(AR, [gar ar], :)
 AC_CHECK_PROGS(TAR, [gtar tar])
+AC_CHECK_PROGS(DIFF, [gnudiff gdiff diff])
 # TCLTK_PATH will be set to some value if we want Tcl/Tk
 # or will be empty otherwise.
 if test -z "$NO_TCLTK"; then
Index: b/Documentation/install-webdoc.sh
===================================================================
--- a/Documentation/install-webdoc.sh
+++ b/Documentation/install-webdoc.sh
@@ -12,7 +12,7 @@ do
 	then
 		: did not match
 	elif test -f "$T/$h" &&
-	   diff -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h"
+	   $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h"
 	then
 		:; # up to date
 	else
Index: b/git-merge-one-file.sh
===================================================================
--- a/git-merge-one-file.sh
+++ b/git-merge-one-file.sh
@@ -107,7 +107,7 @@ case "${1:-.}${2:-.}${3:-.}" in
 		# remove lines that are unique to ours.
 		orig=`git-unpack-file $2`
 		sz0=`wc -c <"$orig"`
-		diff -u -La/$orig -Lb/$orig $orig $src2 | git apply --no-add
+		$DIFF -u -La/$orig -Lb/$orig $orig $src2 | git apply --no-add
 		sz1=`wc -c <"$orig"`
 
 		# If we do not have enough common material, it is not
Index: b/config.mak.in
===================================================================
--- a/config.mak.in
+++ b/config.mak.in
@@ -8,6 +8,7 @@ LDFLAGS = @LDFLAGS@
 CC_LD_DYNPATH = @CC_LD_DYNPATH@
 AR = @AR@
 TAR = @TAR@
+DIFF = @DIFF@
 #INSTALL = @INSTALL@		# needs install-sh or install.sh in sources
 TCLTK_PATH = @TCLTK_PATH@
 

-- 
Gary V. Vaughan (gary@thewrittenword.com)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/15] Portability Patches v3, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 02/15] const-expr.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 03/15] pthread.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 04/15] diff-export.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 05/15] diff-test_cmp.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 06/15] diff-defaults.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 07/15] host-IRIX.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 08/15] host-HPUX10.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 10/15] host-OSF1.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 11/15] no-hstrerror.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 12/15] no-inet_ntop.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 13/15] no-socklen_t.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 14/15] no-ss_family.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
[patch 15/15] no-inline.patch, Gary V. Vaughan, (Mon Mar 15, 10:42 pm)
Re: [patch 00/15] Portability Patches v3, Sverre Rabbelier, (Mon Mar 15, 11:18 pm)
Re: [patch 05/15] diff-test_cmp.patch, Junio C Hamano, (Tue Mar 16, 12:21 am)
Re: [patch 03/15] pthread.patch, Junio C Hamano, (Tue Mar 16, 12:21 am)
Re: [patch 06/15] diff-defaults.patch, Junio C Hamano, (Tue Mar 16, 12:22 am)
Re: [patch 07/15] host-IRIX.patch, Junio C Hamano, (Tue Mar 16, 12:24 am)
Re: [patch 11/15] no-hstrerror.patch, Junio C Hamano, (Tue Mar 16, 12:24 am)
Re: [patch 04/15] diff-export.patch, Junio C Hamano, (Tue Mar 16, 12:24 am)
Re: [patch 13/15] no-socklen_t.patch, Junio C Hamano, (Tue Mar 16, 12:25 am)
Re: [patch 02/15] const-expr.patch, Johannes Sixt, (Tue Mar 16, 12:31 am)
Re: [patch 02/15] const-expr.patch, Gary V. Vaughan, (Tue Mar 16, 1:23 am)
Re: [patch 07/15] host-IRIX.patch, Brandon Casey, (Tue Mar 16, 8:27 am)
Re: [patch 00/15] Portability Patches v3, Brandon Casey, (Tue Mar 16, 9:03 am)
Re: [patch 02/15] const-expr.patch, Avery Pennarun, (Tue Mar 16, 4:43 pm)
Re: [patch 02/15] const-expr.patch, Gary V. Vaughan, (Sun Apr 25, 1:38 am)
Re: [patch 05/15] diff-test_cmp.patch, Gary V. Vaughan, (Sun Apr 25, 1:38 am)
Re: [patch 06/15] diff-defaults.patch, Gary V. Vaughan, (Sun Apr 25, 1:38 am)
Re: [patch 07/15] host-IRIX.patch, Gary V. Vaughan, (Sun Apr 25, 1:39 am)
Re: [patch 07/15] host-IRIX.patch, Gary V. Vaughan, (Sun Apr 25, 1:39 am)
Re: [patch 11/15] no-hstrerror.patch, Gary V. Vaughan, (Sun Apr 25, 1:39 am)
Re: [patch 13/15] no-socklen_t.patch, Gary V. Vaughan, (Sun Apr 25, 1:39 am)