I like to pass certain flags, such as `-Wall', to the C++ compiler in
all the directories of my package. Originally I had `CXXFLAGS=-Wall'
in each of the Makefile.ams, but that duplication seemed wrong, and I
sought a cleaner way to do it. I haven't yet found one.
Here's how I'm now doing it, which is also unsatisfying:
I'm not setting CXXFLAGS at all, and instead have the top-level
Makefile.am look like this:
AM_CXXFLAGS=-Wall
export AM_CXXFLAGS
This seems to work, but the automake manual says
Using [GNU make] extensions in a `Makefile.am' will lead to
errors or confusing behavior.
... and I *think* that `export' is a GNU make extension. So I'm still
looking for a better solution. (Right now I'm using an autoconf hack
(http://www.gnu.org/software/ac-archive/Installed_Packages/check_gnu_make.html))
to require GNU make, but that's ugly.)
Even if it turns out to be safe to use `export', I'm still wondering
if this is the best way to keep CXXFLAGS the same in all directories.
Any ideas?
Please respond directly to me, as I don't read this list.
Thanks!
--
PGP Fingerprint: 3E7B A3F3 96CA 8958 ACC5 C8BD 6337 0041 C01C 5276