mirror of https://github.com/MidnightCommander/mc
Simplify `autogen.sh` by switching to `autoreconf`
Signed-off-by: Andreas Mohr <and@gmx.li> Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
parent
406765f044
commit
b6cbac1017
71
autogen.sh
71
autogen.sh
|
@ -1,84 +1,25 @@
|
|||
#! /bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
#!/bin/sh
|
||||
|
||||
# Don't ignore errors.
|
||||
set -e
|
||||
|
||||
# Make it possible to specify path in the environment
|
||||
: ${AUTOCONF=autoconf}
|
||||
: ${AUTOHEADER=autoheader}
|
||||
: ${AUTOMAKE=automake}
|
||||
: ${ACLOCAL=aclocal}
|
||||
: ${AUTOPOINT=autopoint}
|
||||
: ${LIBTOOLIZE=libtoolize}
|
||||
: ${XGETTEXT=xgettext}
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
|
||||
(
|
||||
# Some shells don't propagate "set -e" to subshells.
|
||||
set -e
|
||||
srcdir="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
cd "$srcdir"
|
||||
|
||||
# The autoconf cache (version after 2.52) is not reliable yet.
|
||||
rm -rf autom4te.cache src/vfs/smbfs/helpers/autom4te.cache
|
||||
${AUTORECONF:-autoreconf} --verbose --install --force -I m4 ${AUTORECONF_FLAGS}
|
||||
|
||||
if test ! -d config; then
|
||||
mkdir config
|
||||
fi
|
||||
|
||||
# Recreate intl directory.
|
||||
rm -rf intl
|
||||
$AUTOPOINT --force || exit 1
|
||||
# Customize the INSTALL file
|
||||
rm -f INSTALL && ln -s doc/INSTALL
|
||||
|
||||
# Generate po/POTFILES.in
|
||||
$XGETTEXT --keyword=_ --keyword=N_ --keyword=Q_ --output=- \
|
||||
${XGETTEXT:-xgettext} --keyword=_ --keyword=N_ --keyword=Q_ --output=- \
|
||||
`find . -name '*.[ch]'` | sed -ne '/^#:/{s/#://;s/:[0-9]*/\
|
||||
/g;s/ //g;p;}' | \
|
||||
grep -v '^$' | sort | uniq >po/POTFILES.in
|
||||
|
||||
$LIBTOOLIZE
|
||||
|
||||
ACLOCAL_INCLUDES="-I m4"
|
||||
|
||||
# Some old version of GNU build tools fail to set error codes.
|
||||
# Check that they generate some of the files they should.
|
||||
|
||||
$ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS
|
||||
test -f aclocal.m4 || \
|
||||
{ echo "aclocal failed to generate aclocal.m4" >&2; exit 1; }
|
||||
|
||||
$AUTOHEADER || exit 1
|
||||
test -f config.h.in || \
|
||||
{ echo "autoheader failed to generate config.h.in" >&2; exit 1; }
|
||||
|
||||
$AUTOCONF || exit 1
|
||||
test -f configure || \
|
||||
{ echo "autoconf failed to generate configure" >&2; exit 1; }
|
||||
|
||||
# Workaround for Automake 1.5 to ensure that depcomp is distributed.
|
||||
if test "`$AUTOMAKE --version|awk '{print $NF;exit}'`" = '1.5' ; then
|
||||
$AUTOMAKE -a src/Makefile
|
||||
fi
|
||||
$AUTOMAKE -a
|
||||
test -f Makefile.in || \
|
||||
{ echo "automake failed to generate Makefile.in" >&2; exit 1; }
|
||||
|
||||
cd src/vfs/smbfs/helpers
|
||||
date -u >include/stamp-h.in
|
||||
|
||||
$AUTOHEADER
|
||||
test -f include/config.h.in || \
|
||||
{ echo "autoheader failed to generate src/vfs/smbfs/helpers/include/config.h.in" >&2; exit 1; }
|
||||
|
||||
$AUTOCONF
|
||||
test -f configure || \
|
||||
{ echo "autoconf failed to generate src/vfs/smbfs/helpers/configure" >&2; exit 1; }
|
||||
) || exit 1
|
||||
|
||||
$srcdir/maint/utils/version.sh "$srcdir"
|
||||
|
||||
if test -x $srcdir/configure.mc; then
|
||||
|
|
Loading…
Reference in New Issue