Fix regex errors in .aux scanning, and other small problems

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@417 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-01-12 11:16:01 +00:00
parent f133142418
commit f20dd3e30e
4 changed files with 31 additions and 15 deletions

View File

@ -1,3 +1,15 @@
2000-01-12 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/LaTeX.C (scanAux): fix the regular expression used to scan
.aux files.
(runBibTeX): ditto.
* autogen.sh: do not use "type -path" (what's that anyway?).
* src/support/filetools.C (findtexfile): remove extraneous space
which caused a kpsewhich warning (at least with kpathsea version
3.0).
2000-01-11 Lars Gullik Bjønnes <larsbj@lyx.org> 2000-01-11 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/mathed/Makefile.am (noinst_LTLIBRARIES): use .la * src/mathed/Makefile.am (noinst_LTLIBRARIES): use .la

View File

@ -6,11 +6,11 @@ AUTOMAKE="automake -a -c --foreign"
AUTOCONF=autoconf AUTOCONF=autoconf
GNUM4= GNUM4=
echo -n "Locating GNU m4..." echo -n "Locating GNU m4... "
for prog in $M4 gm4 gnum4 m4 ; do for prog in $M4 gm4 gnum4 m4 ; do
case `$prog --version 2>&1` in case `$prog --version 2>&1` in
*GNU*) ok=yes *GNU*) ok=yes
GNUM4=`type -path $prog` GNUM4=$prog
echo "found: $GNUM4" echo "found: $GNUM4"
break ;; break ;;
*) ;; *) ;;
@ -21,7 +21,7 @@ if test x$ok = xno ; then
fi fi
# Generate acinclude.m4 # Generate acinclude.m4
echo -n "Generate acinclude.m4..." echo -n "Generate acinclude.m4... "
rm -rf acinclude.m4 rm -rf acinclude.m4
touch acinclude.m4 touch acinclude.m4
for fil in config/lyxinclude.m4 config/libtool.m4 config/gettext.m4 config/lcmessage.m4 config/progtest.m4 ; do for fil in config/lyxinclude.m4 config/libtool.m4 config/gettext.m4 config/lcmessage.m4 config/progtest.m4 ; do
@ -31,7 +31,7 @@ echo "done."
# Generate the Makefiles and configure files # Generate the Makefiles and configure files
if ( aclocal --version ) </dev/null > /dev/null 2>&1; then if ( aclocal --version ) </dev/null > /dev/null 2>&1; then
echo -n "Building macros..." echo -n "Building macros... "
$ACLOCAL ; (cd lib/reLyX; $ACLOCAL ) $ACLOCAL ; (cd lib/reLyX; $ACLOCAL )
echo "done." echo "done."
else else
@ -40,7 +40,7 @@ else
fi fi
if ( autoheader --version ) </dev/null > /dev/null 2>&1; then if ( autoheader --version ) </dev/null > /dev/null 2>&1; then
echo -n "Building config header template..." echo -n "Building config header template... "
$AUTOHEADER $AUTOHEADER
echo "done." echo "done."
else else
@ -49,7 +49,7 @@ else
fi fi
if ( $AUTOMAKE --version ) </dev/null > /dev/null 2>&1; then if ( $AUTOMAKE --version ) </dev/null > /dev/null 2>&1; then
echo -n "Building Makefile templates..." echo -n "Building Makefile templates... "
$AUTOMAKE ; (cd lib/reLyX ; $AUTOMAKE ) $AUTOMAKE ; (cd lib/reLyX ; $AUTOMAKE )
echo "done." echo "done."
else else
@ -58,10 +58,9 @@ else
fi fi
if ( $AUTOCONF --version ) </dev/null > /dev/null 2>&1; then if ( $AUTOCONF --version ) </dev/null > /dev/null 2>&1; then
echo -n "Building configure..." echo -n "Building configure... "
$AUTOCONF ; ( cd lib/reLyX ; $AUTOCONF ) $AUTOCONF ; ( cd lib/reLyX ; $AUTOCONF )
echo "done." echo "done."
echo 'run "./configure ; make"'
else else
echo "autoconf not found -- aborting" echo "autoconf not found -- aborting"
exit exit
@ -69,7 +68,7 @@ fi
# Autogenerate lib/configure.m4. # Autogenerate lib/configure.m4.
if test x$GNUM4 != x ; then if test x$GNUM4 != x ; then
echo -n "Building lib/configure ..." echo -n "Building lib/configure ... "
rm -f lib/configure rm -f lib/configure
$GNUM4 lib/configure.m4 > lib/configure $GNUM4 lib/configure.m4 > lib/configure
chmod a+x lib/configure chmod a+x lib/configure
@ -79,7 +78,7 @@ else
exit exit
fi fi
echo -n "Creating POTFILES.in..." echo -n "Creating POTFILES.in... "
cat <<EOF > tmppot cat <<EOF > tmppot
# #
# This file is automatically generated by autogen.sh. This command was # This file is automatically generated by autogen.sh. This command was
@ -98,3 +97,7 @@ grep -E "_\(\".*\"\)" `find src -name \*.[hHC]` | \
awk 'BEGIN {FS= ":"} {print $1}' | sort -f -d | uniq >> tmppot awk 'BEGIN {FS= ":"} {print $1}' | sort -f -d | uniq >> tmppot
mv tmppot po/POTFILES.in mv tmppot po/POTFILES.in
echo "done" echo "done"
echo
echo 'run "./configure ; make"'
echo

