[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