diff mbox

[6/6] Makefile: export PATH

Message ID 1384203586-17790-7-git-send-email-s.martin49@gmail.com
State Superseded
Headers show

Commit Message

Samuel Martin Nov. 11, 2013, 8:59 p.m. UTC
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Petazzoni Nov. 11, 2013, 10:31 p.m. UTC | #1
Dear Samuel Martin,

On Mon, 11 Nov 2013 21:59:46 +0100, Samuel Martin wrote:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index 4010c65..d587b4f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -294,6 +294,7 @@ export STAGING_DIR
>  export HOST_DIR
>  export BINARIES_DIR
>  export BASE_DIR
> +export PATH:=$(BR2_PATH)

Why?

Thomas
Samuel Martin Nov. 15, 2013, 8:37 p.m. UTC | #2
Thomas,


2013/11/11 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

> Dear Samuel Martin,
>
> On Mon, 11 Nov 2013 21:59:46 +0100, Samuel Martin wrote:
> > Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> > ---
> >  Makefile | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Makefile b/Makefile
> > index 4010c65..d587b4f 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -294,6 +294,7 @@ export STAGING_DIR
> >  export HOST_DIR
> >  export BINARIES_DIR
> >  export BASE_DIR
> > +export PATH:=$(BR2_PATH)
>
> Why?
>

To me, this could make easier writing post-{build,image} scripts.
But, as I said in the cover letter, I'm dubious about this patch.

Regards,
Yann E. MORIN Nov. 15, 2013, 8:53 p.m. UTC | #3
Samuel, Thomas, All,

On 2013-11-15 21:37 +0100, Samuel Martin spake thusly:
> 2013/11/11 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> > Dear Samuel Martin,
> >
> > On Mon, 11 Nov 2013 21:59:46 +0100, Samuel Martin wrote:
> > > Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> > > ---
> > >  Makefile | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/Makefile b/Makefile
> > > index 4010c65..d587b4f 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -294,6 +294,7 @@ export STAGING_DIR
> > >  export HOST_DIR
> > >  export BINARIES_DIR
> > >  export BASE_DIR
> > > +export PATH:=$(BR2_PATH)
> >
> > Why?
> >
> 
> To me, this could make easier writing post-{build,image} scripts.

Indeed, it *is* usefull for those scripts.

The first thing I do in br.config is to exactly set PATH to include the
host/usr/bin and host/usr/sbin directories in front of the user's PATH.

But maybe we should just set PATH at the time we call them?

Regards,
Yann E. MORIN.
Peter Korsgaard Nov. 17, 2013, 7:33 a.m. UTC | #4
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

Hi,

 >> To me, this could make easier writing post-{build,image} scripts.

 > Indeed, it *is* usefull for those scripts.

 > The first thing I do in br.config is to exactly set PATH to include the
 > host/usr/bin and host/usr/sbin directories in front of the user's PATH.

 > But maybe we should just set PATH at the time we call them?

I *THINK* always adding those host directories to the path would be
safe, as long as it happens after 'which' calls in the toplevel
makefile. This would also allow us to get rid of HOST_PATH / TARGET_PATH
(which are currently not identical, but should be).

But it will need some testing.
Samuel Martin Jan. 2, 2014, 7:21 p.m. UTC | #5
Hi all,

2013/11/17 Peter Korsgaard <jacmet@uclibc.org>

> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
>
> Hi,
>
>  >> To me, this could make easier writing post-{build,image} scripts.
>
>  > Indeed, it *is* usefull for those scripts.
>
>  > The first thing I do in br.config is to exactly set PATH to include the
>  > host/usr/bin and host/usr/sbin directories in front of the user's PATH.
>
>  > But maybe we should just set PATH at the time we call them?
>
> I *THINK* always adding those host directories to the path would be
> safe, as long as it happens after 'which' calls in the toplevel
> makefile.

This is already the case. :-)


> This would also allow us to get rid of HOST_PATH / TARGET_PATH
> (which are currently not identical, but should be).
>
> But it will need some testing.
>

For what is worth, I use this series on top of master since this first
submission
and I haven't got any problem so far.


>
> --
> Bye, Peter Korsgaard
>

Regards,
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 4010c65..d587b4f 100644
--- a/Makefile
+++ b/Makefile
@@ -294,6 +294,7 @@  export STAGING_DIR
 export HOST_DIR
 export BINARIES_DIR
 export BASE_DIR
+export PATH:=$(BR2_PATH)
 
 ################################################################################
 #