On Wed, 4 Apr 2007, [iso-8859-1] Loïc Minier wrote:
Actually, the CFLAGS passed to the top-level $(MAKE) are overriding everything.
Which I learned by this example and which makes me wonder whether there is absolutely no way out to enforce overriding CFLAGS.
I suggest you either try to set -I for the whole build or
This makes no real sense because it concerns a relative path to a subdirectory in the source tree that does not exist from every subtree location.
change the upstream build to use its internal CFLAGS and still honor "user" (that's you) provided CFLAGS. For an explanation on why the upstream build should honor CFLAGS but not use them, see: <http://sourceware.org/automake/automake.html#User-Variables>.
Well, the project does not use automake and thus I can not reasonably use this option. I think one reasonable way would be to unset CFLAGS for cdbs (well, CFLAGS_<package>="" is in fact not unsetting it, because it just get's a new value but it is defined and overrides the upstream setting) and use a MYCFLAGS instead that I can append to the upstream CFLAGS later on when needed. Unfortunately I have not found a way to prevent cdbs from defining CFLAGS. Moreover I'm really amazed that there is no way force replacement of CFLAGS inside a Makefile once it is setted outside. I would call this an insane constraint of make. For instance I also tried CFLAGS:=$(if $(CFLAGS),"$(CFLAGS) -I$(INCLUDEDIR)","-I$(INCLUDEDIR)") which also did not show any effect. Kind regards Andreas. -- http://fam-tille.de