[elbe-devel] [PATCH v2 22/24] sdk/environment-setup: dont hardcode sdk path

Torben Hohn torben.hohn at linutronix.de
Thu Feb 8 17:24:33 CET 2018


On Thu, Feb 08, 2018 at 02:17:08PM +0100, Manuel Traut wrote:
> use the already defined variable from the dictionary instead of
> hardcoding the sdk path
> 
> Signed-off-by: Manuel Traut <manut at linutronix.de>

Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>

> ---
>  elbepack/elbeproject.py                        | 6 ++++--
>  elbepack/makofiles/environment-setup-elbe.mako | 6 +++---
>  2 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
> index 27b92bb0..4704ba02 100644
> --- a/elbepack/elbeproject.py
> +++ b/elbepack/elbeproject.py
> @@ -95,8 +95,10 @@ def __gen_sdk_scripts(triplet, prj_name, prj_version, builddir, sdkpath):
>          f.write(template(t, sdkvalues))
>  
>      t = os.path.join(mako_template_dir, 'environment-setup-elbe.mako')
> -    with open(os.path.join(sdkpath,
> -                           'environment-setup-elbe'), 'w') as f:
> +    envname = 'environment-setup-elbe-%s-%s-%s' % (triplet,
> +                                                   prj_name,
> +                                                   prj_version)
> +    with open(os.path.join(sdkpath, envname), 'w') as f:
>          f.write(template(t, sdkvalues))
>  
>  
> diff --git a/elbepack/makofiles/environment-setup-elbe.mako b/elbepack/makofiles/environment-setup-elbe.mako
> index 095101c7..087291ea 100644
> --- a/elbepack/makofiles/environment-setup-elbe.mako
> +++ b/elbepack/makofiles/environment-setup-elbe.mako
> @@ -49,11 +49,11 @@ if [ ! -z "$LD_LIBRARY_PATH" ]; then
>      echo "  http://xahlee.info/UnixResource_dir/_/ldpath.html"
>      return 1
>  fi
> -export SDKTARGETSYSROOT=/opt/elbe-sdk/sysroots/target
> -export PATH=/opt/elbe-sdk/sysroots/host/usr/bin:/opt/elbe-sdk/sysroots/host/usr/sbin:/opt/elbe-sdk/sysroots/host/bin:/opt/elbe-sdk/sysroots/host/sbin:$PATH
> +export SDKTARGETSYSROOT="${sdk_path}/sysroots/target"
> +export PATH="${sdk_path}/sysroots/host/usr/bin:${sdk_path}/sysroots/host/usr/sbin:${sdk_path}/sysroots/host/bin:${sdk_path}/sysroots/host/sbin:$PATH"
>  export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT
>  export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/${real_multimach_target_sys}/pkgconfig
> -export OECORE_NATIVE_SYSROOT="/opt/elbe-sdk/sysroots/host"
> +export OECORE_NATIVE_SYSROOT="${sdk_path}/sysroots/host"
>  export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"
>  export CC="${real_multimach_target_sys}-gcc --sysroot=$SDKTARGETSYSROOT"
>  export CXX="${real_multimach_target_sys}-g++ --sysroot=$SDKTARGETSYSROOT"
> -- 
> 2.15.1
> 

-- 
Mit freundlichen Grüßen
Torben Hohn

Linutronix GmbH

Standort: Bremen

Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
Nr. / Trade register no.: 700 806

Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner

Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
möglich ist, durch Antwort-Mail. Vielen Dank!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20180208/d396165c/attachment.sig>


More information about the elbe-devel mailing list