[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master e5172aa 3/6: Set $LMI_COMPILER and $LMI_TRIPL
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master e5172aa 3/6: Set $LMI_COMPILER and $LMI_TRIPLET to defaults if unset or null |
Date: |
Sun, 19 May 2019 19:29:19 -0400 (EDT) |
branch: master
commit e5172aa1d73b70da4f635d1a401216414e994b1d
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Set $LMI_COMPILER and $LMI_TRIPLET to defaults if unset or null
---
set_toolchain.sh | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/set_toolchain.sh b/set_toolchain.sh
index 319fd17..92c8181 100755
--- a/set_toolchain.sh
+++ b/set_toolchain.sh
@@ -23,17 +23,13 @@
# Invoke as ". ./set_toolchain.sh" without the quotes.
#
-# $LMI_COMPILER and $LMI_TRIPLET can be overridden at the command
-# line, e.g.:
+# $LMI_COMPILER and $LMI_TRIPLET are set to default values currently
+# used in production if they were unset or null beforehand. They can
+# be overridden at the command line, e.g.:
#
-# export LMI_COMPILER
-# export LMI_TRIPLET
# LMI_COMPILER=gcc ; LMI_TRIPLET=i686-w64-mingw32 ; . ./set_toolchain.sh
# LMI_COMPILER=gcc ; LMI_TRIPLET=x86_64-w64-mingw32 ; . ./set_toolchain.sh
#
-# where the 'export' commands need be run only once, presumably in a
-# shell startup file.
-#
# Implemented as a function that runs and then erases itself, so that
# sourcing this script changes the environment only as intended. This
# depends on 'local', which isn't yet POSIX, though there's a proposal
@@ -65,6 +61,7 @@
# Supported values:
# LMI_COMPILER : gcc, clang
# LMI_TRIPLET : i686-w64-mingw32, x86_64-w64-mingw32, x86_64-pc-linux-gnu
+# (clang and pc-linux-gnu are not yet tested).
#
# Examples:
#
@@ -150,6 +147,11 @@ fi
# 'printf' here. Similarly, 'exit' would have a surprising effect.
# Therefore, these precondition checks use 'echo' and 'return'.
+export LMI_COMPILER
+export LMI_TRIPLET
+ LMI_COMPILER=${LMI_COMPILER:-"gcc"}
+ LMI_TRIPLET=${LMI_TRIPLET:-"i686-w64-mingw32"}
+
case "$LMI_COMPILER" in
(gcc) ;;
(*)
- [lmi-commits] [lmi] master updated (3ff6c00 -> 97a8cf8), Greg Chicares, 2019/05/19
- [lmi-commits] [lmi] master 4849fae 5/6: Make sure $LMI_COMPILER and $LMI_TRIPLET are set, Greg Chicares, 2019/05/19
- [lmi-commits] [lmi] master 97a8cf8 6/6: Fix an observed problem, Greg Chicares, 2019/05/19
- [lmi-commits] [lmi] master 6b5f5b2 4/6: Rely on 'set_toolchain.sh' to set $LMI_COMPILER and $LMI_TRIPLET, Greg Chicares, 2019/05/19
- [lmi-commits] [lmi] master 995bf3e 2/6: Ensure existence of directory required by 'hooks/pre-commit', Greg Chicares, 2019/05/19
- [lmi-commits] [lmi] master 9a36758 1/6: Rewrite for clarity, Greg Chicares, 2019/05/19
- [lmi-commits] [lmi] master e5172aa 3/6: Set $LMI_COMPILER and $LMI_TRIPLET to defaults if unset or null,
Greg Chicares <=