This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Emulating GNU Make conditionals, or: Is there a nice way toautomatically set CFLAGS when make is run?
- From: Bob Friesenhahn <bfriesen at simple dot dallas dot tx dot us>
- To: Dalibor Topic <robilad at kaffe dot org>
- Cc: automake at gnu dot org
- Date: Wed, 10 Dec 2003 10:01:28 -0600 (CST)
- Subject: Re: Emulating GNU Make conditionals, or: Is there a nice way toautomatically set CFLAGS when make is run?
You can use Automake conditionals. These are configure-time
conditionals rather than make-time conditionals.
You could add --with-check and --with-prof options to your configure
script which enables these conditionals.
If your package preserves the capability to build outside of the
source tree, then your users can simply maintain seperate builds with
the desired options enabled.
Bob
On Wed, 10 Dec 2003, Dalibor Topic wrote:
> Hi all
>
> I have a problem converting an old code base to GNU Automake, in that
> the developers are used to spicing up their GNU Makefiles with GNU Make
> conditionals, that are evaluated when make is run, in order to have some
> shortcut options for setting CFLAGS.
>
> They use make -DCHECK=1 to enable adding of special debuggin flags, for
> example, and make -DPROF=1 to add another set of flags to enable a build
> fro profiling.
>
> Is there a (better) way to do that using GNU Automake? I'be been
> browsing the archives for a while but couldn't find anything.
>
> cheers,
> dalibor topic
>
>
>
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen