automake
[Top][All Lists]
Advanced

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

Re: Handling of Makefile variables


From: Ralf Wildenhues
Subject: Re: Handling of Makefile variables
Date: Tue, 4 Nov 2008 22:56:40 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

* LCID Fire wrote on Tue, Nov 04, 2008 at 08:41:01PM CET:
> On my app I'm currently trying to switch from one big Makefile to
> multiple ones.

Why?

Besides having multiple Makefile.am files that each turn to fully
fledged Makefile files, you could also have Makefile.am fragments
and include them from the master one (in which case you unfortunately
have to carry along all the relative paths).  But it usually builds
faster and parallelizes better.

> So I have in the root directory a Makefile.am and some in
> directories underneath. The thing I noticed is: Even though I set
> AM_CFLAGS in the root Makefile.am these options are not used in the ones
> underneath.

Correct.  To set variables globally, AC_SUBST them from configure.ac.

> Could someone shed some light on how the different
> Makefile.ams are interacting with eachother when recursed in via SUBDIRS
> variable? I take it that variables are not at all global!?

Variables are per-Makefile.am.  Entries in SUBDIRS denote the directed
(hopefully acyclic!) graph of Makefile files to be traversed by 'make'.

Everything that is not per-Makefile.am but global, usually comes from
configure.ac.  Alternative is to have fragments that you include from
all Makefile.am files, where you can the set "global" variables.

Hope that helps.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]