[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46052: Colons fooling GNUmakefile mode
From: |
Kévin Le Gouguec |
Subject: |
bug#46052: Colons fooling GNUmakefile mode |
Date: |
Sat, 23 Jan 2021 15:58:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> I'm not sure a target line cannot possibly start with a TAB.
I'll admit to not being an expert in makefile syntax; I do find this
entry in (info "(make) Error Messages") encouraging though:
> 'recipe commences before first target. Stop.'
> 'missing rule before recipe. Stop.'
> This means the first thing in the makefile seems to be part of a
> recipe: it begins with a recipe prefix character and doesn't appear
> to be a legal 'make' directive (such as a variable assignment).
> Recipes must always be associated with a target.
While that phrasing doesn't rule out subsequent targets from starting
with a TAB, empirically that seems to be the case:
#+begin_src makefile
foo:
echo foo
bar:
echo bar
#+end_src
$ make
echo foo
foo
bar:
make: bar:: No such file or directory
make: *** [makefile:3: foo] Error 127
#+begin_src makefile
foo:
echo foo
QUUX = CORGE
bar:
echo bar
#+end_src
$ make
makefile:6: *** recipe commences before first target. Stop.