question about meta/class/qmake-base.bbclass
Hi Holger,
When I read the file meta/class/qmake-base.bbclass, I find that that are 2 lines:
unset QMAKESPEC || true
${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
I am confused that why unset QMAKESPEC first and then use it a argument for qmake? Could you help me to get out of that?
Thanks and Regards,
Kai
Quoted 9 lines · On Monday 22 August 2011 10:42:42 Kang Kai wrote:
When I read the file meta/class/qmake-base.bbclass, I find that that are 2 lines:
unset QMAKESPEC || true ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile$QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
I am confused that why unset QMAKESPEC first and then use it a argument for qmake?
It's not obvious, but think that the difference here is between $QMAKESPEC and ${QMAKESPEC} - the first one is a reference to an environment variable, the second is a reference to an OE/BitBake variable. So "unset QMAKESPEC" is just clearing out the environment variable; ${QMAKESPEC} would still have a value.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Quoted 10 lines · Paul Eggleton
Quoted 9 lines · On Monday 22 August 2011 10:42:42 Kang Kai wrote:
When I read the file meta/class/qmake-base.bbclass, I find that that are 2 lines:
unset QMAKESPEC || true ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile$QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
I am confused that why unset QMAKESPEC first and then use it a argument for qmake?
Quoted 8 lines
It's not obvious, but think that the difference here is between $QMAKESPEC and ${QMAKESPEC} - the first one is a reference to an environment variable, the second is a reference to an OE/BitBake variable. So "unset QMAKESPEC" is just clearing out the environment variable; ${QMAKESPEC} would still have a value.
Cheers,
Paul
Hi Paul,
Thanks for your detailed answer.
Regards,
Kai
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Holger Freyther
Quoted 5 lines · Kang Kai
Hi Holger,
I am confused that why unset QMAKESPEC first and then use it a argument for qmake?
Could you help me to get out of that?Hi,
Quoted 9 lines
it has been a long time and I can only speculate right now. It might have been that QMAKESPEC was not shell exported, and we really wanted to make sure that it is using the QMAKESPEC we use in the recipe. Alternatively it might be a style issue, e.g. it is easier to see which spec is used by looking at the qmake invocation (also when changing the .pro in the ${S} the right spec would be used again).
holger
Hi Holger,
Thanks for your reply, and I think I can understand them right now.
Thank you!
Kai