LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* tools/build/Build.include: fix # escaping in .cmd files for future Make
@ 2018-06-07 14:58 Paul Menzel
  2018-07-10 14:49 ` Paul Menzel
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Menzel @ 2018-06-07 14:58 UTC (permalink / raw)
  To: Rasmus Villemoes, Masahiro Yamada
  Cc: Randy Dunlap, linux-kbuild, Linux Kernel Mailing List, zibeon

[-- Attachment #1: Type: text/plain, Size: 2345 bytes --]

Date: Tue, 5 Jun 2018 19:00:22 +0200

In 2016 make made a backwards incompatible change to the way '#'
characters were handled in Makefiles when used inside functions or
macros:

http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b57

Due to this change, when attempting to run `make prepare' I get a
spurious make syntax error:

    /home/earnest/linux/tools/objtool/.fixdep.o.cmd:1: *** missing separator.  Stop.

When inspecting `.fixdep.o.cmd' it includes two lines which use
unescaped comment characters at the top:

    \# cannot find fixdep (/home/earnest/linux/tools/objtool//fixdep)
    \# using basic dep data

This is because `tools/build/Build.include' prints these '\#'
characters:

    printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
    printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \

This completes commit 9564a8cf (Kbuild: fix # escaping in .cmd files for
future Make).

Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
 tools/build/Build.include | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/build/Build.include b/tools/build/Build.include
