This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: automatic dependency tracking
* Tom Tromey wrote on Thu, Aug 07, 2008 at 10:06:16PM CEST:
> >>>>> "Ralf" == Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
>
> >> FWIW I did not want to change where the build puts objects; I didn't
> >> see a particular benefit to doing this.
>
> Ralf> It allows you to remove about 190 lines from the Makefile.
> Ralf> If you like, I can redo the patch or post a followup one, for this.
>
> I am curious about this. I thought old-style '.c.o' rules did not
> handle subdirectories properly. Is that not so? Or, what approach
> were you planning to take?
Yes, I was going to rely on '.c.o' rules. I don't remember problems
with subdirectories in .c.o rules, other than maybeee on Solaris 2.6.
But I tend to forget the details (and GNU make works on that system), on
<http://www.gnu.org/software/autoconf/manual/html_node/Portable-Make.html>
I cannot find anything else problematic. Maybe you are thinking of
compiler problems with "-c -o"?
Anyway, automake.in has had this encouraging note since 2003
(handle_single_transform, indentation dropped):
[...]
# If both source and object files are in a subdirectory
# (this happens when the subdir-objects option is used),
# then the inference will work.
#
# The latter case deserves a historical note. When the
# subdir-objects option was added on 1999-04-11 it was
# thought that inferences rules would work for
# subdirectory objects too. Later, on 1999-11-22,
# automake was changed to output explicit rules even for
# subdir-objects. Nobody remembers why, but this occurred
# soon after the merge of the user-dep-gen-branch so it
# might be related. In late 2003 people complained about
# the size of the generated Makefile.ins (libgcj, with
# 2200+ subdir objects was reported to have a 9MB
# Makefile), so we now rely on inference rules again.
# Maybe we'll run across the same issue as in the past,
# but at least this time we can document it. However since
# dependency tracking has evolved it is possible that
# our old problem no longer exists.
# Using inference rules for subdir-objects has been tested
# with GNU make, Solaris make, Ultrix make, BSD make,
# HP-UX make, and OSF1 make successfully.
> I think you should put your name on the ChangeLog entry.
Fine with me. Do you want me to re-post the patch for this? ;-)
Cheers,
Ralf