bugmake - Bugs: bug #16118, Change of behavior in beta[34] for...

 
 

bug #16118: Change of behavior in beta[34] for -include

Submitter:  None
Submitted:  Fri 17 Mar 2006 07:45:04 PM UTC
   
 
Severity:  3 - Normal Priority:  5 - Normal
Item Group:  Bug Status:  Not A Bug
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Component Version:  4.0
Operating System:  None Fixed Release:  None
Triage Status:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Mon 20 Mar 2006 01:52:04 PM UTC, comment #1: 

As best as I can tell this change was made intentionally.  The GNU make manual says:

   If you want `make' to simply ignore a makefile which does not exist and cannot be remade, with no error message, use the `-include' directive instead of `include'

The behavior of the previous versions of make did not match this description, since make would fail if it could not remake an included makefile.

If you want make to fail when a makefile can't be rebuilt, then you should use "include" instead of "-include".  A few other points: be careful to write your .d creation script so that if the .c file does not exist it will either fail or at least it won't create an empty .d file.  If you use -include then make will ignore it when it fails but at least you won't incorrectly hide the problem.  I suppose another option is to generate a .d file with a syntax error in it, then when make re-execs it will fail.  But this is a problem because you'll have to delete the broken .d file by hand before make will work again.

Also, one would assume that the non-existent .c file would cause a failure of some kind during the "normal" build portion of the makefile (not building .d files) so I don't see how this kind of error can go unnoticed for long.

I'm closing this as "Not a Bug" for now; please feel free to add more information about your situation and we can continue to discuss it.

Paul D. Smith <psmith>
Group administrator
Fri 17 Mar 2006 07:45:04 PM UTC, original submission:  

A sameple makefile

all:
file.d: file.c
-include file.d

Note that there are no rules for file.c.

old versions:
make gives
make: * No rule to make target `file.c', needed by `file.d'.  Stop.

make-beta[34]:
make gives
make: Nothing to be done for `all'.


Anonymous

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

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

History

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-03-20 psmith StatusNone Not A Bug
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.16-1eaf.
Corresponding source code