This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: AM_CFLAGS in the project root?
- From: Alexandre Duret-Lutz <adl at src dot lip6 dot fr>
- To: Baurjan Ismagulov <ibr at ata dot cs dot hun dot edu dot tr>
- Cc: automake at gnu dot org
- Date: Fri, 18 Jun 2004 20:18:33 +0200
- Subject: Re: AM_CFLAGS in the project root?
- References: <20040618175346.GC4584@ata.cs.hacettepe.edu.tr>
>>> "Baurjan" == Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr> writes:
[...]
Baurjan> I can do this by defining AM_CFLAGS in each
Baurjan> subdirectory. This works. However, I want to have it
Baurjan> in one place. So I've tried to define this variable in
Baurjan> the root directory instead of subdirectories, but in
Baurjan> this case the generated Makefiles don't seem to use
Baurjan> it.
Only the root directory would use it, since variables defined in
Makefile.ams are not inherited between Makefile.ams.
However you probably know that variables AC_SUBSTed in
configure.ac are defined in all Makefiles. So you could
define AM_CFLAGS in all your Makefiles using
AC_SUBST([AM_CFLAGS], [value])
in configure.ac.
Note that Makefile.am definitions still have priority over
configure.ac AC_SUBSTs. Therefore you can use AC_SUBST
to give AM_CFLAGS a global default value, and override this
definition locally in a Makefile.am if needed.
--
Alexandre Duret-Lutz