texinfo-commits
[Top][All Lists]
Advanced

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

[6629] avoid one extra generation of sorted index files


From: Gavin D. Smith
Subject: [6629] avoid one extra generation of sorted index files
Date: Thu, 17 Sep 2015 10:03:27 +0000

Revision: 6629
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6629
Author:   gavin
Date:     2015-09-17 10:03:26 +0000 (Thu, 17 Sep 2015)
Log Message:
-----------
avoid one extra generation of sorted index files

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/util/texi2dvi

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-09-17 09:47:38 UTC (rev 6628)
+++ trunk/ChangeLog     2015-09-17 10:03:26 UTC (rev 6629)
@@ -1,5 +1,15 @@
-2015-09-15  Gavin Smith  <address@hidden>
+2015-09-16  Gavin Smith  <address@hidden>
 
+       * util/texi2dvi (run_tex_suite): Call xref_files_changed right 
+       after run_core_conversion to avoid one extra generation of the 
+       sorted index files which isn't necessary.  Reported by
+       Vincent Belaiche.
+       (run_core_conversion): Backup and restore a sorted *.fls index 
+       file to avoid it being overwritten by run_core_conversion, and 
+       so it can be checked by xref_files_changed.
+
+2015-09-16  Gavin Smith  <address@hidden>
+
        * doc/texinfo.tex (\entry): Store index entry in a \vtop to 
        allow something else to be added first.
        (\entryorphanpenalty): Used by \entry, nothing by default.
@@ -12,11 +22,11 @@
        (\chapmacro): Don't cancel \topskip: this change was of dubious merit.
        (\initialglyphs): Print tilde in chapter size.
 
-2015-09-15  Gavin Smith  <address@hidden>
+2015-09-16  Gavin Smith  <address@hidden>
 
        * NEWS: Mention INFO_SPECIAL_CHARS_QUOTE.
 
-2015-09-15  Gavin Smith  <address@hidden>
+2015-09-16  Gavin Smith  <address@hidden>
 
        * doc/texinfo.texi
        (Customization Variables for @-Commands): Add @validatemenus.

Modified: trunk/util/texi2dvi
===================================================================
--- trunk/util/texi2dvi 2015-09-17 09:47:38 UTC (rev 6628)
+++ trunk/util/texi2dvi 2015-09-17 10:03:26 UTC (rev 6629)
@@ -1145,17 +1145,13 @@
     xref_files_save
 
     run_core_conversion
+    xref_files_changed || break
 
-    # We ran the conversion before making the sorted index files
-    # because otherwise a sorted *.fls file (for an index `fl') could
-    # be overwritten by a *.fls file produced with --recorder.
-    #   We run bibtex first, because it's more likely for the indexes
+    # We run bibtex first, because it's more likely for the indexes
     # to change after bibtex is run than the reverse, though either
     # would be rare.
     run_bibtex
     run_index
-
-    xref_files_changed || break
   done
 
   # If we were using thumbpdf and producing PDF, then run thumbpdf
@@ -1369,6 +1365,9 @@
 # run_core_conversion - Run TeX (or HeVeA).
 run_core_conversion ()
 {
+  # Backup a sorted index file
+  test -f "$in_noext.fls" && cp "$in_noext.fls" "$in_noext.f0s"
+
   case $in_lang:$latex2html:`out_lang_tex` in
     *:dvi|*:pdf|latex:tex4ht:html)
         run_tex;;
@@ -1377,7 +1376,17 @@
     *)
         error 1 "invalid input/output combination: $in_lang/$out_lang";;
   esac
+  # Use a different extension for a recorder file
   test -f "$in_noext.fls" && mv "$in_noext.fls" "$in_noext.flz"
+
+  # Restore a sorted index file
+  test -f "$in_noext.f0s" && mv "$in_noext.f0s" "$in_noext.fls"
+
+  # Stop this last command leading to an exit because of "set -e".  Even though
+  # failures in non-final components of command lists don't cause set -e
+  # to fail (failure for "test -f"), it would lead the exit status of the call
+  # to run_core_conversion to be non-zero, which *would* lead to an exit.
+  true
 }
 
 




reply via email to

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