git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile(s): avoid recipe prefix in conditional statements

From
Jeff King <peff@peff.net>
Date
Apr 9, 2024, 00:04 UTC
Message-ID
<20240409000414.GA1647304@coredump.intra.peff.net>
In-Reply-To
<606990048585347654f3b4b187ec27f4dc1b85e3.camel@gnu.org>
On Mon, Apr 08, 2024 at 07:24:16PM -0400, Paul Smith wrote:
Show 8 quoted lines
> If you wanted to make an even bigger change, which might save some
> hair-pulling down the road but is a very serious decision, you could
> introduce the use of the .RECIPEPREFIX [1] variable to change the
> recipe prefix from TAB to some other character (as it should have been
> when make was created back in the 1970's).
> 
> .RECIPEPREFIX was introduced in GNU Make 3.82, which was released in
> 2010 FYI.

Unfortunately, that's too recent for us. :( We try to keep the GNU make dependency to 3.81, since that's the latest one Apple ships (because they're allergic to GPLv3). Obviously it's not impossible to jump past that and require people to install make via homebrew, etc, but that makes it a more significant version bump than usual.

I do find it curious that in:
ifdef FOO
	SOME_VAR += bar
endif

the tab is significant for "ifdef" but not for SOME_VAR (at least that is implied by Taylor's patch, which does not touch the bodies within the conditionals).

I may just be showing my ignorance of the parsing issue, though. For anybody else digging into the details, I think the correct link is:

  https://savannah.gnu.org/bugs/index.php?64185
(the commit has the wrong bug number, 64815).
-Peff
Previous: Junio C HamanoNext: Jeff King
Message 10 of 13 in “Makefiles are broken as of GNU Make commit 07fcee35f058a876447c8a021f9eb1943f902534”
  1. Dario GjorgjevskiApr 8, 2024
  2. Makefile(s): avoid recipe prefix in conditional statementsTaylor Blau, Apr 8, 2024
  3. Junio C HamanoApr 8, 2024
  4. Paul SmithApr 8, 2024
  5. Junio C HamanoApr 8, 2024
  6. Paul SmithApr 9, 2024
  7. Junio C HamanoApr 8, 2024
  8. Paul SmithApr 9, 2024
  9. Junio C HamanoApr 9, 2024
  10. Jeff KingApr 9, 2024
  11. Jeff KingApr 9, 2024
  12. Paul SmithApr 9, 2024
  13. Junio C HamanoApr 8, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.