index a4bbb984941d..d9048f145f97 100644
--- a/tools/build/Build.include
+++ b/tools/build/Build.include
@@ -63,8 +63,8 @@ dep-cmd = $(if $(wildcard $(fixdep)),
            $(fixdep) $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;           \
            rm -f $(depfile);                                                    \
            mv -f $(dot-target).tmp $(dot-target).cmd,                           \
-           printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
-           printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \
+           printf '$(pound) cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
+           printf '$(pound) using basic dep data\n\n' >> $(dot-target).cmd;           \
            cat $(depfile) >> $(dot-target).cmd;                                 \
            printf '\n%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)
 
-- 
2.16.2


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tools/build/Build.include: fix # escaping in .cmd files for future Make
  2018-06-07 14:58 tools/build/Build.include: fix # escaping in .cmd files for future Make Paul Menzel
@ 2018-07-10 14:49 ` Paul Menzel
  2018-07-10 14:50   ` [PATCH v3] " Paul Menzel
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Menzel @ 2018-07-10 14:49 UTC (permalink / raw)
  To: Rasmus Villemoes, Masahiro Yamada
  Cc: Randy Dunlap, linux-kbuild, linux-kernel, zibeon

[-- Attachment #1: Type: text/plain, Size: 2413 bytes --]

Date: Tue, 5 Jun 2018 19:00:22 +0200

In 2016 GNU Make made a backwards incompatible change to the way '#'
characters were handled in Makefiles when used inside functions or
macros:

http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b57

Due to this change, when attempting to run `make prepare' I get a
spurious make syntax error:

    /home/earnest/linux/tools/objtool/.fixdep.o.cmd:1: *** missing separator.  Stop.

When inspecting `.fixdep.o.cmd' it includes two lines which use
unescaped comment characters at the top:

    \# cannot find fixdep (/home/earnest/linux/tools/objtool//fixdep)
    \# using basic dep data

This is because `tools/build/Build.include' prints these '\#'
characters:

    printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
    printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \

This completes commit 9564a8cf (Kbuild: fix # escaping in .cmd files for
future Make).

Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
v2: Added stable@vger.kernel.org

 tools/build/Build.include | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/build/Build.include b/tools/build/Build.include
index a4bbb984941d..d9048f145f97 100644
--- a/tools/build/Build.include
+++ b/tools/build/Build.include
@@ -63,8 +63,8 @@ dep-cmd = $(if $(wildcard $(fixdep)),
            $(fixdep) $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;           \
            rm -f $(depfile);                                                    \
            mv -f $(dot-target).tmp $(dot-target).cmd,                           \
-           printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
-           printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \
+           printf '$(pound) cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
+           printf '$(pound) using basic dep data\n\n' >> $(dot-target).cmd;           \
            cat $(depfile) >> $(dot-target).cmd;                                 \
            printf '\n%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)
 
-- 
2.16.2


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3] tools/build/Build.include: fix # escaping in .cmd files for future Make
  2018-07-10 14:49 ` Paul Menzel
@ 2018-07-10 14:50   ` Paul Menzel
  2018-07-12 15:26     ` Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Menzel @ 2018-07-10 14:50 UTC (permalink / raw)
  To: Rasmus Villemoes, Masahiro Yamada
  Cc: Randy Dunlap, linux-kbuild, linux-kernel, zibeon

[-- Attachment #1: Type: text/plain, Size: 2441 bytes --]

Date: Tue, 5 Jun 2018 19:00:22 +0200

In 2016 GNU Make made a backwards incompatible change to the way '#'
characters were handled in Makefiles when used inside functions or
macros:

http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b57

Due to this change, when attempting to run `make prepare' I get a
spurious make syntax error:

    /home/earnest/linux/tools/objtool/.fixdep.o.cmd:1: *** missing separator.  Stop.

When inspecting `.fixdep.o.cmd' it includes two lines which use
unescaped comment characters at the top:

    \# cannot find fixdep (/home/earnest/linux/tools/objtool//fixdep)
    \# using basic dep data

This is because `tools/build/Build.include' prints these '\#'
characters:

    printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
    printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \

This completes commit 9564a8cf (Kbuild: fix # escaping in .cmd files for
future Make).

Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
v2: Add stable@vger.kernel.org
v3: Add tag PATCH to subject

 tools/build/Build.include | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/build/Build.include b/tools/build/Build.include
index a4bbb984941d..d9048f145f97 100644
--- a/tools/build/Build.include
+++ b/tools/build/Build.include
@@ -63,8 +63,8 @@ dep-cmd = $(if $(wildcard $(fixdep)),
            $(fixdep) $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;           \
            rm -f $(depfile);                                                    \
            mv -f $(dot-target).tmp $(dot-target).cmd,                           \
-           printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
-           printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \
+           printf '$(pound) cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
+           printf '$(pound) using basic dep data\n\n' >> $(dot-target).cmd;           \
            cat $(depfile) >> $(dot-target).cmd;                                 \
            printf '\n%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)
 
-- 
2.16.2


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] tools/build/Build.include: fix # escaping in .cmd files for future Make
  2018-07-10 14:50   ` [PATCH v3] " Paul Menzel
@ 2018-07-12 15:26     ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2018-07-12 15:26 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Rasmus Villemoes, Randy Dunlap, Linux Kbuild mailing list,
	Linux Kernel Mailing List, zibeon

2018-07-10 23:50 GMT+09:00 Paul Menzel <pmenzel@molgen.mpg.de>:
> Date: Tue, 5 Jun 2018 19:00:22 +0200
>
> In 2016 GNU Make made a backwards incompatible change to the way '#'
> characters were handled in Makefiles when used inside functions or
> macros:
>
> http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b57
>
> Due to this change, when attempting to run `make prepare' I get a
> spurious make syntax error:
>
>     /home/earnest/linux/tools/objtool/.fixdep.o.cmd:1: *** missing separator.  Stop.
>
> When inspecting `.fixdep.o.cmd' it includes two lines which use
> unescaped comment characters at the top:
>
>     \# cannot find fixdep (/home/earnest/linux/tools/objtool//fixdep)
>     \# using basic dep data
>
> This is because `tools/build/Build.include' prints these '\#'
> characters:
>
>     printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
>     printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \
>
> This completes commit 9564a8cf (Kbuild: fix # escaping in .cmd files for
> future Make).
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---



Applied to linux-kbuild/fixes.  Thanks!


> v2: Add stable@vger.kernel.org
> v3: Add tag PATCH to subject
>
>  tools/build/Build.include | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/build/Build.include b/tools/build/Build.include
> index a4bbb984941d..d9048f145f97 100644
> --- a/tools/build/Build.include
> +++ b/tools/build/Build.include
> @@ -63,8 +63,8 @@ dep-cmd = $(if $(wildcard $(fixdep)),
>             $(fixdep) $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;           \
>             rm -f $(depfile);                                                    \
>             mv -f $(dot-target).tmp $(dot-target).cmd,                           \
> -           printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
> -           printf '\# using basic dep data\n\n' >> $(dot-target).cmd;           \
> +           printf '$(pound) cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
> +           printf '$(pound) using basic dep data\n\n' >> $(dot-target).cmd;           \
>             cat $(depfile) >> $(dot-target).cmd;                                 \
>             printf '\n%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)
>
> --
> 2.16.2
>



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-12 15:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-07 14:58 tools/build/Build.include: fix # escaping in .cmd files for future Make Paul Menzel
2018-07-10 14:49 ` Paul Menzel
2018-07-10 14:50   ` [PATCH v3] " Paul Menzel
2018-07-12 15:26     ` Masahiro Yamada

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 NNTP newsgroup(s).