Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
olena
Commits
01d0f09f
Commit
01d0f09f
authored
Jul 01, 2014
by
Roland Levillain
Browse files
Update texi2dvi from upstream.
* build-aux/texi2dvi: Update from Subversion Texinfo.
parent
6cd5348a
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
01d0f09f
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>
2012-06-07 Guillaume Lazzara <z@lrde.epita.fr>
Fix last warnings with Lintian.
Fix last warnings with Lintian.
...
...
build-aux/texi2dvi
View file @
01d0f09f
#! /bin/sh
#! /bin/sh
# texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
# 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,
# 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.
# Free Software Foundation, Inc.
#
#
# This program is free software; you can redistribute it and/or modify
# This program is free software; you can redistribute it and/or modify
...
@@ -34,7 +34,7 @@ unset RUNNING_KSH
...
@@ -34,7 +34,7 @@ unset RUNNING_KSH
set
-e
set
-e
# This string is expanded automatically when this file is checked out.
# 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
`
rcs_version
=
`
set
-
$rcs_revision
;
echo
$2
`
program
=
`
echo
$0
|
sed
-e
's!.*/!!'
`
program
=
`
echo
$0
|
sed
-e
's!.*/!!'
`
...
@@ -52,7 +52,7 @@ escape="\\"
...
@@ -52,7 +52,7 @@ escape="\\"
expand
=
false
# true for expansion via makeinfo
expand
=
false
# true for expansion via makeinfo
includes
=
includes
=
line_error
=
true
# pass --file-line-error to TeX
line_error
=
true
# pass --file-line-error to TeX
max_iters
=
-1
#
keep going forever
max_iters
=
7
#
when to quit
oname
=
# --output
oname
=
# --output
out_lang
=
dvi
out_lang
=
dvi
quiet
=
false
# let the tools' message be displayed
quiet
=
false
# let the tools' message be displayed
...
@@ -358,7 +358,7 @@ Build modes:
...
@@ -358,7 +358,7 @@ Build modes:
defaults to TEXI2DVI_BUILD_DIRECTORY [
$build_dir
]
defaults to TEXI2DVI_BUILD_DIRECTORY [
$build_dir
]
--mostly-clean remove the auxiliary files and directories
--mostly-clean remove the auxiliary files and directories
but not the output
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
The MODE specifies where the TeX compilation takes place, and, as a
consequence, how auxiliary files are treated. The build mode
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
...
@@ -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
using
\\
graphicspath): in that case, use -I to specify the additional
directories to consider.
directories to consider.
The values of the BIBTEX, DVIPDF, DVIPS, HEVEA, LATEX, MAKEINDEX,
The values of the
BIBER,
BIBTEX, DVIPDF, DVIPS, HEVEA, LATEX, MAKEINDEX,
MAKEINFO, PDFLATEX, PDFTEX, T4HT, TEX, TEX4HT, TEXINDEX, and THUMBPDF
MAKEINFO, PDFLATEX, PDFTEX, T4HT, TEX, TEX4HT, TEXINDEX, and THUMBPDF
_CMD
environment variables are used to run those commands, if they are set.
environment variables are used to run those commands, if they are set.
Regarding --dvipdf, if DVIPDF is not set in the environment, the
Regarding --dvipdf, if DVIPDF is not set in the environment, the
...
@@ -428,9 +428,9 @@ verbose ()
...
@@ -428,9 +428,9 @@ verbose ()
version
()
version
()
{
{
cat
<<
EOF
cat
<<
EOF
texi2dvi (GNU Texinfo
4.13+dev
)
$rcs_version
texi2dvi (GNU Texinfo
5.2
)
$rcs_version
Copyright (C) 201
2
Free Software Foundation, Inc.
Copyright (C) 201
4
Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
There is NO WARRANTY, to the extent permitted by law.
...
@@ -709,7 +709,7 @@ move_to_dest ()
...
@@ -709,7 +709,7 @@ move_to_dest ()
false
:
*
)
destfile
=
$oname
false
:
*
)
destfile
=
$oname
destdir
=
`
dirname
"
$destfile
"
`
;;
destdir
=
`
dirname
"
$destfile
"
`
;;
esac
esac
# We want to compare the source location and the output location,
# We want to compare the source location and the output location,
# and if they are different, do the move. But if they are the
# and if they are different, do the move. But if they are the
# same, we must preserve the source. Since we can't assume
# same, we must preserve the source. Since we can't assume
...
@@ -899,9 +899,13 @@ xref_files_changed ()
...
@@ -899,9 +899,13 @@ xref_files_changed ()
if
grep
"Rerun to get"
"
$in_noext
.log"
>
&6 2>&1
;
then
if
grep
"Rerun to get"
"
$in_noext
.log"
>
&6 2>&1
;
then
return
0
return
0
fi
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,
# If old and new lists don't have the same file list,
# then
one file or another
has definitely changed.
# then
something
has definitely changed.
xref_files_new
=
`
generated_files_get
"
$in_noext
"
xref_file_p
`
xref_files_new
=
`
generated_files_get
"
$in_noext
"
xref_file_p
`
verbose
"Original xref files =
$xref_files_orig
"
verbose
"Original xref files =
$xref_files_orig
"
verbose
"New xref files =
$xref_files_new
"
verbose
"New xref files =
$xref_files_new
"
...
@@ -1073,20 +1077,19 @@ run_tex ()
...
@@ -1073,20 +1077,19 @@ run_tex ()
# run_bibtex ()
# run_bibtex ()
# -------------
# -------------
# Run bibtex on current file.
# Run bibtex on
(or biber)
current file.
# - If its input (AUX) exists.
# - If its input (AUX) exists.
# - If some citations are missing (LOG contains `Citation').
# - If some citations are missing (LOG contains `Citation').
# or the LOG complains of a missing .bbl
# or the LOG complains of a missing .bbl
#
#
# Don't try to be too smart:
# Don't try to be too smart:
#
# 1. Running bibtex only if the bbl file exists and is older than
# 1. Running bibtex only if the bbl file exists and is older than
# the LaTeX file is wrong, since the document might include files
# the LaTeX file is wrong, since the document might include files
# that have changed.
# that have changed.
#
#
# 3. Because there can be several AUX (if there are \include's),
# 3. Because there can be several AUX (if there are \include's),
# but a single LOG, looking for missing citations in LOG is
# but a single LOG, looking for missing citations in LOG is
# easier, though we take the risk
t
o match false messages.
# easier, though we take the risk o
f
match
ing
false messages.
run_bibtex
()
run_bibtex
()
{
{
case
$in_lang
in
case
$in_lang
in
...
@@ -1100,18 +1103,24 @@ run_bibtex ()
...
@@ -1100,18 +1103,24 @@ run_bibtex ()
# bibtex would never be run.
# bibtex would never be run.
if
test
-r
"
$in_noext
.aux"
\
if
test
-r
"
$in_noext
.aux"
\
&&
test
-r
"
$in_noext
.log"
\
&&
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
'.*Undefined citation'
"
$in_noext
.log"
\
||
grep
'No file .*\.bbl\.'
"
$in_noext
.log"
)
\
||
grep
'No file .*\.bbl\.'
"
$in_noext
.log"
)
\
||
(
grep
'No \.aux file'
"
$in_noext
.log"
\
||
(
grep
'No \.aux file'
"
$in_noext
.log"
\
&&
grep
'^\\bibdata'
"
$in_noext
.aux"
))
\
&&
grep
'^\\bibdata'
"
$in_noext
.aux"
)
)
\
>
&6 2>&1
;
\
>
&6 2>&1
;
\
then
then
for
f
in
`
generated_files_get
"
$in_noext
"
bibaux_file_p
`
bibtex_aux
=
`
generated_files_get
"
$in_noext
"
bibaux_file_p
`
do
for
f
in
$bibtex_aux
;
do
run
$bibtex
"
$f
"
run
$bibtex
"
$f
"
done
done
fi
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 ()
# run_index ()
...
@@ -1191,7 +1200,7 @@ run_thumbpdf ()
...
@@ -1191,7 +1200,7 @@ run_thumbpdf ()
&&
test
-r
"
$in_noext
.log"
\
&&
test
-r
"
$in_noext
.log"
\
&&
grep
'thumbpdf\.sty'
"
$in_noext
.log"
>
&6 2>&1
;
\
&&
grep
'thumbpdf\.sty'
"
$in_noext
.log"
>
&6 2>&1
;
\
then
then
thumbpdf
=
${
THUMBPDF
:-
thumbpdf
}
thumbpdf
=
${
THUMBPDF
_CMD
:-
thumbpdf
}
thumbcmd
=
"
$thumbpdf
$in_dir
/
$in_noext
"
thumbcmd
=
"
$thumbpdf
$in_dir
/
$in_noext
"
verbose
"Running
$thumbcmd
..."
verbose
"Running
$thumbcmd
..."
if
$thumbcmd
>
&5
;
then
if
$thumbcmd
>
&5
;
then
...
@@ -1253,9 +1262,9 @@ run_tex_suite ()
...
@@ -1253,9 +1262,9 @@ run_tex_suite ()
xref_files_save
xref_files_save
# We run bibtex first, because
I can see reasons
for the indexes
# We run bibtex first, because
it's more likely
for the indexes
# to change after bibtex is run
, but I see no reason for
the
# to change after bibtex is run
than the reverse, though ei
the
r
#
convers
e.
#
would be rar
e.
run_bibtex
run_bibtex
run_index
run_index
run_core_conversion
run_core_conversion
...
@@ -1360,7 +1369,10 @@ run_makeinfo ()
...
@@ -1360,7 +1369,10 @@ run_makeinfo ()
# close stdin.
# close stdin.
$TEX
txiversion.tex </dev/null
>
txiversion.out 2>txiversion.err
$TEX
txiversion.tex </dev/null
>
txiversion.out 2>txiversion.err
)
;
then
:
;
else
)
;
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.out"
cat
"
$version_test_dir
/txiversion.err"
>
&2
cat
"
$version_test_dir
/txiversion.err"
>
&2
error 1
"quitting."
error 1
"quitting."
...
@@ -1685,7 +1697,6 @@ while test x"$1" != x"$arg_sep"; do
...
@@ -1685,7 +1697,6 @@ while test x"$1" != x"$arg_sep"; do
;;
;;
esac
esac
# This recognizes --quark as --quiet. Oh well.
case
"
$1
"
in
case
"
$1
"
in
-@
)
escape
=
@
;;
-@
)
escape
=
@
;;
-~
)
catcode_special
=
false
;;
-~
)
catcode_special
=
false
;;
...
@@ -1717,7 +1728,7 @@ while test x"$1" != x"$arg_sep"; do
...
@@ -1717,7 +1728,7 @@ while test x"$1" != x"$arg_sep"; do
-r
|
--recode
)
recode
=
true
;;
-r
|
--recode
)
recode
=
true
;;
--recode-from
)
shift
;
recode
=
true
;
recode_from
=
"
$1
"
;;
--recode-from
)
shift
;
recode
=
true
;
recode_from
=
"
$1
"
;;
--src-specials
)
src_specials
=
--src-specials
;;
--src-specials
)
src_specials
=
--src-specials
;;
--shell-escape
)
shell_escape
=
--shell-escape
;;
--shell-escape
)
shell_escape
=
--shell-escape
;;
--tex4ht
)
latex2html
=
tex4ht
;;
--tex4ht
)
latex2html
=
tex4ht
;;
-t
|
--texinfo
|
--command
)
shift
;
textra
=
"
$textra
\\
-t
|
--texinfo
|
--command
)
shift
;
textra
=
"
$textra
\\
"
`
echo
"
$1
"
|
sed
's/\\\\/\\\\\\\\/g'
`
;;
"
`
echo
"
$1
"
|
sed
's/\\\\/\\\\\\\\/g'
`
;;
...
@@ -1775,9 +1786,8 @@ this script, you'll need to install TeX (if you don't have it) or change
...
@@ -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
your PATH or TEX environment variable (if you do). See the --help
output for more details.
output for more details.
For information about obtaining TeX, please see http://www.tug.org. If
For information about obtaining TeX, please see http://tug.org/texlive,
you happen to be using Debian, you can get it with this command:
or do a web search for TeX and your operating system or distro.
apt-get install tetex-bin
EOM
EOM
exit
1
exit
1
fi
fi
...
@@ -1819,12 +1829,12 @@ fi
...
@@ -1819,12 +1829,12 @@ fi
# Enable tracing, and auxiliary tools output.
# Enable tracing, and auxiliary tools output.
#
#
# This fd should be used where you'd typically use /dev/null to throw
# This fd should be used where you'd typically use /dev/null to throw
# output away. But sometimes it is convenient to see that output (e.g.,
# output away. But sometimes it is convenient to see that output (e.g.,
# from a grep) to aid debugging. Especially debugging at distance, via
# from a grep) to aid debugging. Especially debugging at distance, via
# the user.
# the user.
#
#
if
$debug
;
then
if
$debug
;
then
exec
6>&1
exec
6>&1
set
-vx
set
-vx
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment