summaryrefslogtreecommitdiff
path: root/macros/texinfo
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-11-13 03:03:52 +0000
committerNorbert Preining <norbert@preining.info>2023-11-13 03:03:52 +0000
commit88ed039ed13674ce7440cc57dba288cf166796fe (patch)
tree3d8b3ed97023363bc641badd220d3768fa6fb4d4 /macros/texinfo
parent5ee22d8ea7f225ba59142a53f0387a2bccc22dde (diff)
CTAN sync 202311130303
Diffstat (limited to 'macros/texinfo')
-rw-r--r--macros/texinfo/latest/texi2dvi74
1 files changed, 37 insertions, 37 deletions
diff --git a/macros/texinfo/latest/texi2dvi b/macros/texinfo/latest/texi2dvi
index e65b4cfec7..b9757b9ddd 100644
--- a/macros/texinfo/latest/texi2dvi
+++ b/macros/texinfo/latest/texi2dvi
@@ -197,7 +197,7 @@ EOF
version ()
{
cat <<EOF
-texi2dvi (GNU Texinfo 7.1)
+texi2dvi (GNU Texinfo 7.1dev)
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
@@ -549,7 +549,7 @@ destdir ()
}
-# move_to_dest FILE... - Move FILE(s) to the place where the user expects.
+# move_to_dest FILE - Move FILE to the place where the user expects.
# Truly move it, that is, it must not remain in its build location
# unless that is also the output location. (Otherwise it might appear
# as an extra file in make distcheck.)
@@ -558,48 +558,46 @@ destdir ()
# or an auxiliary file with the same base name.
move_to_dest ()
{
-# echo "move_to_dest $*, tidy=$tidy, oname=$oname"
-
# If we built in place and have no output name, there is nothing to
# do, so just return.
case $tidy:$oname in
false:) return;;
esac
- for file
- do
- test -f "$file" \
- || error 1 "no such file or directory: $file"
- case $tidy:$oname in
- true:) mtd_destdir=$orig_pwd
- mtd_destfile=$mtd_destdir/$file;;
- true:*) mtd_destfile=`output_base_name "$file"`
- mtd_destdir=`dirname "$mtd_destfile"`;;
- false:*) mtd_destfile=$oname
- mtd_destdir=`dirname "$mtd_destfile"`;;
- esac
+ test -f "$1" || error 1 "no such file or directory: $1"
+ case $tidy:$oname in
+ true:) dest=$orig_pwd/$1 ;;
+ true:*) dest=`output_base_name "$1"` ;;
+ false:*) dest=$oname ;;
+ esac
- # We want to compare the source location and the output location,
- # and if they are different, do the move. But if they are the
- # same, we must preserve the source. Since we can't assume
- # stat(1) or test -ef is available, resort to comparing the
- # directory names, canonicalized with pwd. We can't use cmp -s
- # since the output file might not actually change from run to run;
- # e.g., TeX DVI output is timestamped to only the nearest minute.
- mtd_destdir=`cd "$mtd_destdir" && pwd`
- mtd_destbase=`basename "$mtd_destfile"`
-
- mtd_sourcedir=`dirname "$file"`
- mtd_sourcedir=`cd "$mtd_sourcedir" && pwd`
- mtd_sourcebase=`basename "$file"`
-
- if test "$mtd_sourcedir/$mtd_sourcebase" != "$mtd_destdir/$mtd_destbase"
- then
- verbose "Moving $file to $mtd_destfile"
- rm -f "$mtd_destfile"
- mv "$file" "$mtd_destfile"
+ # We want to compare the source location and the output location,
+ # and if they are different, do the move. But if they are the
+ # same, we must preserve the source. Since we can't assume
+ # stat(1) or test -ef is available, resort to comparing the
+ # directory names, canonicalized with pwd. We can't use cmp -s
+ # since the output file might not actually change from run to run;
+ # e.g., TeX DVI output is timestamped to only the nearest minute.
+ mtd_destdir=`dirname "$dest"`
+ mtd_destdir=`cd "$mtd_destdir" && pwd`
+ mtd_destbase=`basename "$dest"`
+
+ mtd_sourcedir=`dirname "$1"`
+ mtd_sourcedir=`cd "$mtd_sourcedir" && pwd`
+ mtd_sourcebase=`basename "$1"`
+
+ if test "$mtd_sourcedir/$mtd_sourcebase" != "$mtd_destdir/$mtd_destbase"
+ then
+ verbose "Moving $1 to $dest"
+ rm -f "$dest"
+ if mv "$1" "$dest" ; then
+ # For --output, report that the file was moved, as TeX has just
+ # reported that it wrote output at the original location.
+ test z"$oname" != z && echo "Moved $1 to $dest"
+ else
+ error 1 "Could not move $1 to $dest"
fi
- done
+ fi
}
@@ -1319,7 +1317,9 @@ run_hevea ()
case $1 in
html|text) move_to_dest "$out_base";;
info) # There can be foo.info-1, foo.info-2 etc.
- move_to_dest "$out_base"*;;
+ for file in "$out_base"* ; do
+ move_to_dest "$file"
+ done ;;
esac
else
error 1 "$run_hevea_name exited with bad status, quitting."