bugmake - Bugs: bug #55242, Included Makefile not found, no...


bug #55242: Included Makefile not found, no rule to build it but make does not fail

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
Component Version:  4.2.1 Operating System:  Any
Fixed Release:  None Triage Status:  None

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 19 Dec 2018 12:37:06 PM UTC, original submission:

With the following Makefile:

.PHONY: all clean


include a.mk

a.mk: b

        @touch $@
        @printf '$$(info a.mk included)' > a.mk

        @rm -f a.mk b

The first make invocation produces:

$ make
make: Nothing to be done for 'all'.

And the second make invocation:

a.mk included
make: Nothing to be done for 'all'.

So we are in a situation where:

  1. a makefile is included with the include directive (no -include),
  2. the included makefile is not found,
  3. make finds no rule to produce it and decides not to include it,
  4. make executes a recipe for a prerequisite of the included makefile that incidentally also produces the included makefile,
  5. 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.



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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




No changes have been made to this item

Back to the top

Powered by Savane 3.4