automake
[Top][All Lists]
Advanced

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

Re: How to maintain separate CHECKED and RELEASE builds


From: Alexandre Duret-Lutz
Subject: Re: How to maintain separate CHECKED and RELEASE builds
Date: Tue, 15 Feb 2005 09:15:31 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

>>> "Brendan" == Brendan Dixon <address@hidden> writes:

 Brendan> My goal is to have two separate directories for the
 Brendan> targets: One containing the CHECKED build and the
 Brendan> other the RELEASE build.

In the GNU Build System, users choose where the package is
compiled and with which optimization option.

A developer happens to be a user.  So if during development you
need two different builds of your sources, for instance one with
debugging symbols and one with full optimization, then you can
do something like this.

  mkdir optim
  cd optim
  ../configure CPPFLAGS=-DNDEBUG CFLAGS=-O3 CXXFLAGS=-O3
  make
  cd ..
  mkdir debug
  cd debug
  ../configure CFLAGS='-g -O0' CXXFLAGS='-g -O0'

There is nothing specific that you should do in your package for
this to works.  Besides you can create as much build trees as
you need this way.

[...]

 Brendan> *really* like to create at the root containing some of
 Brendan> these settings and include in lower Makefile.am
 Brendan> files. But when I do that, using @top_srcdir@, the
 Brendan> file treated as a Make include, not an Automake
 Brendan> include!?!)

| 18 Include
| **********
|          
| Automake supports an `include' directive which can be used to include
| other `Makefile' fragments when `automake' is run.  Note that these
| fragments are read and interpreted by `automake', not by `make'.  As
| with conditionals, `make' has no idea that `include' is in use.
| 
|    There are two forms of `include':
| 
| `include $(srcdir)/file'
|      Include a fragment which is found relative to the current source
|      directory.
| 
| `include $(top_srcdir)/file'
|      Include a fragment which is found relative to the top source
|      directory.

=> use $(top_srcdir).

[...]

 Brendan> AC_PROG_INSTALL

Useless call.

[...]

 Brendan> AC_CONFIG_FILES([Makefile        \
 Brendan> src/Makefile    \
 Brendan> src/pw/Makefile \
 Brendan> ])

Useless backslashes.
-- 
Alexandre Duret-Lutz





reply via email to

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