lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master a896830 4/5: Fix defect introduced 20190519T1


From: Greg Chicares
Subject: [lmi-commits] [lmi] master a896830 4/5: Fix defect introduced 20190519T1745Z: incomplete export
Date: Fri, 31 May 2019 19:23:50 -0400 (EDT)

branch: master
commit a896830cc1ade2d625eb4ad85d23e87d670953f2
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Fix defect introduced 20190519T1745Z: incomplete export
    
    Fixed a defect in commit 6b5f5b269:
      Rely on 'set_toolchain.sh' to set $LMI_COMPILER and $LMI_TRIPLET
    
    'set_toolchain.sh' must do three things:
    
    (1) set independent variables
      $LMI_COMPILER, $LMI_TRIPLET
    to defaults if they are not already set;
    
    (2) set dependent variables
      $PATH, $WINEPATH, $PERFORM
    according to the values of $LMI_COMPILER and $LMI_TRIPLET; and
    
    (3) export required variables to the 'make' environment.
    
    In (3), it exported only (2), not (1). Now in (3) it exports (1), too.
    
    The problem was that submakefiles use (1), e.g., in 'msw_cygwin.make':
      mingw_dir   := /opt/lmi/${LMI_COMPILER}_${LMI_TRIPLET}/gcc_msw
    so any side effects of (1) must be exported, since commit 6b5f5b269
    removed the historical variable definitions from 'GNUmakefile'.
---
 set_toolchain.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/set_toolchain.sh b/set_toolchain.sh
index 8433747..e3245a1 100755
--- a/set_toolchain.sh
+++ b/set_toolchain.sh
@@ -135,9 +135,11 @@ case "$lmi_build_type" in
 esac
 if [ -n "$LMI_ENV_FILE" ]; then
     {
-    printf '%s\n' "export PATH     := $PATH"
-    printf '%s\n' "export WINEPATH := $WINEPATH"
-    printf '%s\n' "export PERFORM  := $PERFORM"
+    printf '%s\n' "export LMI_COMPILER := $LMI_COMPILER"
+    printf '%s\n' "export LMI_TRIPLET  := $LMI_TRIPLET"
+    printf '%s\n' "export PATH         := $PATH"
+    printf '%s\n' "export WINEPATH     := $WINEPATH"
+    printf '%s\n' "export PERFORM      := $PERFORM"
     } > "$LMI_ENV_FILE"
 fi
 }



reply via email to

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