URL:
<https://savannah.gnu.org/bugs/?55242>
Summary: Included Makefile not found, no rule to build it but
make does not fail
Project: make
Submitted by: None
Submitted on: Wed 19 Dec 2018 12:37:06 PM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 4.2.1
Operating System: Any
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
With the following Makefile:
.PHONY: all clean
all:;
include a.mk
a.mk: b
b:
@touch $@
@printf '$$(info a.mk included)' > a.mk
clean:
@rm -f a.mk b
The first make invocation produces:
$ make
make: Nothing to be done for 'all'.
And the second make invocation:
make
a.mk included
make: Nothing to be done for 'all'.
So we are in a situation where:
0 a makefile is included with the include directive (no -include),
0 the included makefile is not found,
0 make finds no rule to produce it and decides not to include it,
0 make executes a recipe for a prerequisite of the included makefile that
incidentally also produces the included makefile,
0 as the included makefile is finally found make does not fail... but it does
not read the included makefile.
This could be considered as contradictory with the documentation:
_After all makefiles have been checked, if any have actually been changed,
make starts with a clean slate and reads all the makefiles over again._
make should either fail or include the included makefile.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55242>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
_______________________________________________
Bug-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-make