docs: standardizing on "+=" versus "_append" for clarity
when i teach OE/YP classes, a moderately regular question is when to
use "+=" versus "_append", given that some of the docs confusingly bounce back and forth for no apparent reason.
eg: in-progress kernel dev manual, section 2.2.3, contains snippets:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://defconfig"
... snip ...
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://8250.cfg"but down in section 2.7, we see:
SRC_URI_append = " file://test.scc"
... snip ...
KERNEL_FEATURES_append = " test.scc"and in section 3.2:
KERNEL_FEATURES += "features/netfilter/netfilter.scc"
... snip ...
KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc"i understand that there are times when you *want* _append to delay processing until the end, and i understand that conditional appending with OVERRIDES requires the "_append" syntax, but other than these special cases, is there an encouraged standard to use "+=" if either syntax will do?
rday
p.s. i can assure people that it's exactly this kind of bouncing back and forth that confuses readers, who suddenly think, "wait a minute, i thought i understood this, but maybe i don't."
Signature · 7 lines
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================Hi,
On 05/04/2016 02:20 PM, Robert P. J. Day wrote:>
Quoted 5 lines
i understand that there are times when you *want*
_appendto delay processing until the end, and i understand that conditional appending with OVERRIDES requires the "_append" syntax, but other than these special cases, is there an encouraged standard to use "+=" if either syntax will do?
That's my understanding:
_append (override style syntax):
append without spaces,
differs from :=,.=,=.,+=,=+ because assignment is deferred until after parsing,
can be used with executable meta data
.= :
appending without spaces, immediate assignment
+= :
appending with spaces, immediate assignment
All of them have left and right hand side variable expansion recursive when used.
Quoted 3 lines
rday
Regards,
Robert
..."C++ is an horrible language" - Linux Torvalds
My public pgp key is available,at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1