[PATCH] Fix compilation

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

 



Without this, make 3.79.1 (Darwin) says

rm -f git-archimport git-archimport+
INSTLIBDIR=`make -C perl -s --no-print-directory instlibdir` && \
sed -e '1s|#!.*perl|#!/usr/bin/perl|1' \
    -e '2i\
        use lib (split(/:/, $ENV{GITPERLLIB} || '\'"$INSTLIBDIR"\''));' \
    -e 's|@@INSTLIBDIR@@|'"$INSTLIBDIR"'|g' \
    -e 's/@@GIT_VERSION@@/1.4.1.gb564-dirty/g' \
    git-archimport.perl >git-archimport+
sed: 1: "2i use lib (split(/:/,  ...": command i expects \ followed by text

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@xxxxxx>

---

	Note that this just fixes compilation, not the tests. All of
	a sudden, I have to install Scalar::Util, where things were
	fine before Git.pm.

	Note also, that this patch relies on the perl scripts not
	caring if an additional command is shifted into the 2nd line.
	I checked all of them, and they don't.

 Makefile |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -563,8 +563,7 @@ common-cmds.h: Documentation/git-*.txt
 	rm -f $@ $@+
 	INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \
 	sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|1' \
-	    -e '2i\
-	        use lib (split(/:/, $$ENV{GITPERLLIB} || '\'"$$INSTLIBDIR"\''));' \
+	    -e "2s=^=use lib (split(/:/, \$$ENV{GITPERLLIB} || \'$$INSTLIBDIR\')); =g" \
 	    -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 	    $@.perl >$@+
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]