automake
[Top][All Lists]
Advanced

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

Re: any way to set an automake variable in a top-level automake file, an


From: Ralf Wildenhues
Subject: Re: any way to set an automake variable in a top-level automake file, and have it apply to subdirs?
Date: Fri, 4 Nov 2005 17:25:03 +0100
User-agent: Mutt/1.5.9i

Hi Ed,

* Ed Hartnett wrote on Fri, Nov 04, 2005 at 02:57:44PM CET:
> 
> Is there any way to set an automake variable in the top-level automake
> file? (That is, the file which contains SUBDIRS = ...)
> 
> I find myself setting AM_CFLAGS=-g in many subdirectories. Also I am
> setting AM_LDFLAGS everywhere to point to a library directory that the
> user can specify at configure time.
> 
> Surely there is an easier way?

Why not just put

  AC_SUBST([AM_CFLAGS], [-g])

in configure.ac?  Automake will end put in all Makefile.in's
  AM_CFLAGS = @AM_CFLAGS@
then and configure will substitute @AM_FLAGS@ with -g then.

Note though that many compilers cannot mix -g and optimization options;
you should allow the user the override with CFLAGS without breaking this.

Cheers,
Ralf




reply via email to

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