[nasm:nasm-2.16.xx] autogen: add --cleanenv option and use it in the release script

nasm-bot for H. Peter Anvin hpa at zytor.com
Sun Feb 19 21:39:05 PST 2023


Commit-ID:  ea49bac9b907c64f1d6595773bc7e7695b6e1de4
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=ea49bac9b907c64f1d6595773bc7e7695b6e1de4
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sun, 19 Feb 2023 21:37:37 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Sun, 19 Feb 2023 21:37:37 -0800

autogen: add --cleanenv option and use it in the release script

Make sure we don't pick up any local things from the environment.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 autogen.sh    | 18 ++++++++++++++----
 tools/release |  4 ++--
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index f32c0c3f..d272abcb 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,10 +3,20 @@
 # Run this script to regenerate autoconf files
 #
 recheck=false
-if [ x"$1" = x--recheck ]; then
-    recheck=true
-    config=$(sh config.status --config 2>/dev/null)
-fi
+for arg; do
+    case x"$arg" in
+	x--recheck)
+	    recheck=true
+	    config=$(sh config.status --config 2>/dev/null)
+	    ;;
+	x--clearenv)
+	    unset AUTOCONF AUTOMAKE ACLOCAL AUTOHEADER ACLOCAL_PATH
+	    ;;
+	*)
+	    echo "$0: unknown option: $arg" 1>&2
+	    ;;
+    esac
+done
 
 # This allows for overriding the default autoconf programs
 AUTOCONF="${AUTOCONF:-${AUTOTOOLS_PREFIX}autoconf}"
diff --git a/tools/release b/tools/release
index f353425a..c88cc36d 100755
--- a/tools/release
+++ b/tools/release
@@ -27,7 +27,7 @@ if [ x`cat version` != x"${version}" ]; then
     git update-index version
     git commit -m "Version ${version}" -- version
 fi
-git tag -m "NASM version ${version}" -f "nasm-${version}" 
+git tag -m "NASM version ${version}" -f "nasm-${version}"
 
 cd "$WHERE"
 rm -rf nasm-release.*
@@ -43,7 +43,7 @@ makej="${makej:-make}"
 
 # Create files which are in the release but automatically generated
 cd nasm
-./autogen.sh
+./autogen.sh --clearenv
 ./configure --prefix=/usr/local
 $makej perlreq spec manpages
 $makej alldeps


More information about the Nasm-commits mailing list