lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master d0bc2d1 2/5: Regularize toolchain-dependent e


From: Greg Chicares
Subject: [lmi-commits] [lmi] master d0bc2d1 2/5: Regularize toolchain-dependent exports
Date: Mon, 26 Oct 2020 16:27:18 -0400 (EDT)

branch: master
commit d0bc2d15e3668b23541acc94e31dea995a3c7087
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Regularize toolchain-dependent exports
    
    Alphabetical is better than random order.
    
    Write 'export' once, rather than multiple times, per variable.
---
 set_toolchain.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/set_toolchain.sh b/set_toolchain.sh
index 618c100..0af1edc 100755
--- a/set_toolchain.sh
+++ b/set_toolchain.sh
@@ -1,6 +1,6 @@
 #!/bin/sh this-script-must-be-sourced-not-run
 
-# Set $PATH, $WINEPATH, and $PERFORM based on $LMI_COMPILER and $LMI_TRIPLET.
+# Set $PATH variants and $PERFORM based on $LMI_COMPILER and $LMI_TRIPLET.
 
 # Copyright (C) 2019, 2020 Gregory W. Chicares.
 #
@@ -104,10 +104,11 @@ local 
locallibdir="$prefix/local/${LMI_COMPILER}_${LMI_TRIPLET}/lib"
 minimal_path=${MINIMAL_PATH:-"/usr/bin:/bin:/usr/sbin:/sbin"}
 export PATH="$localbindir":"$locallibdir":"$minimal_path"
 
-# It is okay to export these two variables unconditionally.
+# It is okay to export these variables unconditionally.
 
-export WINEPATH
+export LD_LIBRARY_PATH
 export PERFORM
+export WINEPATH
 
 # Are double quotes inside double quotes inside $() dubious? I.e.,
 #  " $( "is this string quoted?" ) "
@@ -128,16 +129,15 @@ case "$lmi_build_type" in
         case "$LMI_TRIPLET" in
             (x86_64-pc-linux-gnu)
                 # Using LD_LIBRARY_PATH is not ideal, but it does work.
-                export LD_LIBRARY_PATH
                 LD_LIBRARY_PATH=.
                 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$locallibdir"
                 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$bindir"
                 ;;
             (*-*-mingw32)
+                PERFORM="wine"
                 w0="$(winepath -w "$localbindir" | sed -e's/\\/\\\\/g')"
                 w1="$(winepath -w "$locallibdir" | sed -e's/\\/\\\\/g')"
-                export WINEPATH="$w0;$w1"
-                export  PERFORM="wine"
+                WINEPATH="$w0;$w1"
                 ;;
         esac
         ;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]