On Sun, Feb 20, 2011 at 06:42:44PM -0500, Gaetan Nadon wrote: > On Mon, 2011-02-21 at 08:51 +1000, Peter Hutterer wrote: > > > 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? > > 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? > > I would think so. It is the same C file and it looks you are "adding" > more flags. > I suppose this file need the server SDK flags (XORG_CFLAGS). > ... > > Ah, the test program is not automatically built. > When you do make xsetwacom-test, then you get: > > xsetwacom_test-xsetwacom.o > > This is the second compilation of the same C file you get when > specifying xsetwacom_test_CFLAGS. > > Given this is for linker stuff, just a reminder that -lm is in LIBS, so > it gets included as well. >
I merged your original patch. This was getting too confusing and either way we're fine ;) Cheers, Peter ------------------------------------------------------------------------------ Index, Search & Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
