|
From: Bastian M. <bma...@we...> - 2011-03-25 19:21:16
|
When trying to build with MinGW and cairo/pango, I noticed a weird problem: make seems to have problems with variables defined like this: CAIRO_CFLAGS = $(shell pkg-config --cflags cairo) Make `echo`s those variables just fine, but the actual build command gets mixed up. Here's an example (TERMFLAGS includes CAIRO_FLAGS): The rule term.$(O): term.c term.h plot.h setshow.h bitmap.h $(CORETERM) echo $(TERMFLAGS) echo $(CC) -c $(CFLAGS) $(TERMFLAGS) $(S)/term.c yields: -DGNUPLOT_PS_DIR="share/PostScript" -DGNUPLOT_JS_DIR="share/js" <snip> libs/include/freetype2 -Id:/Software/mingw-libs/include/libpng14 <snip> gcc -c -g -I. -I../../src -D_Windows -DHAVE_CONFIG_H -DPIPES <snip> -Id:/Software/mingw-libs/include -Id:/Software/mingw-libs/include/freety ../../src/term.c/mingw-libs/include/libpng14 : Invalid argument make: *** [term.o] Error 1 Note that the source file string "../../src/term.c" overlays part of the TERMFLAGS string. Instead, I have put the result of `pkg-config --cflags cairo` directly in the definition of CAIRO_CFLAGS and it works as expected. I have no idea what's going on here. Has anybody else seen that behaviour, or an explanation? Bastian |