bug-make
[Top][All Lists]
Advanced

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

[bug #59956] Recipes inside conditionals can break the parser


From: Paul D. Smith
Subject: [bug #59956] Recipes inside conditionals can break the parser
Date: Wed, 27 Jan 2021 19:32:26 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36

Follow-up Comment #4, bug #59956 (project make):

Any target can have a recipe, even special targets like *.PHONY:*, *.POSIX:*,
*.ONESHELL:*, etc.  Those recipes are ignored but they are syntactically
legal.  I guess there would be value in mentioning them if some sort of
"warning mode" were enabled.

Re *.RECIPEPREFIX*: I see; yes I should have tried it myself then I would have
realized what you meant.  Right, this bug is a weird confluence of the
Original Sin of makefiles (using TAB, which is just whitespace, as a recipe
prefix) and the choice in GNU make to use simple *else* as the keyword; other
make implementations use special keywords like *.else* or similar which are
less likely to conflict with "real rules".

If the recipe prefix is anything other than whitespace this bug cannot happen.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59956>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]