Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Andrew Cagney <cagney@gnu.org>
Cc: Eli Zaretskii <eliz@elta.co.il>, gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] Generate makefile dependencies
Date: Fri, 19 Mar 2004 00:09:00 -0000	[thread overview]
Message-ID: <20040308181142.GA23441@nevyn.them.org> (raw)
Message-ID: <20040319000900.iV52SOIuO__5sppkGwq3sWxOUxeyP42n0Wt8n3AJziU@z> (raw)
In-Reply-To: <404CB609.4070609@gnu.org>

On Mon, Mar 08, 2004 at 01:06:01PM -0500, Andrew Cagney wrote:
> >On Mon, Mar 08, 2004 at 11:24:20AM -0500, Andrew Cagney wrote:
> >
> >>>>>>>Date: Sun, 07 Mar 2004 19:35:34 -0500
> >>>>
> >>>>>>>>>From: Andrew Cagney <cagney@gnu.org>
> >>>>>>>>>
> >>>>>>>>>The attached, er, hack, modifies configure.in so that all the 
> >>>>>>Makefile
> >>>>>>>>>dependencies are generated during configure time:
> >>>>>>>>>
> >>>>>>>>>	defs_h = ...
> >>>>>>>>>	foo.o: foo.c $(defs_h)
> >>>>>>>>>
> >>>>>>>>>It exploits the fact that GDB's code base is very consistent in 
> >>>>>>its use
> >>>>>>>>>of "foo.h" vs <foo.h> -- the former is assumed to be local, the 
> >>>>>>latter
> >>>>>>>>>in a system library.
> >>>
> >>>>>
> >>>>>
> >>>>>Won't it be better to use "gcc -MM" when we compile with GCC?
> >>
> >>>
> >>>It would, except we can't assume GCC :-(.  Better to always use the sed 
> >>>script as that way we'll know it always (hopefully :-) works.
> >>>
> >>>It needs comments (and a doco update).
> >
> >
> >So what about using the output of gcc -MM (or one of the other -M
> >options?) to generate dependencies in the source directory, like BFD
> >does?
> 
> How is embedding this stuff in the source directory better?

Because it doesn't need to rely on assumptions about the GDB coding
style, and it doesn't require parsing all the source files when we
configure?  It's like regenerating configure; we try not to run
autoconf during the build process, and not just because autoconf is so
finicky.

> >BTW, your comment about running automake to update deps in BFD is
> >actually incorrect.  You run 'make dep-am', which IIRC seds Makefile.am
> >and maye regenerates Makefile.in; the dependencies aren't managed by
> >automake.  Recent versions of automake do have top-notch dependency
> >support though.
> 
> It appears to eventually run "gcc -MM" ... :-(

Sure.  The point (for the BFD method) is that dependencies are generated 
on a machine with GCC, which is not a hardship.  I don't know anything
about how automake handles this.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2004-03-08 18:11 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-08  0:36 Andrew Cagney
2004-03-08  6:09 ` Eli Zaretskii
2004-03-19  0:09   ` Eli Zaretskii
2004-03-19  0:09   ` Andrew Cagney
2004-03-08 16:24     ` Andrew Cagney
2004-03-08 17:24     ` Eli Zaretskii
2004-03-08 17:58       ` Andrew Cagney
2004-03-19  0:09         ` Andrew Cagney
2004-03-19  0:09       ` Eli Zaretskii
2004-03-19  0:09     ` Daniel Jacobowitz
2004-03-08 17:29       ` Daniel Jacobowitz
2004-03-08 17:50       ` Ian Lance Taylor
2004-03-19  0:09         ` Ian Lance Taylor
2004-03-19  0:09       ` Andrew Cagney
2004-03-08 18:06         ` Andrew Cagney
2004-03-08 18:11         ` Daniel Jacobowitz [this message]
2004-03-19  0:09           ` Andrew Cagney
2004-03-08 18:35             ` Andrew Cagney
2004-03-08 23:13             ` Michael Snyder
2004-03-11 17:23               ` Andrew Cagney
2004-03-19  0:09                 ` Andrew Cagney
2004-03-19  0:09               ` Michael Snyder
2004-03-19  0:09           ` Daniel Jacobowitz
2004-03-08 18:16         ` Ian Lance Taylor
2004-03-19  0:09           ` Ian Lance Taylor
2004-03-19  0:09           ` Andrew Cagney
2004-03-08 19:07             ` Andrew Cagney
2004-03-08 19:26             ` Ian Lance Taylor
2004-03-19  0:09               ` Ian Lance Taylor
2004-03-19  0:09             ` Daniel Jacobowitz
2004-03-08 19:16               ` Daniel Jacobowitz
2004-03-15 18:21 ` Andrew Cagney
2004-03-19  0:09   ` Andrew Cagney
2004-03-19  0:09   ` Ian Lance Taylor
2004-03-15 18:53     ` Ian Lance Taylor
2004-03-19  0:09 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040308181142.GA23441@nevyn.them.org \
    --to=drow@false.org \
    --cc=cagney@gnu.org \
    --cc=eliz@elta.co.il \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox