bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #55242] Included Makefile not found, no rule to build it but make d


From: anonymous
Subject: [bug #55242] Included Makefile not found, no rule to build it but make does not fail
Date: Wed, 19 Dec 2018 07:37:08 -0500 (EST)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:64.0) Gecko/20100101 Firefox/64.0

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]