bug-make
[Top][All Lists]
Advanced

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

Regression in make 3.81, still present in rc2


From: Bertrand Mollinier Toublet
Subject: Regression in make 3.81, still present in rc2
Date: Thu, 30 Mar 2006 15:12:38 -0800
User-agent: Thunderbird 1.5 (Windows/20051201)

Hello,

I have identified what I think is a regression in make 3.81*. I just verified it to still be present in rc2. I have searched the open bugs and the mailing list archive, but have not found references to a similar issue. If they exist, can you please point them out to me :-)

Now to the issue itself: it has to do with -include-ing Makefiles and unsatisfied dependencies.

Consider the following Makefile:
-----Makefile----8<------------------
.SUFFIXES:

-include baz

foo:
        touch $@
-----Makefile----8<------------------

The file baz has a content similar to what a real-life source-file.d source dependency file would contain:

-----baz---------8<------------------
foo baz: bar
-----baz---------8<------------------

The file bar does not exist on the file system.

When executing the Makefile with make 3.80, make complains, when it wants attempts to rebuild the included makefile baz, that the dependency bar is missing and that it does not now how to make it:

$ make --version
GNU Make 3.80
$ make
make: *** No rule to make target `bar', needed by `baz'.  Stop.
$ make -d
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `baz' (search path) (don't care) (no ~ expansion)...
Updating makefiles....
 Considering target file `baz'.
  Looking for an implicit rule for `baz'.
  Trying pattern rule with stem `baz'.
  Trying implicit prerequisite `baz,v'.
  Trying pattern rule with stem `baz'.
  Trying implicit prerequisite `RCS/baz,v'.
  Trying pattern rule with stem `baz'.
  Trying implicit prerequisite `RCS/baz'.
  Trying pattern rule with stem `baz'.
  Trying implicit prerequisite `s.baz'.
  Trying pattern rule with stem `baz'.
  Trying implicit prerequisite `SCCS/s.baz'.
  No implicit rule found for `baz'.
   Considering target file `bar'.
    File `bar' does not exist.
    Looking for an implicit rule for `bar'.
    Trying pattern rule with stem `bar'.
    Trying implicit prerequisite `bar,v'.
    Trying pattern rule with stem `bar'.
    Trying implicit prerequisite `RCS/bar,v'.
    Trying pattern rule with stem `bar'.
    Trying implicit prerequisite `RCS/bar'.
    Trying pattern rule with stem `bar'.
    Trying implicit prerequisite `s.bar'.
    Trying pattern rule with stem `bar'.
    Trying implicit prerequisite `SCCS/s.bar'.
    No implicit rule found for `bar'.
    Finished prerequisites of target file `bar'.
   Must remake target `bar'.
make: *** No rule to make target `bar', needed by `baz'.  Stop.

Arguably, this behavior is not necessarily correct, as baz is included with '-include' instead of 'include', so that errors during the processing of the inclusion should be silently ignored.

I guess that make 3.81* attempted to correct this behavior, but did not go all the way:

$ make --version
GNU Make 3.81rc2
$ make
<no output(!) final target 'foo' is not made>
$ echo $?
2
<make silently fails with error code 2>
$ make -d
Reading makefiles...
Reading makefile `Makefile'...
Reading makefile `baz' (search path) (don't care) (no ~ expansion)...
Updating makefiles....
 Considering target file `baz'.
  Looking for an implicit rule for `baz'.
  Trying pattern rule with stem `baz'.
  Trying implicit prerequisite `baz,v'.
  Trying pattern rule with stem `baz'.
  Trying implicit prerequisite `RCS/baz,v'.
  Trying pattern rule with stem `baz'.
  Trying implicit prerequisite `RCS/baz'.
  Trying pattern rule with stem `baz'.
  Trying implicit prerequisite `s.baz'.
  Trying pattern rule with stem `baz'.
  Trying implicit prerequisite `SCCS/s.baz'.
  No implicit rule found for `baz'.
   Considering target file `bar'.
    File `bar' does not exist.
    Looking for an implicit rule for `bar'.
    Trying pattern rule with stem `bar'.
    Trying implicit prerequisite `bar,v'.
    Trying pattern rule with stem `bar'.
    Trying implicit prerequisite `RCS/bar,v'.
    Trying pattern rule with stem `bar'.
    Trying implicit prerequisite `RCS/bar'.
    Trying pattern rule with stem `bar'.
    Trying implicit prerequisite `s.bar'.
    Trying pattern rule with stem `bar'.
    Trying implicit prerequisite `SCCS/s.bar'.
    No implicit rule found for `bar'.
    Finished prerequisites of target file `bar'.
   Must remake target `bar'.
   Failed to remake target file `bar'.
  Finished prerequisites of target file `baz'.
 Giving up on target file `baz'.
 Considering target file `Makefile'.
  Looking for an implicit rule for `Makefile'.
  Trying pattern rule with stem `Makefile'.
  Trying implicit prerequisite `Makefile,v'.
  Trying pattern rule with stem `Makefile'.
  Trying implicit prerequisite `RCS/Makefile,v'.
  Trying pattern rule with stem `Makefile'.
  Trying implicit prerequisite `RCS/Makefile'.
  Trying pattern rule with stem `Makefile'.
  Trying implicit prerequisite `s.Makefile'.
  Trying pattern rule with stem `Makefile'.
  Trying implicit prerequisite `SCCS/s.Makefile'.
  No implicit rule found for `Makefile'.
  Finished prerequisites of target file `Makefile'.
 No need to remake target `Makefile'.
Updating goal targets....
Considering target file `foo'.
 File `foo' does not exist.
  Pruning file `bar'.
 Finished prerequisites of target file `foo'.
Giving up on target file `foo'.

When trying to update the makefiles, make is not able to rebuild baz because of the missing dependency bar, which it does not know how to make. Because of the '-include', this failure is correctly silently ignored.

However, when later make attempts to build the final target foo, it prunes the missing dependency bar (I guess this is OK: the result of attempting to make that one is already known), but fails to report that it does not know how to build the missing dependency.

So, from there, my questions are:
- is this actually a known issue? (and if yes, can someone please indicate me where to look for it)
 - if not, is there an agreement that this is indeed a bug?
 - if yes, I will enter a new bug on the project page.

Thanks,
--
Bertrand Mollinier Toublet | Sigma Designs, inc.




reply via email to

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