Bug 244068 - errors building included files don't stop make
errors building included files don't stop make
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: make (Show other bugs)
6
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Petr Machata
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-13 11:53 EDT by David M. Lee
Modified: 2015-05-04 21:33 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-25 11:10:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description David M. Lee 2007-06-13 11:53:06 EDT
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 12:08:57 EDT
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 11:10:04 EDT
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.