diff mbox

[v4,7/7] Makefile: export PATH

Message ID 1392559113-5215-8-git-send-email-s.martin49@gmail.com
State Superseded
Headers show

Commit Message

Samuel Martin Feb. 16, 2014, 1:58 p.m. UTC
This can be useful for:
- package using custom build system that are not aware that the host
  tree is in $(O)/host/;
- post-{build,image} scripts, in case some host-tools were specifically
  built to be used by these scripts.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v3 -> v4:
- rebase
- rename BR2_PATH -> BR_PATH

changes v2 -> v3:
- rebase
- extend commit loghanges v2 -> v3:

changes v1 -> v2:
- extend commit message
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Arnout Vandecappelle Feb. 18, 2014, 6:32 a.m. UTC | #1
On 16/02/14 14:58, Samuel Martin wrote:
> This can be useful for:
> - package using custom build system that are not aware that the host
>   tree is in $(O)/host/;
> - post-{build,image} scripts, in case some host-tools were specifically
>   built to be used by these scripts.

 This makes all the previous patches redundant, since the PATH=...
invocations should be removed instead of renamed.

> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> 
> ---
> changes v3 -> v4:
> - rebase
> - rename BR2_PATH -> BR_PATH
> 
> changes v2 -> v3:
> - rebase
> - extend commit loghanges v2 -> v3:
> 
> changes v1 -> v2:
> - extend commit message
> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index bb5b38e..ca2d721 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -353,6 +353,7 @@ export STAGING_DIR
>  export HOST_DIR
>  export BINARIES_DIR
>  export BASE_DIR
> +export PATH:=$(BR_PATH)

 With this change, the := in BR_PATH becomes essential. There should be a
comment there to explain why. Also, the assignment to BR_PATH and to PATH
should be right next to each other (the export can stay here, though).

 And in fact, BR_PATH becomes completely redundant, it's sufficient to
have a single PATH := ....:$(PATH)

 Regards,
 Arnout
>  
>  ################################################################################
>  #
>
Thomas Petazzoni Feb. 18, 2014, 3:37 p.m. UTC | #2
Dear Arnout Vandecappelle,

On Tue, 18 Feb 2014 07:32:48 +0100, Arnout Vandecappelle wrote:
> On 16/02/14 14:58, Samuel Martin wrote:
> > This can be useful for:
> > - package using custom build system that are not aware that the host
> >   tree is in $(O)/host/;
> > - post-{build,image} scripts, in case some host-tools were specifically
> >   built to be used by these scripts.
> 
>  This makes all the previous patches redundant, since the PATH=...
> invocations should be removed instead of renamed.

Agreed. Samuel, you should make a choice:

 * Either you use BR_PATH, and we continue to pass PATH=$(BR_PATH)
   whenever the PATH is needed.

 * Or you simply directly export PATH with the right value, and remove
   all occurrences where we manually pass PATH=<something>.

Thanks,

Thomas
Samuel Martin Feb. 18, 2014, 3:55 p.m. UTC | #3
Arnout, Thomas,

On Tue, Feb 18, 2014 at 4:37 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Arnout Vandecappelle,
>
> On Tue, 18 Feb 2014 07:32:48 +0100, Arnout Vandecappelle wrote:
>> On 16/02/14 14:58, Samuel Martin wrote:
>> > This can be useful for:
>> > - package using custom build system that are not aware that the host
>> >   tree is in $(O)/host/;
>> > - post-{build,image} scripts, in case some host-tools were specifically
>> >   built to be used by these scripts.
>>
>>  This makes all the previous patches redundant, since the PATH=...
>> invocations should be removed instead of renamed.
>
> Agreed. Samuel, you should make a choice:
>
>  * Either you use BR_PATH, and we continue to pass PATH=$(BR_PATH)
>    whenever the PATH is needed.
>
>  * Or you simply directly export PATH with the right value, and remove
>    all occurrences where we manually pass PATH=<something>.

Ok.
It was not clear whether the export would be accepted...
So I followed the secure way, thinking that the PATH usage could be
cleaned up later ;-)

Anyway, now it's my call. :)
Thanks for clarification.


Regards,
diff mbox

Patch

diff --git a/Makefile b/Makefile
index bb5b38e..ca2d721 100644
--- a/Makefile
+++ b/Makefile
@@ -353,6 +353,7 @@  export STAGING_DIR
 export HOST_DIR
 export BINARIES_DIR
 export BASE_DIR
+export PATH:=$(BR_PATH)
 
 ################################################################################
 #