Bug 244068 - errors building included files don't stop make
Summary: errors building included files don't stop make
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: make
Version: 6
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Petr Machata
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-13 15:53 UTC by David M. Lee
Modified: 2015-05-05 01:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-25 15:10:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Example of the bug (330 bytes, application/octet-stream)
2007-06-13 16:08 UTC, David M. Lee
no flags Details

Description David M. Lee 2007-06-13 15:53:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

Description of problem:
If there's an error in building a file included by a Makefile, make should exit (at least that was the behavior with FC5's make-3.80-10.2).

In FC6 and F7, make continues happily along ignoring the error.

I'll attach a contrived example to demonstrate.

Version-Release number of selected component (if applicable):
make-3.81-1.1

How reproducible:
Always


Steps to Reproduce:
1. make -f include-bug.make

Actual Results:
[dmlee@fc6 tmp]$ make -f include-bug.make 
rm -f generatedIncludeThatINeed
false # simulate a bug
importantFile


Expected Results:
[dmlee@fc5 tmp]$ make -f include-bug.make
rm -f generatedIncludeThatINeed
false # simulate a bug
make: *** [generatedIncludeThatINeed] Error 1


Additional info:
This same bug exists in Fedora 7's make.

Comment 1 David M. Lee 2007-06-13 16:08:57 UTC
Created attachment 156892 [details]
Example of the bug

Just run this as 'make -f include-bug.make', and you will see what I'm talking
about.

Comment 2 Petr Machata 2007-06-25 15:10:04 UTC
That's because you include the file with the "-include" directive.  From the manual:

"""
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,
like this:

     -include filenames...

This acts like include in every way except that there is no error (not even a
warning) if any of the filenames do not exist. For compatibility with some other
make implementations, sinclude is another name for -include.
"""

If you want make to fail when the dependency isn't available, include simply
with a "include" directive.  I guess the change in behavior is actually due to
some bugfix.


Note You need to log in before you can comment on or make changes to this bug.