Recursive make harmful (was: Re: what should bootstrap *really* do?)

DJ Delorie dj@redhat.com
Mon Nov 20 17:04:00 GMT 2000


> I would suggest reading it if you're working on the build system.

Read it, a long time ago.

> Fundamentally, most of the time when recursive make is used, it's actually
> lying about the dependency DAG.

We use recursive make in bootstrap because there is no DAG to properly
reflect what we're trying to do.  I actually have a patch for the
Makefile that does a bootstrap with DAGs, but there are reasons not to
do it that way.

> As workarounds, people have to insert wierd and special rules, or
> have 'marker' files.

In our case, we're using the Makefile to automate a sequence of steps,
with each step depending on the previous being complete.  However, the
results of the steps can't coexist.

> Sometimes, it can be easier to just not lie. You can have the
> makefile in one directory include makefiles in other directories if
> necessary.

Not if you can't rely on the include functionality of make.  We can't.
But, that's just a technical limitation.

> Your explanation is perfectly reasonable.

Our explanation is that we have to build the same sources, in the same
directory, different ways.  Because of debugging information, we can't
build in different directories or with different object names and
still meet the real goal of a bootstrap - creating comparable
binaries.

We also have cases where Makefiles are created by the build process,
it's really difficult to do that with a single Makefile.


More information about the Gcc mailing list