This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: new build scheme naming


> Date: Mon, 8 Jul 2002 15:55:30 -0400
> To: DJ Delorie <dj@delorie.com>
> Cc: gcc@gcc.gnu.org
> From: Nathanael Nerode <neroden@doctormoo.dyndns.org>

> > If you're debugging gcc, the current directory is the gcc
> > subdirectory.  You type "make cc1" and it builds cc1 right there,

> That actually *works*?

Yes, this is how everybody uses the makefile for development.

> It doesn't fail because the million Make variables passed down from
> the top level are missing?...

No, never (for me).  It's even better, the inside make builds a -g and
no -O2 cc1plus just for debugging.  The top one builds the -O2
version, not as useful, slower build, somewhat harder to debug.  This
is a feature, honest.

> Why are we passing all these variables down to lower level makes?

:-) To make it work.  Ok, ok, so you caught me.  For an expert with
just the right environment, it would work anyway.  For someone with
the wrong environment in some situations, they need things to be
passed down.  Generally speaking, as time wears on we try and remove
the need for anything to be passed down, meaning, yes, you can cd
below and it will just work, however, if you override things on the
command line, we need to pass those things down.

So, for example, make CFLAGS=-O3 at the toplevel, would invoke cd
subdir; make CFLAGS=-O3, but make at the toplevel, is free to not have
CFLAGS in the flags to pass.

More complex case is when we purposely want a different behavior for
the inside make, say -g instead of -g -O2.  Or
INSTALL=$topdir/install, but the inside makefile doesn't want to
assume that ../install is there or exists, so you don't want to just
go looking for it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]