lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 2221ca2a 3/4: Set $EXEEXT more reliably for P


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2221ca2a 3/4: Set $EXEEXT more reliably for PETE
Date: Wed, 15 Jun 2022 11:18:59 -0400 (EDT)

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

    Set $EXEEXT more reliably for PETE
    
    $EXEEXT had been set in a fragile way that is no longer correct.
    Removed that code sedimentation, along with the invocation of
    'config.guess' whose result is otherwise not used here. Instead,
    transplanted a minimal few lines from 'set_toolchain.sh' into
    'rebuild_pete.sh' to accomplish this one purpose.
    
    Importing the heavyweight 'transume_toolchain.sh' mechanism from
    'GNUmakefile' wouldn't make sense: the goal there is to make it
    impossible to use a makefile incorrectly, but here it's okay if
    incorrect use with msw produces an error, as this makefile is to
    be run only by an expert or by the nychthemeral test and in either
    case not without regard to the rebuild script obviously provided.
---
 tools/pete-2.1.1/Makefile        |  8 --------
 tools/pete-2.1.1/rebuild_pete.sh | 17 ++++++++++++++++-
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/tools/pete-2.1.1/Makefile b/tools/pete-2.1.1/Makefile
index 1741c8b1..9c69b3bb 100644
--- a/tools/pete-2.1.1/Makefile
+++ b/tools/pete-2.1.1/Makefile
@@ -21,19 +21,11 @@
 
 
################################################################################
 
-lmi_build_type := $(shell /usr/share/misc/config.guess)
-
-EXEEXT :=
-ifeq (cygwin,$(findstring cygwin,$(lmi_build_type)))
-  EXEEXT := .exe
-endif
-
 all: pete_vector_test$(EXEEXT)
 
 submake_options := \
   --directory=PETE/Tools/ \
   --file=makefile \
-  EXEEXT='$(EXEEXT)' \
 
 pete_vector_test$(EXEEXT): pete_vector_test.cpp
        $(CXX) -I. $^ -o $@
diff --git a/tools/pete-2.1.1/rebuild_pete.sh b/tools/pete-2.1.1/rebuild_pete.sh
index 82e50439..9e01c938 100755
--- a/tools/pete-2.1.1/rebuild_pete.sh
+++ b/tools/pete-2.1.1/rebuild_pete.sh
@@ -23,7 +23,22 @@
 
 set -e
 
+export EXEEXT
+
+case "$LMI_TRIPLET" in
+    (x86_64-pc-linux-gnu)
+        EXEEXT=
+        ;;
+    (*-*-mingw32)
+        EXEEXT=".exe"
+        ;;
+    (*)
+        printf '%s\n' "Error: LMI_TRIPLET absent or unrecognized."
+        return 3;
+        ;;
+esac
+
 make -f Makefile maintainer-clean
 make -f Makefile
-./pete_vector_test
+./pete_vector_test${EXEEXT}
 make -f Makefile distclean



reply via email to

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