Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, junkio@cox.net
Subject: Re: [PATCH] Fix compilation
Date: Fri, 07 Jul 2006 13:02:35 -0700	[thread overview]
Message-ID: <7vbqs1w5d0.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0607070120590.29667@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Fri, 7 Jul 2006 01:21:57 +0200 (CEST)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> 	Note also, that this patch relies on the perl scripts not
> 	caring if an additional command is shifted into the 2nd line.

How about doing something like this instead, then?

diff --git a/Makefile b/Makefile
index 71657ec..01b9a94 100644
--- a/Makefile
+++ b/Makefile
@@ -550,9 +550,13 @@ common-cmds.h: Documentation/git-*.txt
 $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
 	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"\''));' \
+	sed -e '1{' \
+	    -e '	s|#!.*perl|#!$(PERL_PATH_SQ)|' \
+	    -e '	h' \
+	    -e '	s=.*=use lib (split(/:/, $$ENV{GITPERLLIB} || "@@INSTLIBDIR@@"));=' \
+	    -e '	H' \
+	    -e '	x' \
+	    -e '}' \
 	    -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 	    $@.perl >$@+

  parent reply	other threads:[~2006-07-07 20:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-06 23:21 [PATCH] Fix compilation Johannes Schindelin
2006-07-07  0:15 ` Junio C Hamano
2006-07-07 20:02 ` Junio C Hamano [this message]
2006-07-08  2:04   ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vbqs1w5d0.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox