I�ve been fiddling with the Automake, Autoconf suite and cannot seem to get
the behavior I�m after. Admittedly, this is my first time using them and,
so, I may be missing something.
My goal is to have two separate directories for the targets: One containing
the CHECKED build and the other the RELEASE build. Using the files below,
the directories get created appropriately and the products placed within
them (following the directory hierarchy of the src directory). But, when I
build in the CHECKED directory (using a VPATH build), the flags passed to
GCC include *both* my set (e.g., -g -O3) and the default set (e.g., -g -O2)!
I'm setting these via AM_CPPFLAGS (as shown below).
To summarize: I'd two target directories that I can build from to obtain
either a CHECKED or RELEASE build (depending on the build directory). (I'd
*really* like to create at the root containing some of these settings and
include in lower Makefile.am files. But when I do that, using @top_srcdir@,
the file treated as a Make include, not an Automake include!?!)
I've Google'd this. I've fiddled with this. And yet still have a few
questions.
Thank you for your help!
Brendan
PS. Is there a list or forum that collects these questions?
Makefile.am (from the final source directory) --------------------------
PW_SOURCE_DIRS = @[EMAIL PROTECTED]/apache @[EMAIL PROTECTED]/iis
@[EMAIL PROTECTED]/pub @[EMAIL PROTECTED]/pw
PW_PW_DIR = @[EMAIL PROTECTED]/pw
PW_EXT_DIR = @[EMAIL PROTECTED]/external
PW_INCLUDE = -I${PW_SRC_DIR} -I${PW_EXT_DIR} [EMAIL PROTECTED]@
AM_CPPFLAGS = @pw_cflags@ -Wall ${PW_INCLUDE}
VER_NAME = [EMAIL PROTECTED]@[EMAIL PROTECTED]@
noinst_LIBRARIES = libpw.a
libpw_a_SOURCES = pw.cxx
Configure.ac ----------------------------------------------------------
AC_PREREQ(2.59)
AC_INIT([Avidity Pressworks], [0.1], [EMAIL PROTECTED], [pressworks])
AC_CONFIG_SRCDIR([src/pw/pw.cxx])
AC_CONFIG_AUX_DIR([build])
##AC_CONFIG_HEADERS([build/config.h])
AM_INIT_AUTOMAKE
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_HEADER_STDC
AC_CHECK_HEADERS([ap.h])
AC_ARG_ENABLE([debug],
[ --enable-debug Turn on debugging ],
[PW_CFLAGS="-g -O3 -DPW_DEBUG"],
[PW_CFLAGS="-O3"])
AC_SUBST(pw_cflags, ${PW_CFLAGS})
AC_SUBST(MAJOR_VER, 0)
AC_SUBST(MINOR_VER, 1)
AC_CONFIG_FILES([Makefile \
src/Makefile \
src/pw/Makefile \
])
AC_OUTPUT