[Buildroot] [PATCH v5 2/4] Makefile: export PATH including the Buildroot host bindirs

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Mar 4 21:52:34 UTC 2014


Dear Arnout Vandecappelle,

On Tue, 04 Mar 2014 18:06:41 +0100, Arnout Vandecappelle wrote:
> On 01/03/14 20:59, Samuel Martin wrote:
> > This patch exports the PATH variable containing the factorized content
> > of TARGET_PATH and HOST_PATH (because they were fairly similar).
> > 
> > TARGET_PATH and HOST_PATH are now set using only the PATH variable.
> > 
> > Signed-off-by: Samuel Martin <s.martin49 at gmail.com>
> 
>  Looks good to me.
> 
>  Except... I'm having second thoughts about the principle of this patch.
> When debugging failing builds, I often copy&paste the build command line
> if I want to drill down to the details of the error. But if PATH is
> exported (and TARGET_PATH is removed, in 4/4), it is no longer visible on
> the command line... So I have to remember to set it myself...

True. I also do that very often.

I personally dislike exporting the PATH globally, as it means that
we're "magically" passing some stuff into the commands we are running,
which are not explicit when looking at the commands being executed.

>  A workaround would be to add a 'make shell' target, that drops you into
> an interactive shell. I don't really like it very much, but it would
> solve other issues with exported variables.

Not a big fan either :/

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list