[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * util/texi2dvi (move_to_dest): Only take a singl
From: |
Gavin D. Smith |
Subject: |
branch master updated: * util/texi2dvi (move_to_dest): Only take a single argument, as it is only called with multiple arguments when outputing to Info with hevea, which is an extremely niche use case. In fact, running with hevea (--html or --info on a LaTeX source) appears to be broken. (Loop introduced on 2006-06-27.) (run_hevea): Put the loop here. Code not tested. |
Date: |
Fri, 10 Nov 2023 13:27:30 -0500 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 3541ad27eb * util/texi2dvi (move_to_dest): Only take a single
argument, as it is only called with multiple arguments when outputing to Info
with hevea, which is an extremely niche use case. In fact, running with hevea
(--html or --info on a LaTeX source) appears to be broken. (Loop introduced on
2006-06-27.) (run_hevea): Put the loop here. Code not tested.
3541ad27eb is described below
commit 3541ad27eb2d32205aee053c7410d28d18b17b28
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Fri Nov 10 18:27:10 2023 +0000
* util/texi2dvi (move_to_dest): Only take a single argument,
as it is only called with multiple arguments when outputing
to Info with hevea, which is an extremely niche use case. In
fact, running with hevea (--html or --info on a LaTeX source)
appears to be broken. (Loop introduced on 2006-06-27.)
(run_hevea): Put the loop here. Code not tested.
---
ChangeLog | 9 ++++++++
util/texi2dvi | 69 +++++++++++++++++++++++++++++------------------------------
2 files changed, 43 insertions(+), 35 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 84696140fd..d4d1b81b1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-11-10 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * util/texi2dvi (move_to_dest): Only take a single argument,
+ as it is only called with multiple arguments when outputing
+ to Info with hevea, which is an extremely niche use case. In
+ fact, running with hevea (--html or --info on a LaTeX source)
+ appears to be broken. (Loop introduced on 2006-06-27.)
+ (run_hevea): Put the loop here. Code not tested.
+
2023-11-10 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/convert_html.c (html_set_pages_files): strdup
diff --git a/util/texi2dvi b/util/texi2dvi
index e33d8eea44..2b3dfcf714 100755
--- a/util/texi2dvi
+++ b/util/texi2dvi
@@ -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.)
@@ -566,40 +566,37 @@ move_to_dest ()
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:) mtd_destdir=$orig_pwd
+ mtd_destfile=$mtd_destdir/$1;;
+ true:*) mtd_destfile=`output_base_name "$1"`
+ mtd_destdir=`dirname "$mtd_destfile"`;;
+ false:*) mtd_destfile=$oname
+ mtd_destdir=`dirname "$mtd_destfile"`;;
+ 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"
- fi
- done
+ # 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 "$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 $mtd_destfile"
+ rm -f "$mtd_destfile"
+ mv "$file" "$mtd_destfile"
+ fi
}
@@ -1319,7 +1316,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."
- branch master updated: * util/texi2dvi (move_to_dest): Only take a single argument, as it is only called with multiple arguments when outputing to Info with hevea, which is an extremely niche use case. In fact, running with hevea (--html or --info on a LaTeX source) appears to be broken. (Loop introduced on 2006-06-27.) (run_hevea): Put the loop here. Code not tested.,
Gavin D. Smith <=