[Top][All Lists]

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

How can I keep CXXFLAGS in sync in all the directories in a shallow paca

From: Eric Hanchrow
Subject: How can I keep CXXFLAGS in sync in all the directories in a shallow pacakge?
Date: 14 Oct 2001 13:14:11 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.106

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 look like this:

    export AM_CXXFLAGS

This seems to work, but the automake manual says 

        Using [GNU make] extensions in a `' 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
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.

PGP Fingerprint: 3E7B A3F3 96CA 8958 ACC5  C8BD 6337 0041 C01C 5276

reply via email to

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