Re: [PATCH] Makefile: tweak sed invocation

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

 



On 2018-06-25 16:15, Eric Sunshine wrote:
On Mon, Jun 25, 2018 at 3:18 PM Alejandro R. Sedeño <asedeno@xxxxxxx> wrote:
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.

MacOS and the various BSD's ship with BSD 'sed', not GNU 'sed', so it
seemed prudent to check this change against them as well, which I did,
and can report that it does not cause any regression on those
platforms.

Therefore, the patch looks good. Thanks.

Thanks for checking on that, Eric. I tested MacOS locally before submitting as well. From a quick skim of the POSIX sed page, the space is expected, so this should be portable.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html

-Alejandro


Signed-off-by: Alejandro R. Sedeño <asedeno@xxxxxxx>
---
diff --git a/Makefile b/Makefile
@@ -2109,7 +2109,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' \




[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