bugmake - Bugs: bug #30105, Recipes defined for special...

 
 

bug #30105: Recipes defined for special targets like .SUFFIXES are silently ignored: make should warn about them

Submitted by:  None
Submitted on:  Thu 10 Jun 2010 05:06:53 PM UTC  
 
Severity: 3 - NormalItem Group: Enhancement
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: 3.81Operating System: Any
Fixed Release: NoneTriage Status: Small Effort

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sat 12 Jun 2010 12:54:25 AM UTC, comment #4:

(That explanation is clear, thanks. That'll teach me to search for TAB in capitals, as is used sometimes elsewhere in the manual.)

Martin Dorey <mdorey>
Sat 12 Jun 2010 12:45:57 AM UTC, comment #3:

Make preprocessor lines like ifdef, etc. also do not count as stopping a recipe, of course, otherwise code like:

would not work. I didn't mean my description below to be a complete definition.

The make manual says (in the section "Command Syntax"):

Paul D. Smith <psmith>
Project Administrator
Sat 12 Jun 2010 12:35:07 AM UTC, comment #2:

So ifeq (yes, yes) counts a "a blank line" because it evaluates to nothing? "a blank line" would be consistent with "next line that does not begin with a TAB", so that wording's not optimal. "next line that begins with something other than a TAB" might be OK but the subtle distinction would be lost on most readers, me included. This is news to me (well, apart from the SUFFIXES bit) and I'm not seeing a clear explanation of it in the manual (3.81 or CVS).

Martin Dorey <mdorey>
Sat 12 Jun 2010 12:10:42 AM UTC, comment #1:

This is not a bug. .SUFFIXES is a target (it's a special target, but a target nonetheless).

The makefile syntax is, and has always been, that any lines following a target that begin with a TAB are considered recipe lines for that target, up until the next line that does not begin with a TAB. Intervening blank lines, comment lines, etc. are not considered to "finish" a target recipe.

It's probably worthwhile to consider an enhancement that displays a warning if recipes are defined for special targets where they have no meaning. I'm retargeting this as an enhancement request.

Paul D. Smith <psmith>
Project Administrator
Thu 10 Jun 2010 05:06:53 PM UTC, original submission:

I stubled across this apparent bug today.

.SUFFIXES: ;
ifeq (yes,yes)
FOO = foo # leading tab inteferes!
endif
all:
@echo FOO is $(FOO)
FOO is

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #20730:  makefile added by None (96B - application/octet-stream - test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mdorey (Posted a comment)
  • -unavailable- added by psmith (Posted a comment)
  •  

    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):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 12 Jun 2010 12:10:42 AM UTCpsmithItem GroupBug=>Enhancement
      Triage StatusNone=>Small Effort
      SummaryVariables set immediately after .SUFFIXES: ; are not set when leading tabs are used=>Recipes defined for special targets like .SUFFIXES are silently ignored: make should warn about them
    Thu 10 Jun 2010 05:08:13 PM UTCNoneAttached File-=>Added makefile, #20730

    Back to the top


    Powered by Savane 3.1-cleanup