automake
[Top][All Lists]
Advanced

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

Re: multiple targets, different build options


From: Brian Dessent
Subject: Re: multiple targets, different build options
Date: Wed, 24 Sep 2008 11:13:20 -0700

John Richetta wrote:

> clumsier for the maintainer.  But I am sure automake must provide
> some way of achieving functionality equivalent to this essential make
> capability - no?

The automake way of doing this is with separate build directories, not
by hard coding any special rules into the build system.

$ mkdir debug && cd debug
$ ../configure CFLAGS="-g"
$ make
$ cd ..
$ mkdir normal && cd normal
$ ../configure CFLAGS="-O2"
$ make

If you try to cram two builds into one tree you run into all kinds of
dependency problems as you already figured out.  Trying to make that
work by doing a bunch of "make clean"-type kludges really is not a good
idea.  This way you don't have to rebuild everything when you switch
between them, you just cd into the one of interest and run make, and
whatever is out of date is rebuilt.

Brian




reply via email to

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