View File

@ -324,8 +324,8 @@ bool LaTeX::scanAux(DepTable & dep)
string aux = ChangeExtension(file, ".aux", true); string aux = ChangeExtension(file, ".aux", true);
ifstream ifs(aux.c_str()); ifstream ifs(aux.c_str());
string token; string token;
LRegex reg1("\\\\bibdata{([^}]+)}"); LRegex reg1("\\\\bibdata\\{([^}]+)\\}");
LRegex reg2("\\\\bibstyle{([^}]+)}"); LRegex reg2("\\\\bibstyle\\{([^}]+)\\}");
while (getline(ifs, token)) { while (getline(ifs, token)) {
if (reg1.exact_match(token)) { if (reg1.exact_match(token)) {
LRegex::SubMatches sub = reg1.exec(token); LRegex::SubMatches sub = reg1.exec(token);
@ -379,8 +379,8 @@ bool LaTeX::runBibTeX(string const & f, DepTable & dep)
ifstream ifs(f.c_str()); ifstream ifs(f.c_str());
string token; string token;
bool using_bibtex = false; bool using_bibtex = false;
LRegex reg1("\\\\bibdata{([^}]+)}"); LRegex reg1("\\\\bibdata\\{([^}]+)\\}");
LRegex reg2("\\\\bibstyle{([^}]+)}"); LRegex reg2("\\\\bibstyle\\{([^}]+)\\}");
while (getline(ifs, token)) { while (getline(ifs, token)) {
if (reg1.exact_match(token)) { if (reg1.exact_match(token)) {
using_bibtex = true; using_bibtex = true;

View File

@ -1009,7 +1009,8 @@ string findtexfile(string const & fil, string const & format)
return OnlyFilename(fil); return OnlyFilename(fil);
// No we try to find it using kpsewhich. // No we try to find it using kpsewhich.
string kpsecmd = "kpsewhich --format= " + format + " " + OnlyFilename(fil); string kpsecmd = "kpsewhich --format=" + format + " " + OnlyFilename(fil);
cmdret c = do_popen(kpsecmd); cmdret c = do_popen(kpsecmd);
lyxerr[Debug::LATEX] << "kpse status = " << c.first << "\n" lyxerr[Debug::LATEX] << "kpse status = " << c.first << "\n"