This is the mail archive of the 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]

Re: user hostile gobbledygook in top level Makefile

On Nov 19, 2000, "Zack Weinberg" <> wrote:

> So I'm trying to figure out why I can't override BOOT_CFLAGS on the
> command line from the top level

You can.  Or, at least, you're supposed to be able to do it.

> I see this in the top

> 	"`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"

> Now, unless I am sorely confused, the effect of those echo | sed
> commands is to convert "BOOT_CFLAGS=-fwhatever" into
> "XFOO=-fwhatever", which means the subdir makefile won't see it.

You're sorely confused :-)

Note the `$$'.  The purpose seems to be to replace `BOOT_CFLAGS=' with
`XFOO=', as long as $(BOOT_CFLAGS) is empty.  I.e., if you set
BOOT_CFLAGS to non-empty, it will be passed down, but if you don't
override it (note that it's not set in the top-level Makefile), you
don't get the definition in the sub-directory overridden by the
non-definition in the top level.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

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