[Buildroot] [PATCH] package/Makefile.in: export O= to post-build/image scripts for out-of-tree builds
Peter Korsgaard
peter at korsgaard.com
Mon Jul 17 21:32:13 UTC 2017
>>>>> "Arnout" == Arnout Vandecappelle <arnout at mind.be> writes:
> On 14-07-17 15:04, Peter Korsgaard wrote:
>> Sometimes it can be interesting to call back into buildroot from a
>> post-build/image script (E.G. make printvars or similar). For this to work
>> correctly with out-of-tree builds we need to pass O= to make, but this is
>> currently not available in the environment of post-build/image scripts.
>>
>> In concept, O could be derrived from BUILD_DIR (E.G. by stripping /build),
>> but directly exporting O is cleaner.
>>
>> O= cannot be exported globally as it interferes with various build systems,
>> so instead add it to EXTRA_ENV.
> I'm too late with this comment, but why is BASE_DIR not sufficient? It is
> already exported, and it is set to:
> BASE_DIR := $(CANONICAL_O)
Yes, that can also work - Even though it is less obvious that you should
run make O=${BASE_DIR} inside the post build/image scripts, instead of
make O=$O
> O has the problem that it's too risky to lead to conflicts IMO.
Even for post build/image scripts? What use cases do you have in mind
where there could be conflicts?
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list