git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix compilation

From
Junio C Hamano <junkio@cox.net>
Date
Jul 7, 2006, 20:02 UTC
Message-ID
<7vbqs1w5d0.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0607070120590.29667@wbgn013.biozentrum.uni-wuerzburg.de>
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 >$@+
Previous: Junio C HamanoNext: Johannes Schindelin
Message 3 of 4 in “Fix compilation”
  1. Fix compilationJohannes Schindelin, Jul 6, 2006
  2. Junio C HamanoJul 7, 2006
  3. Junio C HamanoJul 7, 2006
  4. Johannes SchindelinJul 8, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.