Hi,

I'm in need for opinions on how to deal with customizing variables that
come from / are used in build classes.

You probably already know about EXTRA_OECONF which is used in autotools
for specifying additional flags to pass to the ./configure call.

Case example: qmake.bbclass. In there we have EXTRA_QMAKEVARS_POST which
are added to the qmake call when building a Makefile out of a qmake .pro
file.

Standard usage: you inherit qmake and say EXTRA_QMAKEVARS_POST =
"INCLUDEPATH+=foo"

This usage is consistent with EXTRA_OECONF and EXTRA_OEMAKE and the
like.

Then there are classes that inherit qmake which add something to
EXTRA_QMAKEVARS_POST on their own. So, when you inherit e.g. opie you
need to say

EXTRA_QMAKEVARS_POST += "INCLUDEPATH+=foo" or else you will override all
the stuff that opie already sets up.

This is a bit inconsistent... I don't like it because users are prone to
stumble over it.
However the alternatives in that particular case would be 
a) to duplicate lots of qmake.bbclass in opie.bbclass or
b) to make qmake.bbclass aware of opie.bbclass and say e.g.
qmake -${OPIE_QMAKEVARS_POST}{EXTRA_QMAKEVARS_POST}

I don't like the alternatives as well. a) would mean duplicating, b)
would mean breaking the abstraction layer a bit.

So in essence the question is:

Do we really need the same semantics for every EXTRA_foo variable, which
is: "feel free to use = for this variable, because no build class has a
default for it" [which would be nice and consistent] or can we go for
different semantics, i.e. document in opie.bbclass: "if you inherit this
build class, you are not allowed to overwrite EXTRA_foo unless you know
what you are doing. standard usage is to append to EXTRA_foo".

Opinions?

-- 
Regards,

Mickey.
------------------------------------------------------------------
Dipl.-Inf. Michael 'Mickey' Lauer <[EMAIL PROTECTED]>
------------------------------------------------------------------


_______________________________________________
Oe mailing list
[email protected]
https://www.handhelds.org/mailman/listinfo/oe

Reply via email to