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@zytor.com>
This commit is contained in:
H. Peter Anvin 2023-02-19 21:37:37 -08:00
parent 8ce37daeea
commit ea49bac9b9
2 changed files with 16 additions and 6 deletions

View file

@ -3,10 +3,20 @@
# Run this script to regenerate autoconf files # Run this script to regenerate autoconf files
# #
recheck=false recheck=false
if [ x"$1" = x--recheck ]; then for arg; do
recheck=true case x"$arg" in
config=$(sh config.status --config 2>/dev/null) x--recheck)
fi 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 # This allows for overriding the default autoconf programs
AUTOCONF="${AUTOCONF:-${AUTOTOOLS_PREFIX}autoconf}" AUTOCONF="${AUTOCONF:-${AUTOTOOLS_PREFIX}autoconf}"

View file

@ -27,7 +27,7 @@ if [ x`cat version` != x"${version}" ]; then
git update-index version git update-index version
git commit -m "Version ${version}" -- version git commit -m "Version ${version}" -- version
fi fi
git tag -m "NASM version ${version}" -f "nasm-${version}" git tag -m "NASM version ${version}" -f "nasm-${version}"
cd "$WHERE" cd "$WHERE"
rm -rf nasm-release.* rm -rf nasm-release.*
@ -43,7 +43,7 @@ makej="${makej:-make}"
# Create files which are in the release but automatically generated # Create files which are in the release but automatically generated
cd nasm cd nasm
./autogen.sh ./autogen.sh --clearenv
./configure --prefix=/usr/local ./configure --prefix=/usr/local
$makej perlreq spec manpages $makej perlreq spec manpages
$makej alldeps $makej alldeps