bugmake - Bugs: bug #42599, .RECIPEPREFIX should not have to...

 
 

bug #42599: .RECIPEPREFIX should not have to be at beginning of line

Submitted by:  Dave Yost <yost>
Submitted on:  Sun 22 Jun 2014 08:40:54 PM UTC  
 
Severity: 3 - NormalItem Group: Enhancement
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 4.0Operating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 07 Jul 2014 07:48:23 AM UTC, comment #3:

FYI, the error message is a duplicate of bug #41677

Paul D. Smith <psmith>
Project Administrator
Fri 27 Jun 2014 07:53:10 PM UTC, comment #2:

Yeah, I realized later that there is an ambiguity problem. The obvious answer is to allow the prefix char if it is preceded by exactly the same whitespace as the rule line.

I think that's worthwhile.

Dave Yost <yost>
Fri 27 Jun 2014 06:56:32 PM UTC, comment #1:

FYI, .RECIPEPREFIX was added in GNU make 3.82.

I agree the error message is incorrect. In fact we shouldn't even be making that extra check in the case where RECIPEPREFIX is set.

I'm not sure I agree with the preceding whitespace request though. This adds a lot of possibility for error into the parsing: if your recipe prefix happens to match some character at the beginning of the line for example. What about this:

See the missing backslash at the end of the "xargs" line? Currently make will fail because it cannot parse the "while" line (no RECIPEPREFIX). If we allow leading whitespace then that looks like a recipe line and make will run it... and hang forever because the "read" is trying to read from stdin.

The rule for recipe prefixes is currently very simple: check the single first character on the line and see if it's the recipe introduction character. Adding the ability to precede it with whitespace is something I'd have to think very carefully about.

Paul D. Smith <psmith>
Project Administrator
Sun 22 Jun 2014 08:40:54 PM UTC, original submission:

.RECIPEPREFIX is a wonderful thing, long overdue. Thanks!

Make should allow the .RECIPEPREFIX character (if it is not a tab) to be preceded by whitespace.

gets this error:

Also it seems to me that this error message needs to be updated for the situation where .RECIPEPREFIX is set to something other than TAB.

Dave Yost <yost>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by yost (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup