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

[PATCH] Makefile: replace ugly and unportable sed invocation

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 2, 2006, 09:31 UTC
Message-ID
<Pine.LNX.4.63.0607021109540.29667@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7vr7145u17.fsf@assigned-by-dhcp.cox.net>
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
	Re: What's in git.git
	On Sun, 2 Jul 2006, Junio C Hamano wrote:
	>  - instaweb by Eric Wong.
	This breaks make on _all_ platforms I have.
	First of all, it is _ugly_ (three invocations of sed, where one 
	really is sufficient). Then, it uses the non-portable ';' 
	operator, and then, the non-at-all-portable 'T'.
	And worst: it is unnecessary.
 Makefile |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 7481ad9..90ad991 100644
--- a/Makefile
+++ b/Makefile
@@ -562,11 +562,11 @@ git-instaweb: git-instaweb.sh gitweb/git
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 	    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
 	    -e 's/@@NO_PYTHON@@/$(NO_PYTHON)/g' \
-	    $@.sh | sed \
-	    -e 's|@@GITWEB_CGI@@|#!$(PERL_PATH_SQ)|; T; r gitweb/gitweb.cgi' \
-	    | sed \
-	    -e 's|@@GITWEB_CSS@@||; T; r gitweb/gitweb.css' \
-	    > $@+
+	    -e '/@@GITWEB_CGI@@/rgitweb/gitweb.cgi' \
+	    -e '/@@GITWEB_CGI@@/d' \
+	    -e '/@@GITWEB_CSS@@/rgitweb/gitweb.css' \
+	    -e '/@@GITWEB_CSS@@/d' \
+	    $@.sh > $@+
 	chmod +x $@+
 	mv $@+ $@
 
-- 
1.4.1.g1089
Previous: Junio C HamanoNext: Eric Wong
Message 2 of 4 in “What's in git.git”
  1. Junio C HamanoJul 2, 2006
  2. Makefile: replace ugly and unportable sed invocationJohannes Schindelin, Jul 2, 2006
  3. instaweb: fix unportable ';' usage in sedEric Wong, Jul 2, 2006
  4. Junio C HamanoJul 2, 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.