[Buildroot] [RFCv1 08/11] package: package-based implementation of source, external-deps and legal-info
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Sun Sep 15 20:09:08 UTC 2013
Dear Thomas De Schampheleire,
On Sun, 15 Sep 2013 21:29:58 +0200, Thomas De Schampheleire wrote:
> > TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
> > -TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS) $(BASE_TARGETS))
> > +TARGETS_SOURCE:=$(patsubst %,%-all-source,$(TARGETS) $(BASE_TARGETS))
>
> Am I correct in understanding that, due to the full dependency chain,
> TARGETS_SOURCE will have many duplicate entries?
Well, TARGETS_SOURCE itself will not have many duplicate entries: in
the TARGETS variable, each selected package is only mentioned once, and
TARGETS_SOURCE has the exact same number of entries as TARGETS, except
that each word in TARGETS is replaced by %-all-source (I'm excluding
BASE_TARGETS here, but it only ever contains one entry: 'toolchain').
However, when *evaluating* those targets, we will indeed be looking
multiple times at the same dependencies.
> When executing 'make source', then, each of these targets will be
> executed multiple times, correct? Even though the actual download will
> only be executed once for each package, I wonder if there can be other
> side effects by executing the targets multiple times. Would it make
> sense to do $(shell sort -u ... ) here?
As explained above, no: TARGETS_SOURCE by itself does not contain any
duplicated entry. It's the fact of evaluating each target in
TARGETS_SOURCE that will lead to looking multiple times at the same
things. But I'm not sure how to solve that.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
More information about the buildroot
mailing list