Commit 73bb870a authored by Nils Goroll's avatar Nils Goroll

improve configure auto-magic

- Makefile and prepare-source.mak should not keep a configure.sh output from a failed
  autoconf run
- the configure wrapper tool should always call prepare-source to rebuild configure.sh
  when required
- Makefile and prepare-source.mak should rebuild aclocal.m4 when configure.ac changes
parent de941933
......@@ -143,10 +143,13 @@ gensend: gen
conf:
cd $(srcdir) && $(MAKE) -f prepare-source.mak conf
aclocal.m4: configure.ac
aclocal -I m4
configure.sh config.h.in: configure.ac aclocal.m4
@if test -f configure.sh; then cp -p configure.sh configure.sh.old; else touch configure.sh.old; fi
@if test -f config.h.in; then cp -p config.h.in config.h.in.old; else touch config.h.in.old; fi
autoconf -o configure.sh
autoconf -o configure.sh || ( rm configure.sh ; false )
autoheader && touch config.h.in
@if diff configure.sh configure.sh.old >/dev/null 2>&1; then \
echo "configure.sh is unchanged."; \
......
......@@ -15,13 +15,13 @@ if test ! -f "$realconfigure"; then
else
actions='build'
fi
if "$dir/prepare-source" $actions; then
:
else
echo 'Failed to build configure.sh and/or config.h.in -- giving up.' >&2
rm -f "$realconfigure"
exit 1
fi
fi
if "$dir/prepare-source" $actions; then
:
else
echo 'Failed to build configure.sh and/or config.h.in -- giving up.' >&2
rm -f "$realconfigure"
exit 1
fi
exec "$realconfigure" "${@}"
conf: configure.sh config.h.in
aclocal.m4: configure.ac
aclocal -I m4
configure.sh: configure.ac aclocal.m4
autoconf -o configure.sh
autoconf -o configure.sh || ( rm configure.sh ; false )
config.h.in: configure.ac aclocal.m4
autoheader && touch config.h.in
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment