[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 4849fae 5/6: Make sure $LMI_COMPILER and $LMI
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 4849fae 5/6: Make sure $LMI_COMPILER and $LMI_TRIPLET are set |
Date: |
Sun, 19 May 2019 19:29:19 -0400 (EDT) |
branch: master
commit 4849fae25d9811bc7759550a35083e9b32bf1b2c
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Make sure $LMI_COMPILER and $LMI_TRIPLET are set
Established a precondition that both these variables are set and not
null, with failure as the alternative. Removed commands (which had been
present only in some of these files) that used default values if these
variables were null or unset.
---
install_libxml2_libxslt.make | 7 ++++---
install_mingw.make | 6 ++++--
install_mingw32.make | 6 ++++--
install_wx.sh | 4 ++--
install_wxpdfdoc.sh | 4 ++--
test_schemata.sh | 3 +++
6 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/install_libxml2_libxslt.make b/install_libxml2_libxslt.make
index 714d93a..8be2559 100644
--- a/install_libxml2_libxslt.make
+++ b/install_libxml2_libxslt.make
@@ -43,9 +43,6 @@ host_path := libxml2
mingw_dir := /opt/lmi/${LMI_COMPILER}_${LMI_TRIPLET}/gcc_msw
-LMI_COMPILER ?= gcc
-LMI_TRIPLET ?= i686-w64-mingw32
-
prefix := /opt/lmi/local
exec_prefix := $(prefix)/$(LMI_COMPILER)_$(LMI_TRIPLET)
@@ -158,6 +155,8 @@ initial_setup :| clobber_exec_prefix_only
.PHONY: initial_setup
initial_setup:
+ [ -n "$$LMI_COMPILER" ] || { printf '%s\n' "no LMI_COMPILER" && false; }
+ [ -n "$$LMI_TRIPLET" ] || { printf '%s\n' "no LMI_TRIPLET" && false; }
$(MKDIR) --parents $(prefix)
$(MKDIR) --parents $(exec_prefix)
$(MKDIR) --parents $(cache_dir)
@@ -209,6 +208,8 @@ $(libraries):
.PHONY: clobber_exec_prefix_only
clobber_exec_prefix_only:
+ [ -n "$$LMI_COMPILER" ] || { printf '%s\n' "no LMI_COMPILER" && false; }
+ [ -n "$$LMI_TRIPLET" ] || { printf '%s\n' "no LMI_TRIPLET" && false; }
-$(RM) --force --recursive $(exec_prefix)/bin/*xml2*
-$(RM) --force --recursive $(exec_prefix)/bin/*xslt*
-$(RM) --force --recursive $(exec_prefix)/bin/xmllint*
diff --git a/install_mingw.make b/install_mingw.make
index 0881dea..b58a373 100644
--- a/install_mingw.make
+++ b/install_mingw.make
@@ -107,9 +107,11 @@ $(file_list): initial_setup
.PHONY: initial_setup
initial_setup:
+ [ -n "$$LMI_COMPILER" ] || { printf '%s\n' "no LMI_COMPILER" &&
false; }
+ [ -n "$$LMI_TRIPLET" ] || { printf '%s\n' "no LMI_TRIPLET" &&
false; }
type "$(WGET)" >/dev/null || { printf '%b' $(wget_missing) &&
false; }
- [ ! -e $(prefix) ] || { printf '%b' $(prefix_exists) &&
false; }
- [ ! -e $(ad_hoc_dir) ] || { printf '%b' $(ad_hoc_dir_exists) &&
false; }
+ [ ! -e $(prefix) ] || { printf '%b' $(prefix_exists) &&
false; }
+ [ ! -e $(ad_hoc_dir) ] || { printf '%b' $(ad_hoc_dir_exists) &&
false; }
$(MKDIR) --parents $(prefix)
$(MKDIR) --parents $(ad_hoc_dir)
diff --git a/install_mingw32.make b/install_mingw32.make
index 22f103e..82259b5 100644
--- a/install_mingw32.make
+++ b/install_mingw32.make
@@ -115,9 +115,11 @@ $(file_list): initial_setup
.PHONY: initial_setup
initial_setup:
+ [ -n "$$LMI_COMPILER" ] || { printf '%s\n' "no LMI_COMPILER" &&
false; }
+ [ -n "$$LMI_TRIPLET" ] || { printf '%s\n' "no LMI_TRIPLET" &&
false; }
type "$(WGET)" >/dev/null || { printf '%b' $(wget_missing) &&
false; }
- [ ! -e $(prefix) ] || { printf '%b' $(prefix_exists) &&
false; }
- [ ! -e $(ad_hoc_dir) ] || { printf '%b' $(ad_hoc_dir_exists) &&
false; }
+ [ ! -e $(prefix) ] || { printf '%b' $(prefix_exists) &&
false; }
+ [ ! -e $(ad_hoc_dir) ] || { printf '%b' $(ad_hoc_dir_exists) &&
false; }
$(MKDIR) --parents $(prefix)
$(MKDIR) --parents $(ad_hoc_dir)
diff --git a/install_wx.sh b/install_wx.sh
index 825abea..82c4853 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -41,8 +41,8 @@ coefficiency=${coefficiency:-"--jobs=4"}
MAKE=${MAKE:-"make $coefficiency"}
-LMI_COMPILER=${LMI_COMPILER:-"gcc"}
-LMI_TRIPLET=${LMI_TRIPLET:-"i686-w64-mingw32"}
+[ -n "$LMI_COMPILER" ] || { printf '%s\n' "no LMI_COMPILER" && exit 1; }
+[ -n "$LMI_TRIPLET" ] || { printf '%s\n' "no LMI_TRIPLET" && exit 2; }
# Variables that normally should be left alone
#################################
diff --git a/install_wxpdfdoc.sh b/install_wxpdfdoc.sh
index ee879fa..1500d21 100755
--- a/install_wxpdfdoc.sh
+++ b/install_wxpdfdoc.sh
@@ -41,8 +41,8 @@ coefficiency=${coefficiency:-"--jobs=4"}
MAKE=${MAKE:-"make $coefficiency"}
-LMI_COMPILER=${LMI_COMPILER:-"gcc"}
-LMI_TRIPLET=${LMI_TRIPLET:-"i686-w64-mingw32"}
+[ -n "$LMI_COMPILER" ] || { printf '%s\n' "no LMI_COMPILER" && exit 1; }
+[ -n "$LMI_TRIPLET" ] || { printf '%s\n' "no LMI_TRIPLET" && exit 2; }
# Variables that normally should be left alone
#################################
diff --git a/test_schemata.sh b/test_schemata.sh
index af2a59b..4b5737b 100755
--- a/test_schemata.sh
+++ b/test_schemata.sh
@@ -21,6 +21,9 @@
# email: <address@hidden>
# snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+[ -n "$LMI_COMPILER" ] || { printf '%s\n' "no LMI_COMPILER" && exit 1; }
+[ -n "$LMI_TRIPLET" ] || { printf '%s\n' "no LMI_TRIPLET" && exit 2; }
+
echo " Test schemata..."
# Directory where this script resides.
- [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 <=
- [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, 2019/05/19