diff options
author | H. Peter Anvin <hpa@zytor.com> | 2018-12-22 18:51:59 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2018-12-22 18:51:59 -0800 |
commit | 54d5078c11491a409339b8df22be59168c3c137c (patch) | |
tree | 1220d89b849ef735a616b93e4361668030410ec9 | |
parent | b0121dc312a83ab4912769e36c9f2cbe9493545d (diff) | |
download | nasm-54d5078c11491a409339b8df22be59168c3c137c.tar.gz |
autogen.sh: add code to re-run configure afterwards
Add code to autogen.sh to (re-)run configure, with preserved
configuration.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | Makefile.in | 4 | ||||
-rwxr-xr-x | autogen.sh | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in index c414c68b..45cfdb51 100644 --- a/Makefile.in +++ b/Makefile.in @@ -475,10 +475,10 @@ travis: nasm$(X) $(PYTHON3) travis/nasm-t.py run # -# Rules to run autoreconf if necessary +# Rules to run autogen if necessary # configure: configure.ac autoconf/aclocal.m4 - autoreconf + sh autogen.sh --recheck config.status: configure @if [ ! -f config.status ]; then \ @@ -2,6 +2,12 @@ # # 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 + mkdir -p autoconf autoconf/aux config autolib="`automake --print-libdir`" for prg in install-sh compile config.guess config.sub; do @@ -18,3 +24,8 @@ rm -rf autoconf/m4.old autoheader -B autoconf autoconf -B autoconf rm -rf autom4te.cache config.log config.status config/config.h Makefile + +if $recheck; then + # This bizarre statement has to do with how config.status quotes its output + echo exec sh configure $config | sh - +fi |