This is the mail archive of the
mailing list for the GCC project.
Re: problem with recent cplus-dem.o gcc/Makefile changes
- To: davem at dm dot cobaltmicro dot com
- Subject: Re: problem with recent cplus-dem.o gcc/Makefile changes
- From: Ian Lance Taylor <ian at cygnus dot com>
- Date: Tue, 18 Aug 1998 13:29:05 -0400
- CC: egcs-bugs at cygnus dot com
Date: Mon, 17 Aug 1998 23:38:45 -0700
From: "David S. Miller" <email@example.com>
The following change causes cplus-dem.o to not get built in the gcc
* Makefile.in (cplus-dep.o): Use cplus-dem.c from libiberty.
* cplus-dem.c: Delete.
I can't figure out why make refuses to built it, even with debugging
turned on make says:
Finished dependencies of target file `cplus-dem.o'.
Must remake target `cplus-dem.o'.
Successfully remade target file `cplus-dem.o'.
make: Nothing to be done for `cplus-dem.o'.
It never runs the build of cplus-dem.o, I even straced make and saw
that it found ../libiberty/cplus-dem.c and that gcc/cplus-dem.o did
not exist, funny.
This is because there is no rule explaining how to build cplus-dem.o.
It just looks like this in Makefile.in:
cplus-dem.o: $(srcdir)/../libiberty/cplus-dem.c $(DEMANGLE_H)
>From the make manual:
Note that explicit dependencies do not influence implicit rule
search. For example, consider this explicit rule:
The dependency on `foo.p' does not necessarily mean that `make' will
remake `foo.o' according to the implicit rule to make an object file, a
`.o' file, from a Pascal source file, a `.p' file. For example, if
`foo.c' also exists, the implicit rule to make an object file from a C
source file is used instead, because it appears before the Pascal rule
in the list of predefined implicit rules (*note Catalogue of Implicit
Rules: Catalogue of Rules.).
In other words, listing cplus-dem.c as a dependency has no affect on
how make builds cplus-dem.o. Since libiberty is not on VPATH, make
will not find cplus-dem.c when doing an implicit rule search. Since
no implicit rule matches, make can only execute the commands listed in
the Makefile, which is to say, make will do nothing.
The fix is to add an appropriate $(CC) line to build cplus-dem.o from
cplus-dem.c when it is out of date.