[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AM_CFLAGS in the project root?
From: |
Alexandre Duret-Lutz |
Subject: |
Re: AM_CFLAGS in the project root? |
Date: |
Fri, 18 Jun 2004 20:18:33 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
>>> "Baurjan" == Baurjan Ismagulov <address@hidden> 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