This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AM_CFLAGS in the project root?


>>> "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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]