Commit 01d0f09f authored by Roland Levillain's avatar Roland Levillain

Update texi2dvi from upstream.

	* build-aux/texi2dvi: Update from Subversion Texinfo.
parent 6cd5348a
2014-07-01 Roland Levillain <roland@lrde.epita.fr>
Update texi2dvi from upstream.
* build-aux/texi2dvi: Update from Subversion Texinfo.
2012-06-07 Guillaume Lazzara <z@lrde.epita.fr>
Fix last warnings with Lintian.
......
#! /bin/sh
# texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
# $Id: texi2dvi,v 1.173 2012/04/20 18:52:48 karl Exp $
# $Id: texi2dvi 5649 2014-06-08 22:02:26Z karl $
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
......@@ -34,7 +34,7 @@ unset RUNNING_KSH
set -e
# This string is expanded automatically when this file is checked out.
rcs_revision='$Revision: 1.173 $'
rcs_revision='$Revision: 5649 $'
rcs_version=`set - $rcs_revision; echo $2`
program=`echo $0 | sed -e 's!.*/!!'`
......@@ -52,7 +52,7 @@ escape="\\"
expand=false # true for expansion via makeinfo
includes=
line_error=true # pass --file-line-error to TeX
max_iters=-1 # keep going forever
max_iters=7 # when to quit
oname= # --output
out_lang=dvi
quiet=false # let the tools' message be displayed
......@@ -358,7 +358,7 @@ Build modes:
defaults to TEXI2DVI_BUILD_DIRECTORY [$build_dir]
--mostly-clean remove the auxiliary files and directories
but not the output
--max-iterations=N don't process files more than N times
--max-iterations=N don't process files more than N times [$max_iters]
The MODE specifies where the TeX compilation takes place, and, as a
consequence, how auxiliary files are treated. The build mode
......@@ -391,8 +391,8 @@ directory, occasionally TeX won't be able to find some files (e.g., when
using \\graphicspath): in that case, use -I to specify the additional
directories to consider.
The values of the BIBTEX, DVIPDF, DVIPS, HEVEA, LATEX, MAKEINDEX,
MAKEINFO, PDFLATEX, PDFTEX, T4HT, TEX, TEX4HT, TEXINDEX, and THUMBPDF
The values of the BIBER, BIBTEX, DVIPDF, DVIPS, HEVEA, LATEX, MAKEINDEX,
MAKEINFO, PDFLATEX, PDFTEX, T4HT, TEX, TEX4HT, TEXINDEX, and THUMBPDF_CMD
environment variables are used to run those commands, if they are set.
Regarding --dvipdf, if DVIPDF is not set in the environment, the
......@@ -428,9 +428,9 @@ verbose ()
version ()
{
cat <<EOF
texi2dvi (GNU Texinfo 4.13+dev) $rcs_version
texi2dvi (GNU Texinfo 5.2) $rcs_version
Copyright (C) 2012 Free Software Foundation, Inc.
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
......@@ -899,9 +899,13 @@ xref_files_changed ()
if grep "Rerun to get" "$in_noext.log" >&6 2>&1; then
return 0
fi
# biblatex report of whether rerunning is needed.
if grep "biblatex.*(re)run" "$in_noext.log" >&6 2>&1; then
return 0
fi
# If old and new lists don't at least have the same file list,
# then one file or another has definitely changed.
# If old and new lists don't have the same file list,
# then something has definitely changed.
xref_files_new=`generated_files_get "$in_noext" xref_file_p`
verbose "Original xref files = $xref_files_orig"
verbose "New xref files = $xref_files_new"
......@@ -1073,20 +1077,19 @@ run_tex ()
# run_bibtex ()
# -------------
# Run bibtex on current file.
# Run bibtex on (or biber) current file.
# - If its input (AUX) exists.
# - If some citations are missing (LOG contains `Citation').
# or the LOG complains of a missing .bbl
#
# Don't try to be too smart:
#
# 1. Running bibtex only if the bbl file exists and is older than
# the LaTeX file is wrong, since the document might include files
# that have changed.
#
# 3. Because there can be several AUX (if there are \include's),
# but a single LOG, looking for missing citations in LOG is
# easier, though we take the risk to match false messages.
# easier, though we take the risk of matching false messages.
run_bibtex ()
{
case $in_lang in
......@@ -1100,18 +1103,24 @@ run_bibtex ()
# bibtex would never be run.
if test -r "$in_noext.aux" \
&& test -r "$in_noext.log" \
&& ((grep 'Warning:.*Citation.*undefined' "$in_noext.log" \
&& ( (grep 'Warning:.*Citation.*undefined' "$in_noext.log" \
|| grep '.*Undefined citation' "$in_noext.log" \
|| grep 'No file .*\.bbl\.' "$in_noext.log") \
|| (grep 'No \.aux file' "$in_noext.log" \
&& grep '^\\bibdata' "$in_noext.aux")) \
&& grep '^\\bibdata' "$in_noext.aux") ) \
>&6 2>&1; \
then
for f in `generated_files_get "$in_noext" bibaux_file_p`
do
bibtex_aux=`generated_files_get "$in_noext" bibaux_file_p`
for f in $bibtex_aux; do
run $bibtex "$f"
done
fi
# biber(+biblatex) check.
if test -r "$in_noext.bcf" \
&& grep '</bcf:controlfile>' "$in_noext.bcf" >/dev/null; then
run ${BIBER:-biber} "$in_noext"
fi
}
# run_index ()
......@@ -1191,7 +1200,7 @@ run_thumbpdf ()
&& test -r "$in_noext.log" \
&& grep 'thumbpdf\.sty' "$in_noext.log" >&6 2>&1; \
then
thumbpdf=${THUMBPDF:-thumbpdf}
thumbpdf=${THUMBPDF_CMD:-thumbpdf}
thumbcmd="$thumbpdf $in_dir/$in_noext"
verbose "Running $thumbcmd ..."
if $thumbcmd >&5; then
......@@ -1253,9 +1262,9 @@ run_tex_suite ()
xref_files_save
# We run bibtex first, because I can see reasons for the indexes
# to change after bibtex is run, but I see no reason for the
# converse.
# 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
run_core_conversion
......@@ -1360,7 +1369,10 @@ run_makeinfo ()
# close stdin.
$TEX txiversion.tex </dev/null >txiversion.out 2>txiversion.err
); then :; else
report "texinfo.tex appears to be broken:"
report "texinfo.tex appears to be broken.
This may be due to the environment variable TEX set to something
other than (plain) tex, a corrupt texinfo.tex file, or
to tex itself simply not working."
cat "$version_test_dir/txiversion.out"
cat "$version_test_dir/txiversion.err" >&2
error 1 "quitting."
......@@ -1685,7 +1697,6 @@ while test x"$1" != x"$arg_sep"; do
;;
esac
# This recognizes --quark as --quiet. Oh well.
case "$1" in
-@ ) escape=@;;
-~ ) catcode_special=false;;
......@@ -1775,9 +1786,8 @@ this script, you'll need to install TeX (if you don't have it) or change
your PATH or TEX environment variable (if you do). See the --help
output for more details.
For information about obtaining TeX, please see http://www.tug.org. If
you happen to be using Debian, you can get it with this command:
apt-get install tetex-bin
For information about obtaining TeX, please see http://tug.org/texlive,
or do a web search for TeX and your operating system or distro.
EOM
exit 1
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment