Re: [patch/rfc] Generate makefile dependencies

Andrew Cagney
2004-03-08T16:24:22Z

>>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).

Andrew