lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 0adbe11: Fix defect introduced 20201012T2343Z


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 0adbe11: Fix defect introduced 20201012T2343Z: 'config.guess' for cygwin
Date: Thu, 29 Oct 2020 14:17:04 -0400 (EDT)

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

    Fix defect introduced 20201012T2343Z: 'config.guess' for cygwin
    
    Commit 1f4ed3ccf5431 of 20201012T2343Z changed the presumptive location
    of 'config.guess', but neglected cygwin.
    
    It is assumed that 'config.guess' is found at one (or more) of the
    hardcoded locations, and that it is executable. It does not seem
    worthwhile to make this test much more elaborate.
    
    Alternatively, 'install_cygwin.bat' could have copied cygwin's
      /usr/share/libtool/build-aux/config.guess
    (curiously, found at the default location for debian rather than for
    redhat) to /usr/share/misc/ (as the defective commit cited above did for
    'gwc/rh.sh'). However, that would have involved writing a command in the
    mutable msw batch language and depending on cygwin's practice never to
    change. It seems better to keep 'install_cygwin.bat' minimalistic.
---
 install_msw.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/install_msw.sh b/install_msw.sh
index 7f0841f..d2c6066 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -34,6 +34,25 @@ set -vx
 stamp0=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
 echo "Started: $stamp0"
 
+# Ensure that '/usr/share/misc/config.guess' is available for all
+# lmi scripts and makefiles. That's the closest thing to a canonical
+# location for it. If it's not there, then try to copy it from other
+# places where installing 'libtool' would have placed it on various
+# debian and redhat systems.
+
+config_guess_0=/usr/share/misc/config.guess
+config_guess_1=/usr/share/libtool/build-aux/config.guess
+config_guess_2=/usr/share/libtool/config/config.guess
+if   [ -f "$config_guess_0" ]
+  then printf '"config.guess" found in canonical location.\n'
+elif [ -f "$config_guess_1" ]
+  then cp -a "$config_guess_1" "$config_guess_0"
+elif [ -f "$config_guess_2" ]
+  then cp -a "$config_guess_2" "$config_guess_0"
+else
+  printf '"config.guess" not found: cannot continue.\n'; exit 3;
+fi
+
 lmi_build_type=$(/usr/share/misc/config.guess)
 
 # This should work with a rather minimal path.



reply via email to

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