[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 0ee2a96b 5/5: Export $EXEEXT with a toolchain
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 0ee2a96b 5/5: Export $EXEEXT with a toolchain-appropriate value |
Date: |
Mon, 13 Jun 2022 09:57:24 -0400 (EDT) |
branch: master
commit 0ee2a96b1f4261881eb32adffa5f3edb6349b90b
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Export $EXEEXT with a toolchain-appropriate value
The extension will be required by wine-7.
---
.github/workflows/ci.yml | 2 +-
nychthemeral_test.sh | 6 +++---
set_toolchain.sh | 8 ++++++--
transume_toolchain.sh | 3 ++-
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b2d28e2c..f94abff1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -389,4 +389,4 @@ jobs:
if: matrix.mingw
run: |
. ./set_toolchain.sh
- $PERFORM /opt/lmi/bin/wx_test.exe --ash_nazg
--data_path=/opt/lmi/data
+ $PERFORM /opt/lmi/bin/wx_test"$EXEEXT" --ash_nazg
--data_path=/opt/lmi/data
diff --git a/nychthemeral_test.sh b/nychthemeral_test.sh
index 2486d357..c5bc14b6 100755
--- a/nychthemeral_test.sh
+++ b/nychthemeral_test.sh
@@ -332,7 +332,7 @@ make "$coefficiency" install check_physical_closure 2>&1 \
if [ "x86_64-pc-linux-gnu" != "$LMI_TRIPLET" ]
then
printf '\n# GUI test\n\n'
- xvfb-run "$PERFORM" "$prefix"/bin/wx_test --ash_nazg
--data_path="$prefix"/data 2>&1 \
+ xvfb-run "$PERFORM" "$prefix"/bin/wx_test"$EXEEXT" --ash_nazg
--data_path="$prefix"/data 2>&1 \
| tee "$log_dir"/gui_test | sed -e "$build_clutter" -e "$gui_test_clutter"
else
printf '\n# GUI test skipped--it does not work properly with GTK\n'
@@ -453,13 +453,13 @@ printf '\n# test all "emit_*" output types supported by
CLI\n\n'
# target above; here, it's discarded (but stderr is not)
# group-roster type omitted: sensible only for a census
-$PERFORM /opt/lmi/bin/lmi_cli_shared --file="$throwaway_dir"/sample.ill
--accept --ash_nazg --data_path=/opt/lmi/data
--emit=emit_to_pwd,emit_test_data,emit_spreadsheet,emit_text_stream,emit_custom_0,emit_custom_1,emit_calculation_summary_html,emit_calculation_summary_tsv
>/dev/null
+$PERFORM /opt/lmi/bin/lmi_cli_shared"$EXEEXT"
--file="$throwaway_dir"/sample.ill --accept --ash_nazg
--data_path=/opt/lmi/data
--emit=emit_to_pwd,emit_test_data,emit_spreadsheet,emit_text_stream,emit_custom_0,emit_custom_1,emit_calculation_summary_html,emit_calculation_summary_tsv
>/dev/null
# same output filename for '.cns' as for '.ill': uniquify it
mv sample.tsv sample.ill.tsv
# calculation-summary types omitted: not sensible for a census
-$PERFORM /opt/lmi/bin/lmi_cli_shared --file="$throwaway_dir"/sample.cns
--accept --ash_nazg --data_path=/opt/lmi/data
--emit=emit_to_pwd,emit_test_data,emit_spreadsheet,emit_group_roster,emit_text_stream,emit_custom_0,emit_custom_1
>/dev/null
+$PERFORM /opt/lmi/bin/lmi_cli_shared"$EXEEXT"
--file="$throwaway_dir"/sample.cns --accept --ash_nazg
--data_path=/opt/lmi/data
--emit=emit_to_pwd,emit_test_data,emit_spreadsheet,emit_group_roster,emit_text_stream,emit_custom_0,emit_custom_1
>/dev/null
# same output filename for '.cns' as for '.ill': uniquify it
mv sample.tsv sample.cns.tsv
diff --git a/set_toolchain.sh b/set_toolchain.sh
index 12929beb..ce652cdf 100755
--- a/set_toolchain.sh
+++ b/set_toolchain.sh
@@ -1,6 +1,6 @@
#!/bin/sh this-script-must-be-sourced-not-run
-# Set $PATH variants and $PERFORM based on $LMI_COMPILER and $LMI_TRIPLET.
+# Set environment variables appropriate for $LMI_COMPILER and $LMI_TRIPLET.
# Copyright (C) 2019, 2020, 2021, 2022 Gregory W. Chicares.
#
@@ -108,6 +108,8 @@ export PATH="$localbindir":"$locallibdir":"$minimal_path"
# It is okay to export these variables unconditionally.
export LD_LIBRARY_PATH
+
+export EXEEXT
export PERFORM
export WINEPATH
@@ -133,12 +135,14 @@ case "$lmi_build_type" in
LD_LIBRARY_PATH=.
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$locallibdir"
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$bindir"
- # Nullify any leftover "wine" value.
+ # Nullify any leftover "wine" values.
+ EXEEXT=
PERFORM=
;;
(*-*-mingw32)
# Nullify any leftover value from the native case above.
LD_LIBRARY_PATH=
+ EXEEXT=".exe"
PERFORM="wine"
w0="$(winepath -w "$localbindir" | sed -e's/\\/\\\\/g')"
w1="$(winepath -w "$locallibdir" | sed -e's/\\/\\\\/g')"
diff --git a/transume_toolchain.sh b/transume_toolchain.sh
index 9d7a1b6b..e159af93 100755
--- a/transume_toolchain.sh
+++ b/transume_toolchain.sh
@@ -33,6 +33,7 @@ srcdir=$(dirname "$(readlink --canonicalize "$0")")
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 LD_LIBRARY_PATH := $LD_LIBRARY_PATH"
printf '%s\n' "export WINEPATH := $WINEPATH"
+printf '%s\n' "export EXEEXT := $EXEEXT"
printf '%s\n' "export PERFORM := $PERFORM"
-printf '%s\n' "export LD_LIBRARY_PATH := $LD_LIBRARY_PATH"