[Top][All Lists]

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

Re: AM_CFLAGS usage

From: Marc Alff
Subject: Re: AM_CFLAGS usage
Date: Sun, 11 Jun 2006 06:31:12 -0700
User-agent: Thunderbird (X11/20060608)


Norbert Sendetzky wrote:
> Hi all
> I've tried to set the C flags for my package globally and used AM_CLFAGS for 
> this. Unfortunately AM_CLFAGS is only honored if it is defined in the same 
> AM_CFLAGS = -Wall -ansi -pedantic
> pkglib_LTLIBRARIES =
> libmysqlbackend_la_SOURCES = mysqlbackend.c
> libmysqlbackend_la_CFLAGS = $(AM_CFLAGS)
> This works, but as soon as I move AM_CFLAGS to the in the parent 
> directory, they aren't set any more. Is this the way it was intended and the 
> only way to set them globally is to AC_SUBST them or is there something wrong 
> in my files?
As far as I know, this is intended.

If you need to share common code in multiple within the same
you can also try : :
(AM_CFLAGS goes here)

dir1/subdir2/ :
include ../../

Personally, I do things like this :

dir1/subdir2/ :

include $(top_srcdir)/
(... content of goes here ...)
include $(top_srcdir)/

where contains among other things common compilation flags,
and PostRules contains common rules that depends on variables set (or
not) in the body of each

Hope this helps,
Marc Alff

reply via email to

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