bugmake - Bugs: bug #47624, Suppress unnecessary warning for...

 
 

bug #47624: Suppress unnecessary warning for "include XXX" when we know how to build XXX

Submitter:  Stefan Becker <stefanb>
Submitted:  Tue 05 Apr 2016 08:18:01 AM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.1 Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 10 Apr 2016 12:23:49 AM UTC, comment #3: 

I've fixed bug #102 instead, which solves this problem completely (even if the rule to build the included makefile isn't defined until after the include line).

Paul D. Smith <psmith>
Group administrator
Tue 05 Apr 2016 02:56:21 PM UTC, comment #2: 

I would suggest one small change: instead of making the message go away entirely, change it to reflect the full situation:

a) No such file or directory, no path to rebuild.  Stopping.
b) No such file or directory, rebuilding from target (...)
c) Rule file out of date, rebuilding from target (...)

Brian Vandenberg <phantal>
Tue 05 Apr 2016 01:28:30 PM UTC, comment #1: 

I like this change because we have also seen much confusion resulting from this message-which-looks-like-an-error-message-but-isn't. Also want to point out an alternative:

Makefile.test:11: generated_include1: No such file or directory (remaking)

I lean toward suppressing the message entirely as the patch currently does but wanted to put this in the record.

Anonymous
Tue 05 Apr 2016 08:18:01 AM UTC, original submission:  

Over the years I have seen the same useless discussion popping up again and again, caused by an unnecessary warning generated by GNU make.

SW build user: build log shows "Makefile:NN: xyz: No such file or directory". Please replace "include" with "-include" in the build templates to remove this error message from the log.

SW build owner: This is a GNU make warning, not an error. "-include" cannot be used, because it causes GNU make to ignore real build errors.

Example test makefile:


.PHONY: default
default:
        @echo DONE

generated_include1:
        touch $@

include generated_include1

include generated_include2

generated_include2:
        touch $@


Test run:


$ rm -f generated_include*; /usr/bin/make -f Makefile.test
Makefile.test:11: generated_include1: No such file or directory
Makefile.test:13: generated_include2: No such file or directory
touch generated_include2
touch generated_include1
DONE


The first warning message is unnecessary, because GNU make already knows that it will be able to generate the file "generated_include1".

With the attached simple patch we suppress the warning for non-existing files for which GNU make already has parsed a recipe:


$ rm -f generated_include*; ./make -f Makefile.test
Makefile.test:13: generated_include2: No such file or directory
touch generated_include2
touch generated_include1
DONE


Stefan Becker <stefanb>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #36837:  dummy.patch added by stefanb (906B - text/x-patch - Patch to suppress "include X" warning message for X when recipe for X is already known)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by phantal (Posted a comment)
  • -email is unavailable- added by stefanb (Submitted the item)
  •  

    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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-10 psmith StatusNone Duplicate
        Open/ClosedOpen Closed
    2016-04-05 stefanb Attached File- Added dummy.patch, #36837

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code