[Top][All Lists]

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

Re: [PATCH 2/6] config.guess: use intermediate variable with uname resul

From: Jacob Bachmeyer
Subject: Re: [PATCH 2/6] config.guess: use intermediate variable with uname results
Date: Mon, 24 May 2021 21:04:50 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090807 MultiZilla/ SeaMonkey/1.1.17 Mnenhy/

Dmitry V. Levin wrote:
On Fri, May 21, 2021 at 10:39:49PM -0500, Jacob Bachmeyer wrote:
This will allow quoting to be significantly simplified in another
 pass through the file.

This was done with some manual cleanup after running this Emacs Lisp:

No, please don't do it this way, let it be either a manual or an automatic
change, but not a mix of those.

Fair enough; there may be a small manual cleanup patch after a larger automatic patch in v2.

  (defun edit-all-exits ()
         "^\\([[:space:]]+\\)echo[[:space:]]+\\([^\n]+\\)\n\\1exit ;;"
         nil t)
      (replace-match "\\1GUESS=\\2\n\\1;;")))

Sorry, I cannot verify this, please use a sed or an awk script instead.

I am writing a GNU Awk program that will combine the automatic parts of patches 2 and 3 for v2; patches 1 and 5 were done manually using Emacs M-x occur and keyboard macros; patches 4 and 6 were produced manually.

* config.guess: add GUESS variable to hold results of uname analysis
 config.guess | 973 ++++++++++++++++++++++++++-------------------------
 1 file changed, 492 insertions(+), 481 deletions(-)

diff --git a/config.guess b/config.guess
index 92074bd..6acddd3 100755
--- a/config.guess
+++ b/config.guess
@@ -84,6 +84,11 @@ if test $# != 0; then
   exit 1
+# just in case it came from the environment
+if test x${GUESS+set} != xset; then
+    GUESS=

This looks too complicated, wouldn't a simple GUESS= suffice?

Now that I think about it... yes.  This change will be in v2.

-- Jacob

reply via email to

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