URL: <http://savannah.gnu.org/bugs/?47624>
Summary: Suppress unnecessary warning for "include XXX" when we know how to build XXX Project: make Submitted by: stefanb Submitted on: Tue 05 Apr 2016 08:18:01 AM GMT Severity: 3 - Normal Item Group: Enhancement Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 4.1 Operating System: None Fixed Release: None Triage Status: None _______________________________________________________ Details: 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 _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Tue 05 Apr 2016 08:18:01 AM GMT Name: dummy.patch Size: 906B By: stefanb Patch to suppress "include X" warning message for X when recipe for X is already known <http://savannah.gnu.org/bugs/download.php?file_id=36837> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?47624> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make