On Fri, Feb 18, 2011 at 06:27:29PM -0500, Gaetan Nadon wrote: > On Sat, 2011-02-19 at 08:22 +1000, Peter Hutterer wrote: > > > > xsetwacom_test_LDADD=$(GLIB_LIBS) > > > -xsetwacom_test_CFLAGS=-DBUILD_TEST $(GLIB_CFLAGS) > > > +xsetwacom_test_CFLAGS=-DBUILD_TEST $(GLIB_CFLAGS) $(X11_CFLAGS) > > > > > > TESTS=$(check_PROGRAMS) > > > endif > > > -- > > > 1.6.0.4 > > > > I'm curious why it works here. Shouldn't AM_CFLAGS apply to all > > programs or > > am I misunderstanding something here? > > Per target xsetwacom_test_CFLAGS does not make use of AM_CFLAGS.
so as soon as I have a foo_CFLAGS, it won't use AM_CFLAGS? is this correct? or is that just because of the = assignment of a += for the case above? > The reason you want to use per target CFLAGS is to compile the same > object > twice (or more) with different CFLAGS. > > > In Makefile: > xsetwacom_test-xsetwacom.o: xsetwacom.c > $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) > $(CPPFLAGS) > $(xsetwacom_test_CFLAGS) $(CFLAGS) > > > Automake: > > if you want the hypothetical maude compilations to also use the > value of AM_CFLAGS, you would need to write: > > maude_CFLAGS = ... your flags ... $(AM_CFLAGS) shouldn't we do xsetwacom_test_CFLAGS=-DBUILD_TEST $(GLIB_CFLAGS) $(AM_CFLAGS) then? instead of X11_CFLAGS? Cheers, Peter ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
