bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: texi2dvi: fix bibtex's usage


From: Akim Demaille
Subject: FYI: texi2dvi: fix bibtex's usage
Date: Tue, 30 May 2006 17:02:59 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * util/texi2dvi (aux_file_p): Rename the second occurrence as...
        (bibaux_file_p): this.
        (run_bibtex): Use it.
        (options processing, $usage): Support --dvi for symmetry and to
        ease systematic tests.
        * util/bibtex.test: New.

Index: util/Makefile.am
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/Makefile.am,v
retrieving revision 1.20
diff -u -u -r1.20 Makefile.am
--- util/Makefile.am 30 May 2006 14:44:04 -0000 1.20
+++ util/Makefile.am 30 May 2006 15:02:30 -0000
@@ -56,7 +56,10 @@
 XFAIL_TESTS =
 
 TESTS =        \
-latex2html.test local.test texi2dvi.test
+bibtex.test \
+latex2html.test \
+local.test \
+texi2dvi.test
 
 EXTRA_DIST += $(TESTS)
 
Index: util/defs.in
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/defs.in,v
retrieving revision 1.3
diff -u -u -r1.3 defs.in
--- util/defs.in 30 May 2006 14:44:04 -0000 1.3
+++ util/defs.in 30 May 2006 15:02:30 -0000
@@ -122,7 +122,7 @@
 cd ./testSubDir
 
 
-
+# Unset the user's envvars that might change the behavior.
 unset TEXI2DVI_BUILD_MODE
 unset TEXI2DVI_BUILD_DIRECTORY
 
Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.80
diff -u -u -r1.80 texi2dvi
--- util/texi2dvi 30 May 2006 14:44:04 -0000 1.80
+++ util/texi2dvi 30 May 2006 15:02:30 -0000
@@ -79,6 +79,7 @@
 
 TeX tuning:
   -@                         use @input instead of \input for preloaded Texinfo
+      --dvi                  output a DVI file [default]
   -e, -E, --expand           force macro expansion using makeinfo
   -I DIR                     search DIR for Texinfo files
   -l, --language=LANG        specify the LANG of FILE (LaTeX or Texinfo)
@@ -499,7 +500,7 @@
 # ------------------
 # Return with success with FILE is an aux file containing citation
 # requests.
-aux_file_p ()
+bibaux_file_p ()
 {
   test -s "$1" || return 1
   if (grep '^\\bibstyle[{]' "$1"   \
@@ -775,21 +776,11 @@
           || grep 'No file .*\.bbl\.' "$in_noext.log") \
         >&6 2>&1; \
   then
-    generated_files_get "$in_noext" |
-    while read f
+    for f in $(generated_files_get "$in_noext" bibaux_file_p)
     do
-      if test -s "$f" && \
-         (grep '^\\bibstyle[{]' "$f"   \
-          && grep '^\\bibdata[{]' "$f" \
-         ## The following line is suspicious: fails when there
-          ## are citations in sub aux files.  We need to be
-          ## smarter in this case.
-          ## && grep '^\\citation[{]' "$f"
-         ) >&6 2>&1; then
-        verbose "Running $bibtex $f ..."
-        $bibtex "$f" >&5 ||
-          fatal 1 "$bibtex exited with bad status, quitting."
-      fi
+      verbose "Running $bibtex $f ..."
+      $bibtex "$f" >&5 ||
+        fatal 1 "$bibtex exited with bad status, quitting."
     done
   fi
 }
@@ -1235,6 +1226,7 @@
          --build-dir)  shift; build_dir=$1; build_mode=tidy;;
     -c | --clean) build_mode=clean;;
     -D | --debug) debug=true;;
+         --dvi)   out_lang=dvi;;
     -e | -E | --expand) expand=t;;
     -h | --help) echo "$usage"; exit 0;;
          --html) out_lang=html;;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]