From f20dd3e30e807d2d45202b84e2aed9f97888a685 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 12 Jan 2000 11:16:01 +0000 Subject: [PATCH] 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 --- ChangeLog | 12 ++++++++++++ autogen.sh | 23 +++++++++++++---------- src/LaTeX.C | 8 ++++---- src/support/filetools.C | 3 ++- 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 211ae75ce9..092db19e1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2000-01-12 Jean-Marc Lasgouttes + + * 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 * src/mathed/Makefile.am (noinst_LTLIBRARIES): use .la diff --git a/autogen.sh b/autogen.sh index 5ab1e78fc2..26e1ce64cd 100755 --- a/autogen.sh +++ b/autogen.sh @@ -6,11 +6,11 @@ AUTOMAKE="automake -a -c --foreign" AUTOCONF=autoconf GNUM4= -echo -n "Locating GNU m4..." +echo -n "Locating GNU m4... " for prog in $M4 gm4 gnum4 m4 ; do case `$prog --version 2>&1` in *GNU*) ok=yes - GNUM4=`type -path $prog` + GNUM4=$prog echo "found: $GNUM4" break ;; *) ;; @@ -21,7 +21,7 @@ if test x$ok = xno ; then fi # Generate acinclude.m4 -echo -n "Generate acinclude.m4..." +echo -n "Generate acinclude.m4... " rm -rf acinclude.m4 touch acinclude.m4 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 if ( aclocal --version ) /dev/null 2>&1; then - echo -n "Building macros..." + echo -n "Building macros... " $ACLOCAL ; (cd lib/reLyX; $ACLOCAL ) echo "done." else @@ -40,7 +40,7 @@ else fi if ( autoheader --version ) /dev/null 2>&1; then - echo -n "Building config header template..." + echo -n "Building config header template... " $AUTOHEADER echo "done." else @@ -49,7 +49,7 @@ else fi if ( $AUTOMAKE --version ) /dev/null 2>&1; then - echo -n "Building Makefile templates..." + echo -n "Building Makefile templates... " $AUTOMAKE ; (cd lib/reLyX ; $AUTOMAKE ) echo "done." else @@ -58,10 +58,9 @@ else fi if ( $AUTOCONF --version ) /dev/null 2>&1; then - echo -n "Building configure..." + echo -n "Building configure... " $AUTOCONF ; ( cd lib/reLyX ; $AUTOCONF ) echo "done." - echo 'run "./configure ; make"' else echo "autoconf not found -- aborting" exit @@ -69,7 +68,7 @@ fi # Autogenerate lib/configure.m4. if test x$GNUM4 != x ; then - echo -n "Building lib/configure ..." + echo -n "Building lib/configure ... " rm -f lib/configure $GNUM4 lib/configure.m4 > lib/configure chmod a+x lib/configure @@ -79,7 +78,7 @@ else exit fi -echo -n "Creating POTFILES.in..." +echo -n "Creating POTFILES.in... " cat < tmppot # # 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 mv tmppot po/POTFILES.in echo "done" + +echo +echo 'run "./configure ; make"' +echo diff --git a/src/LaTeX.C b/src/LaTeX.C index 82813fa1cb..daf97c825b 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -324,8 +324,8 @@ bool LaTeX::scanAux(DepTable & dep) string aux = ChangeExtension(file, ".aux", true); ifstream ifs(aux.c_str()); string token; - LRegex reg1("\\\\bibdata{([^}]+)}"); - LRegex reg2("\\\\bibstyle{([^}]+)}"); + LRegex reg1("\\\\bibdata\\{([^}]+)\\}"); + LRegex reg2("\\\\bibstyle\\{([^}]+)\\}"); while (getline(ifs, token)) { if (reg1.exact_match(token)) { LRegex::SubMatches sub = reg1.exec(token); @@ -379,8 +379,8 @@ bool LaTeX::runBibTeX(string const & f, DepTable & dep) ifstream ifs(f.c_str()); string token; bool using_bibtex = false; - LRegex reg1("\\\\bibdata{([^}]+)}"); - LRegex reg2("\\\\bibstyle{([^}]+)}"); + LRegex reg1("\\\\bibdata\\{([^}]+)\\}"); + LRegex reg2("\\\\bibstyle\\{([^}]+)\\}"); while (getline(ifs, token)) { if (reg1.exact_match(token)) { using_bibtex = true; diff --git a/src/support/filetools.C b/src/support/filetools.C index 1d3831c43e..340da1cfa7 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -1009,7 +1009,8 @@ string findtexfile(string const & fil, string const & format) return OnlyFilename(fil); // 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); lyxerr[Debug::LATEX] << "kpse status = " << c.first << "\n"