[PATCH v2 1/8] config.guess: use intermediate variable with uname results

2021-05-26 Thread Jacob Bachmeyer
This will allow quoting to be significantly simplified in another pass through the file. This patch was generated using the included GNU Awk program. * config.guess: add GUESS variable to hold results of uname analysis * patch-1.gawk: store tool that produced automated patch --- config.guess |

Re: [PATCH v2 0/8] restore compatibility with pre-POSIX shells in config.guess

2021-05-26 Thread Jacob Bachmeyer
Jacob Bachmeyer wrote: [...] Jacob Bachmeyer (8): config.guess: use intermediate variable with uname results config.guess: manual fixups after previous automatic patch config.guess: remove unneeded quotes and factor command substitutions config.guess: automatic fixups after previous autom

[PATCH v2 3/8] config.guess: remove unneeded quotes and factor command substitutions

2021-05-26 Thread Jacob Bachmeyer
This is further cleanup and simplifies some constructs that can confuse Emacs' syntax highlighting while generally reducing required quoting. This patch was generated using the included GNU Awk program. * config.guess: remove unneeded variable quotes when setting GUESS * config.guess: factor out

[PATCH v2 7/8] config.guess: manual fixups after previous automatic patch

2021-05-26 Thread Jacob Bachmeyer
The tool could not handle command substitutions that span lines, but fortunately there were only two such substitutions in the script. The test for which universe is active on Pyramid is rewritten into a case block because it was the only use of a command substitution as an argument to the test co

[PATCH v2 2/8] config.guess: manual fixups after previous automatic patch

2021-05-26 Thread Jacob Bachmeyer
This patch adjusts a few "leftover" cases that the tool could not easily recognize and fixes comment indentation in a few other special cases. --- config.guess | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/config.guess b/config.guess index 002

[PATCH v2 0/8] restore compatibility with pre-POSIX shells in config.guess

2021-05-26 Thread Jacob Bachmeyer
This patch series tidies config.guess and reverts to classic backtick command substitutions. This is a respin after the earlier series proved difficult to properly review. Quotes while forming the output are pointless, since no valid GNU configuration tuple contains whitespace, therefore no varia

[PATCH v2 4/8] config.guess: automatic fixups after previous automated patch

2021-05-26 Thread Jacob Bachmeyer
This patch was generated using the following command: sed -i config.guess \ -e '/="[^"]\+"\(-\|$\)/s/="\([^"([:space:])]\+\)"/=\1/' \ -e '/="[^"]\+"[[:alnum:]]/s/="\$\([^([:space:])]\+\)"/=${\1}/' \ -e \ '/\$(echo[^|]\+|/s/\([^[:space:]]\)[[:space:]]*|[[:space:]]*sed/\1 | sed/g

[PATCH v2 5/8] config.guess: manual fixup after previous automated patches

2021-05-26 Thread Jacob Bachmeyer
This patch provides the special handling for the GNU system. As these were two small and unique edits, they were not included in the scripts. This patch also cleans up other minor issues that must be addressed before reverting to classic command substitutions and updates "shellcheck" directives t

[PATCH v2 8/8] remove automatic patch generators

2021-05-26 Thread Jacob Bachmeyer
These tools have served their purposes and need not be kept outside of the repository history any longer. This patch as a diff also collects the contents of the various tools in one convenient place. --- patch-1.gawk | 114 --- patch-3.gawk | 99 --

[PATCH v2 6/8] config.guess: replace POSIX $( ) with classic ` ` throughout

2021-05-26 Thread Jacob Bachmeyer
The previous replacement of backticks with POSIX command substitutions was ill-considered and illogical: this script recognizes many archaic machine types that probably never had POSIX shells, therefore it needs to be able to run successfully under pre-POSIX shells. This patch was generated using