Emilio Pozuelo Monfort
pochu at debian.org
Thu Dec 23 23:41:36 UTC 2010
On 23/12/10 22:58, Emilio Pozuelo Monfort wrote:
> On 22/12/10 17:58, Jonas Smedegaard wrote:
>> On Sun, Dec 19, 2010 at 04:15:35AM +0100, Jonas Smedegaard wrote:
>>> On Sun, Dec 19, 2010 at 01:47:48AM +0000, Emilio Pozuelo Monfort wrote:
>>>> - Would be useful to be able to specify CFLAGS as CFLAGS_$(flavor),
>>>> the same way as we do with DEB_CONFIGURE_FLAGS_$(flavor). Probably
>>>> other variables like LDFLAGS, etc.
>>> Yes. I'll look into that.
>> Hmm - did you try already? It might actually accidentally work, due to
>> per-flavor and per-package variables being resolved the same way.
> I tried CFLAGS_udeb and it didn't work. I haven't tried CFLAGS_$(udeb)
> (where $(udeb) is libvte9-udeb), but I don't see how that would work
> since CFLAGS are for the build which is per-flavor.
I have just seen what you mean, CFLAGS_$(cdbs_curpkg) in makefile-vars.mk.in:
# Derived classes that supply the flags some other way (e.g., configure).
# should set this variable to empty.
DEB_MAKE_EXTRA_ARGS ?= CFLAGS="$(or $(CFLAGS_$(cdbs_curpkg)),$(CFLAGS))"
CXXFLAGS="$(or $(CXXFLAGS_$(cdbs_curpkg)),$(CXXFLAGS))" CPPFLAGS="$(or
They are overriden in autotools.mk.in though:
# Overriden from makefile-vars.mk. We pass CFLAGS and friends to
# ./configure, so no need to pass them to make.
# FIXME: Restructure to allow early override
DEB_MAKE_EXTRA_ARGS = $(DEB_MAKE_PARALLEL)
Then it just sets them to CFLAGS in autotools-vars.mk.in:
DEB_CONFIGURE_SCRIPT_ENV ?= $(call cdbs_set_nondefaultvars,CC CXX)
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)"
It just sets it to $(CFLAGS), without looking at $(CFLAGS_$(cdbs_curpkg)),
that's why it doesn't work for me, but doing the CFLAGS = $(if ...) works.
I don't understand how CFLAGS passed to ./configure could relate to
$(cdbs_curpkg). As I see it, the ./configure (and make) calls (either in a
normal package doing just one call, or with multiple flavors) are completely
orthogonal to the packages. Can you explain how they relate and how this works?
More information about the Build-common-hackers