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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 9, 2024, 21:23 UTC
Message-ID
<xmqqil0q1b8f.fsf@gitster.g>
In-Reply-To
<95f2454e449cc0126aaa40d2ab08c76b55ee3c31.camel@gnu.org>
Paul Smith <psmith@gnu.org> writes:
> I'm not sure I understand the suggestion here.  If I preserve the
> current parsing behavior what do I tell people who cannot get their
> makefiles to work because the current parsing doesn't allow it?

Their Makefiles were not working (perhaps began with HT followed by a command whose name happened to be "ifdef" installed in ~/bin/ifdef or something silly like that) before your "fix" to forbid using HT to indent conditional, so your "fix" is not breaking them any further.

If you optionally allow .if/.else etc., you can tell them to replace their "ifdef" with ".ifdef". Of course you can also tell them to replace their HT indent before "ifdef" to spaces.

But the point is that those whose Makefiles were not parsed correctly even before your "fix" need to fix their Makefiles anyway. The suggestion was about helping those whose Makefiles were happily been grokked somehow before your "fix". If you preserve the current code, their Makefiles that indent their "ifdef" with HT will continue to work, so you do not have to tell them anything, no?

Previous: Paul SmithNext: Jeff King
Message 9 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.