git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeffrey Walton <noloader@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: sed: command garbled: rGIT-PERL-HEADER
Date: Wed, 18 Jul 2018 10:49:22 -0700	[thread overview]
Message-ID: <xmqqtvowjuxp.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAH8yC8nef0iPVLqnkcJ2fh=N8jCM=tK1DXJJe+nx8cOL8K9D6A@mail.gmail.com> (Jeffrey Walton's message of "Wed, 18 Jul 2018 07:53:38 -0400")

Jeffrey Walton <noloader@gmail.com> writes:

> I'm trying to build Git 2.18 on Solaris 11.3 x86_64.
>
> $ gmake V=1
> rm -f git-add--interactive git-add--interactive+ && \
> sed -e '1{' \
>     -e '        s|#!.*perl|#!/usr/bin/perl|' \
>     -e '        rGIT-PERL-HEADER' \
>     -e '        G' \
>     -e '}' \
>     -e 's/@@GIT_VERSION@@/2.18.0/g' \
>     git-add--interactive.perl >git-add--interactive+ && \
> chmod +x git-add--interactive+ && \
> mv git-add--interactive+ git-add--interactive
> sed: command garbled:   rGIT-PERL-HEADER
> gmake: *** [git-add--interactive] Error 2
>
> And:
>
> $ perl --version
>
> This is perl 5, version 12, subversion 5 (v5.12.5) built for i86pc-solaris-64int
> (with 7 registered patches, see perl -V for more detail)
>
> Any ideas how to fix it?

The fix is prepared to become part of the next feature release (and
also some maintenance release before that happens).  Please try the
attached patch.

Thanks.


-- >8 --

From: Alejandro R. Sedeño <asedeno@mit.edu>
Date: Mon, 25 Jun 2018 15:13:25 -0400
Subject: [PATCH] Makefile: tweak sed invocation

With GNU sed, the r command doesn't care if a space separates it and
the filename it reads from.

With SunOS sed, the space is required.

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2ba24035f5..50138e85eb 100644
--- a/Makefile
+++ b/Makefile
@@ -2086,7 +2086,7 @@ $(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE
 	$(QUIET_GEN)$(RM) $@ $@+ && \
 	sed -e '1{' \
 	    -e '	s|#!.*perl|#!$(PERL_PATH_SQ)|' \
-	    -e '	rGIT-PERL-HEADER' \
+	    -e '	r GIT-PERL-HEADER' \
 	    -e '	G' \
 	    -e '}' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
-- 
2.18.0-129-ge3331758f1



  reply	other threads:[~2018-07-18 17:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 11:53 sed: command garbled: rGIT-PERL-HEADER Jeffrey Walton
2018-07-18 17:49 ` Junio C Hamano [this message]
2018-07-18 18:47   ` Jeffrey Walton
2018-07-18 19:12     ` Jeffrey Walton

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqtvowjuxp.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=noloader@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).