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

 
 

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

Submitted by:  None
Submitted on:  Fri 17 Mar 2006 07:45:04 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: Not A BugPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 4.0Operating System: None
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project 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

 

(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

 

CC list is empty

 

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 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 20 Mar 2006 01:52:04 PM UTCpsmithStatusNone=>Not A Bug
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1