mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
7d99e34d02
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@351 a592a061-630c-0410-9148-cb99ea01b6c8
80 lines
1.9 KiB
Bash
Executable File
80 lines
1.9 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
ACLOCAL=aclocal
|
|
AUTOHEADER=autoheader
|
|
AUTOMAKE="automake -a -c --foreign"
|
|
AUTOCONF=autoconf
|
|
|
|
# Generate the Makefiles and configure files
|
|
if ( aclocal --version ) </dev/null > /dev/null 2>&1; then
|
|
echo "Building macros."
|
|
$ACLOCAL ; (cd lib/reLyX; $ACLOCAL )
|
|
else
|
|
echo "aclocal not found -- aborting"
|
|
exit
|
|
fi
|
|
|
|
if ( autoheader --version ) </dev/null > /dev/null 2>&1; then
|
|
echo "Building config header template"
|
|
$AUTOHEADER
|
|
else
|
|
echo "autoheader not found -- aborting"
|
|
exit
|
|
fi
|
|
|
|
if ( $AUTOMAKE --version ) </dev/null > /dev/null 2>&1; then
|
|
echo "Building Makefile templates"
|
|
$AUTOMAKE ; (cd lib/reLyX ; $AUTOMAKE )
|
|
else
|
|
echo "automake not found -- aborting"
|
|
exit
|
|
fi
|
|
|
|
if ( $AUTOCONF --version ) </dev/null > /dev/null 2>&1; then
|
|
echo "Building configure"
|
|
$AUTOCONF ; ( cd lib/reLyX ; $AUTOCONF )
|
|
echo 'run "./configure ; make"'
|
|
else
|
|
echo "autoconf not found -- aborting"
|
|
exit
|
|
fi
|
|
|
|
# Autogenerate lib/configure.m4. We need GNU m4 for that and thus have
|
|
# to try several ones.
|
|
ok=no
|
|
for prog in $M4 gm4 gnum4 m4 ; do
|
|
case `$prog --help < /dev/null 2>&1 | grep traditional` in
|
|
*traditional*) echo "Building lib/configure"
|
|
rm -f lib/configure
|
|
$prog lib/configure.m4 >lib/configure
|
|
chmod a+x lib/configure
|
|
ok=yes
|
|
break ;;
|
|
*) ;;
|
|
esac
|
|
done
|
|
if test $ok = no ; then
|
|
echo "GNU m4 not found -- aborting"
|
|
exit
|
|
fi
|
|
|
|
echo "Creating POTFILES.in..."
|
|
cat <<EOF > tmppot
|
|
#
|
|
# This file is automatically generated by autogen.sh. This command was
|
|
# used to extract the files from the sources:
|
|
#
|
|
# grep -E "_\(\".*\"\)" \`find src -name \*.[hHC]\` | \\
|
|
# awk 'BEGIN {FS= ":"} {print $1}' | sort | uniq
|
|
#
|
|
# This must be done when standing in lyx/
|
|
#
|
|
# This is all the files that contains internationalization strings.
|
|
|
|
EOF
|
|
|
|
grep -E "_\(\".*\"\)" `find src -name \*.[hHC]` | \
|
|
awk 'BEGIN {FS= ":"} {print $1}' | sort -f -d | uniq >> tmppot
|
|
mv tmppot po/POTFILES.in
|
|
echo "done"
|