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: anonymous
Subject: [bug #59956] Recipes inside conditionals can break the parser
Date: Wed, 27 Jan 2021 21:51:45 -0500 (EST)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36

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

> We can "fix" it by adding a simplifying heuristic; perhaps something like:
"conditional statements are only recognized if they are not prefixed by the
recipe prefix in effect when the if-statement started".  That is not perfect
but it's probably good enough.

I think this heuristic as stated would be disastrous at my $dayjob and
probably many others. Almost everyone who works on makefiles here is a C
programmer by trade and they're accustomed to indenting by tabs so I see a lot
of:

if ...
<tab>if ...
<tab>else
<tab>endif
else
endif

I try to discourage this and have written up a style guide which includes
"tabs should be used only as a recipe prefix" but there are still many such
instances.



    _______________________________________________________

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]