* docs: standardizing on "+=" versus "_append" for clarity
@ 2016-05-04 11:20 Robert P. J. Day
2016-05-04 21:59 ` Robert Berger
0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2016-05-04 11:20 UTC (permalink / raw)
To: Yocto discussion list
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."
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: docs: standardizing on "+=" versus "_append" for clarity
2016-05-04 11:20 docs: standardizing on "+=" versus "_append" for clarity Robert P. J. Day
@ 2016-05-04 21:59 ` Robert Berger
0 siblings, 0 replies; 2+ messages in thread
From: Robert Berger @ 2016-05-04 21:59 UTC (permalink / raw)
To: yocto
Hi,
On 05/04/2016 02:20 PM, Robert P. J. Day wrote:>
> 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?
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.
>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-04 21:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-04 11:20 docs: standardizing on "+=" versus "_append" for clarity Robert P. J. Day
2016-05-04 21:59 ` Robert Berger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.