Re: Makefile questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



NightStrike wrote:

> This may be a totally wrong question, but I'll ask anyway :)
> 
> I see that Makefile.in is generated using autogen from Makefile.def
> and Makefile.tpl.  Why does gcc use this method instead of automake
> with Makefile.am?

The toplevel Makefile doesn't actually build any code, it's just used to
control the bootstrap process and is primarily responsible for
descending into a number of subdirectories in a certain and careful
order while passing down large number of options.  So most of what
Automake brings (e.g. automatic dependency generation as a side effect
of compilation) would be of no use.

On the other hand, if you look at the generated Makefile.in there is a
vast amount of duplication due to the fact that these toplevel files are
shared across a large number of projects (gcc, gdb, newlib, binutils,
cygwin, mingw, ...) and because the bootstrap process consists of a
number of stages.  When you take the cartesian product of these dozens
of subdirectories to descend into crossed with up to four stages
combined with several targets for each subdir (configure, clean, check,
html, dvi, info, ...) you get an enormous number of targets.  This kind
of rote duplication is better suited to a pure text processing language
like autogen.

Brian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux