From: Ian Lance Taylor <ian@wasabisystems.com>
To: Andrew Cagney <cagney@gnu.org>
Cc: Daniel Jacobowitz <drow@false.org>,
Eli Zaretskii <eliz@elta.co.il>,
gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc] Generate makefile dependencies
Date: Mon, 08 Mar 2004 19:26:00 -0000 [thread overview]
Message-ID: <m3n06rp2cs.fsf@gossamer.airs.com> (raw)
In-Reply-To: <404CC47A.4090207@gnu.org>
Andrew Cagney <cagney@gnu.org> writes:
> > 'make dep-am' is run by a binutils maintainer, not by an ordinary
> > user. It does happen to run gcc -MM, so the binutils maintainer is
> > required to have gcc installed. However, the result is the correct
> > dependencies for any compiler, and those dependencies are then present
> > in the Makefile for any user, regardless of what compiler they use.
>
> Right, which was part of my motivation for proposing that it be done
> this way:
>
> > 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.
> > Instead of having to to edit Makefile.in, or as with binutils, run
> > automake, you just enter:
> > ./config.cache --recheck
> > Thoughts? Wonder how portable my SED is.
I would say that it depends on the speed cost. Dependencies rarely
change. In my opinion, it's not worth a measurable slowdown to
configure--a price paid by everybody who builds from source--to handle
them correctly. If your code runs quickly, and correctly handles
things like the way mips-tdep.o depends upon
include/elf/reloc-macros.h (something which the current gdb Makefile
does not appear to get right), then I'm sure your plan is fine.
> While Daniel's pointed out that for binutils "make dep-am" (and hence
> gcc -MM) and not "automake" are used, the problem still stands -
> correct dependency lists are only available if a specialized set of
> tools are installed.
The only people who need to update dependencies lists for the binutils
are people doing development on the binutils. For those people, I do
not consider gcc to be a specialized tool. (I do consider automake to
be a specialized tool.) The set of people who do serious binutils
work and who do not have access to gcc on any platform is a null set.
And of course the dependencies are written so that they are very
simple to update by hand, for quick hacks by developers.
> For what its worth, I know of three ways to maintain a dependency list:
>
> - update at compile time
>
> - update at configure time
>
> - update at release time
>
> For someone grabbing random sources, the first is most likely correct,
> the last is most likley out-of-date. The middle is a compromise, at
> least correct at the start of each build.
The binutils use none of the above. Maintainers are supposed to
update the dependencies when they change them. We periodically update
the dependencies anyhow, to catch anything which wasn't handled
earlier. And we update the dependencies at release time as well.
Ian
WARNING: multiple messages have this Message-ID
From: Ian Lance Taylor <ian@wasabisystems.com>
To: Andrew Cagney <cagney@gnu.org>
Cc: Daniel Jacobowitz <drow@false.org>,
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: <m3n06rp2cs.fsf@gossamer.airs.com> (raw)
Message-ID: <20040319000900.Vxo_bxUwiSv41tWmhI6Ap-Ot9j2scwga3HdpHfg2eWE@z> (raw)
In-Reply-To: <404CC47A.4090207@gnu.org>
Andrew Cagney <cagney@gnu.org> writes:
> > 'make dep-am' is run by a binutils maintainer, not by an ordinary
> > user. It does happen to run gcc -MM, so the binutils maintainer is
> > required to have gcc installed. However, the result is the correct
> > dependencies for any compiler, and those dependencies are then present
> > in the Makefile for any user, regardless of what compiler they use.
>
> Right, which was part of my motivation for proposing that it be done
> this way:
>
> > 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.
> > Instead of having to to edit Makefile.in, or as with binutils, run
> > automake, you just enter:
> > ./config.cache --recheck
> > Thoughts? Wonder how portable my SED is.
I would say that it depends on the speed cost. Dependencies rarely
change. In my opinion, it's not worth a measurable slowdown to
configure--a price paid by everybody who builds from source--to handle
them correctly. If your code runs quickly, and correctly handles
things like the way mips-tdep.o depends upon
include/elf/reloc-macros.h (something which the current gdb Makefile
does not appear to get right), then I'm sure your plan is fine.
> While Daniel's pointed out that for binutils "make dep-am" (and hence
> gcc -MM) and not "automake" are used, the problem still stands -
> correct dependency lists are only available if a specialized set of
> tools are installed.
The only people who need to update dependencies lists for the binutils
are people doing development on the binutils. For those people, I do
not consider gcc to be a specialized tool. (I do consider automake to
be a specialized tool.) The set of people who do serious binutils
work and who do not have access to gcc on any platform is a null set.
And of course the dependencies are written so that they are very
simple to update by hand, for quick hacks by developers.
> For what its worth, I know of three ways to maintain a dependency list:
>
> - update at compile time
>
> - update at configure time
>
> - update at release time
>
> For someone grabbing random sources, the first is most likely correct,
> the last is most likley out-of-date. The middle is a compromise, at
> least correct at the start of each build.
The binutils use none of the above. Maintainers are supposed to
update the dependencies when they change them. We periodically update
the dependencies anyhow, to catch anything which wasn't handled
earlier. And we update the dependencies at release time as well.
Ian
next prev parent reply other threads:[~2004-03-08 19:26 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 ` 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
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 [this message]
2004-03-19 0:09 ` Ian Lance Taylor
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-08 19:16 ` Daniel Jacobowitz
2004-03-19 0:09 ` Eli Zaretskii
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=m3n06rp2cs.fsf@gossamer.airs.com \
--to=ian@wasabisystems.com \
--cc=cagney@gnu.org \
--cc=drow@false.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