Re: sed: command garbled: rGIT-PERL-HEADER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeffrey Walton <noloader@xxxxxxxxx> 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@xxxxxxx>
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@xxxxxxx>
Reviewed-by: Eric Sunshine <sunshine@xxxxxxxxxxxxxx>
Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
---
 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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux