automake
[Top][All Lists]
Advanced

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

Re: depcomp on system headers


From: David Everly
Subject: Re: depcomp on system headers
Date: Mon, 7 Aug 2006 16:56:12 -0600

Thanks for responding Ralf,

On 8/7/06, Ralf Wildenhues <address@hidden> wrote:
Hello David,

* David Everly wrote on Mon, Aug 07, 2006 at 09:54:52PM CEST:
> The automake documentation...
[...]
> ...indicates:
>
> "Automake always uses complete dependencies for a compilation,
> including system headers."

Yes.  That may be debatable to some point, but this:

> However, a closed-source vendor gives us header files that contain:
>
> #include <numbrw.cc>

should not be one of it.

> This means that after I finish compiling, when I run make a second
> time it tries to compile
> /opt/aCC/include_std/rw/numbrw.cc, and of course, gets an error.

I don't see how that could happen.  After the first compilation of a
file, say foo.cc, the file .deps/foo.Po should have a dependency

| foo.o: foo.c \
|  # lots more files... \
|  /opt/aCC/include_std/rw/numbrw.cc

but also a line
| /opt/aCC/include_std/rw/numbrw.cc:

and no line stating a dependency on numbrw.o, which is what could cause
'make' to try to compile that "header" file.  I just tried that with
$ aCC -V
aCC: HP aC++/ANSI C B3910B A.06.10 [Mar 22 2006]

and a STL header file, where <algorithm> #includes a file algorithm.cc.

I think my problem happens because what our vendor does is #include
<rw/numbrw.cc> inside of rw/numbrw

Thus, you get deps like this:

rw/numbrw: rw/numbrw.cc
rw/numbrwcc:

Then gnu make takes that and decides that since numbrw.cc (mtime
1122853196) is slightly younger than numbrw (mtime 1122853195), numbrw
must be rebuilt from numbrw.cc --> numbrw.o --> numbrw

It seems to validate this when I run gnu make with -r, numbrw is not
trying to be rebuilt.

Here are some excerpts of gnu make -p

/opt/aCC/include_std/rw/numbrw.cc:
#  Implicit rule search has been done.
#  Last modified 2005-08-01 00:39:56
#  File has been updated.
#  Successfully updated.

/opt/aCC/include_std/rw/numbrw: /opt/aCC/include_std/rw/numbrw.cc
#  Implicit rule search has been done.
#  Implicit/static pattern stem: `/opt/aCC/include_std/rw/numbrw'
#  Modification time never checked.
#  File has been updated.
#  Failed to be updated.
# automatic
# @ := /opt/aCC/include_std/rw/numbrw
# automatic
# % :=
# automatic
# * := /opt/aCC/include_std/rw/numbrw
# automatic
# + := /opt/aCC/include_std/rw/numbrw.cc
# automatic
# | :=
# automatic
# < := /opt/aCC/include_std/rw/numbrw.cc
# automatic
# ^ := /opt/aCC/include_std/rw/numbrw.cc
# automatic
# ? := /opt/aCC/include_std/rw/numbrw.cc
# variable set hash-table stats:
# Load=8/32=25%, Rehash=0, Collisions=9/162=6%
#  commands to execute (built-in):
       $(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@




reply via email to

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