[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo update (Thu Dec 22 10:22:09 EST 2005)
From: |
Karl Berry |
Subject: |
texinfo update (Thu Dec 22 10:22:09 EST 2005) |
Date: |
Thu, 22 Dec 2005 10:22:12 -0500 |
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.549
retrieving revision 1.550
diff -c -r1.549 -r1.550
*** ChangeLog 20 Dec 2005 22:29:11 -0000 1.549
--- ChangeLog 22 Dec 2005 15:15:30 -0000 1.550
***************
*** 1,3 ****
--- 1,22 ----
+ 2005-12-22 Akim Demaille <address@hidden>
+
+ Implement --mostly-clean, improve the detection of aux files.
+ * util/texi2dvi ($action): New.
+ (--mostly-clean): New.
+ (cd_orig): New.
+ (generated_files_get, aux_file_p, index_file_p, xref_files_p):
+ New.
+ (get_index_files): Remove, replaced by the previous functions.
+ (get_xref_files): Rename as...
+ (xref_files_get): this.
+ (run_index): Use generated_files_get.
+ (clean): Rename as...
+ (mostly_clean): this.
+ Strengthen.
+ ($t2ddir): Try to have a `local' absolute file name, not a fully
+ absolute one to avoid very very long file names.
+ * util/texi2dvi.test: Exercise --mostly-clean.
+
2005-12-20 Karl Berry <address@hidden>
* doc/texinfo.txi (key): DELETE, not DEL, per rms.
Index: doc/texi2dvi.1
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texi2dvi.1,v
retrieving revision 1.44
retrieving revision 1.45
diff -c -r1.44 -r1.45
*** doc/texi2dvi.1 19 Dec 2005 16:58:52 -0000 1.44
--- doc/texi2dvi.1 22 Dec 2005 15:15:30 -0000 1.45
***************
*** 1,5 ****
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
! .TH TEXI2DVI "1" "December 2005" "texi2dvi 1.67" "User Commands"
.SH NAME
texi2dvi \- convert Texinfo documents to DVI
.SH SYNOPSIS
--- 1,5 ----
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
! .TH TEXI2DVI "1" "December 2005" "texi2dvi 1.68" "User Commands"
.SH NAME
texi2dvi \- convert Texinfo documents to DVI
.SH SYNOPSIS
***************
*** 89,94 ****
--- 89,98 ----
specify where the tidy compilation is performed.
implies \fB\-\-tidy\fR
defaults to TEXI2DVI_BUILD_DIRECTORY [/tmp/akim.t2d]
+ .TP
+ \fB\-\-mostly\-clean\fR
+ remove the auxiliary files and directories
+ but not the output
.PP
The MODE specifies where the TeX compilation takes place, and, as a
consequence, how auxiliary files are treated. The build mode
Index: doc/version.texi
===================================================================
RCS file: /sources/texinfo/texinfo/doc/version.texi,v
retrieving revision 1.33
retrieving revision 1.34
diff -c -r1.33 -r1.34
*** doc/version.texi 16 Nov 2005 17:46:33 -0000 1.33
--- doc/version.texi 22 Dec 2005 15:15:30 -0000 1.34
***************
*** 1,4 ****
! @set UPDATED 13 November 2005
! @set UPDATED-MONTH November 2005
@set EDITION 4.8
@set VERSION 4.8
--- 1,4 ----
! @set UPDATED 22 December 2005
! @set UPDATED-MONTH December 2005
@set EDITION 4.8
@set VERSION 4.8
Index: util/texi2dvi
===================================================================
RCS file: /sources/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.68
retrieving revision 1.69
diff -c -r1.68 -r1.69
*** util/texi2dvi 19 Dec 2005 16:58:52 -0000 1.68
--- util/texi2dvi 22 Dec 2005 15:15:30 -0000 1.69
***************
*** 1,6 ****
#! /bin/sh
# texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
! # $Id: texi2dvi,v 1.68 2005/12/19 16:58:52 akim Exp $
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
# 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
--- 1,6 ----
#! /bin/sh
# texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
! # $Id: texi2dvi,v 1.69 2005/12/22 15:15:30 akim Exp $
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
# 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
***************
*** 32,38 ****
unset RUNNING_KSH
# This string is expanded by rcs automatically when this file is checked out.
! rcs_revision='$Revision: 1.68 $'
rcs_version=`set - $rcs_revision; echo $2`
program=`echo $0 | sed -e 's!.*/!!'`
version="texi2dvi (GNU Texinfo 4.8) $rcs_version
--- 32,38 ----
unset RUNNING_KSH
# This string is expanded by rcs automatically when this file is checked out.
! rcs_revision='$Revision: 1.69 $'
rcs_version=`set - $rcs_revision; echo $2`
program=`echo $0 | sed -e 's!.*/!!'`
version="texi2dvi (GNU Texinfo 4.8) $rcs_version
***************
*** 91,96 ****
--- 91,98 ----
--build-dir=DIR specify where the tidy compilation is performed.
implies --tidy
defaults to TEXI2DVI_BUILD_DIRECTORY [$build_dir]
+ --mostly-clean remove the auxiliary files and directories
+ but not the output
The MODE specifies where the TeX compilation takes place, and, as a
consequence, how auxiliary files are treated. The build mode
***************
*** 135,148 ****
# Initialize variables for option overriding and otherwise.
# Don't use `unset' since old bourne shells don't have this command.
# Instead, assign them an empty value.
! line_error=true # Pass --file-line-error to TeX.
batch=false # true for batch mode
debug=false
escape="\\"
expand= # t for expansion via makeinfo
includes=
! out_lang=dvi
oname= # --output
quiet=false # by default let the tools' message be displayed
recode=false
set_language=
--- 137,151 ----
# Initialize variables for option overriding and otherwise.
# Don't use `unset' since old bourne shells don't have this command.
# Instead, assign them an empty value.
! action=compile
batch=false # true for batch mode
debug=false
escape="\\"
expand= # t for expansion via makeinfo
includes=
! line_error=true # Pass --file-line-error to TeX.
oname= # --output
+ out_lang=dvi
quiet=false # by default let the tools' message be displayed
recode=false
set_language=
***************
*** 188,193 ****
--- 191,210 ----
}
+ # cd_orig
+ # -------
+ # Return to the original directory.
+ cd_orig ()
+ {
+ # In case $orig_pwd is on a different drive (for DOS).
+ cd /
+
+ # Return to the original directory so that
+ # - the next file is processed in correct conditions
+ # - the temporary file can be removed
+ cd "$orig_pwd" || exit 1
+ }
+
# func_dirname FILE
# -----------------
# Return the directory part of FILE.
***************
*** 364,382 ****
done
- # get_index_files FILE1 FILE2...
- # ------------------------------
- # Select the files that are indexes to run texindex/makeindex onto.
- get_index_files ()
- {
- for file
- do
- case `sed '1q' $file` in
- "\\entry{"*|"\\indexentry{"*) echo "$file";;
- esac
- done
- }
-
# absolute_filenames TEX-PATH -> TEX-PATH
# ---------------------------------------
# Convert relative paths to absolute paths, so we can run in another
--- 381,386 ----
***************
*** 453,495 ****
## Managing xref files. ##
## --------------------- ##
! # xref_files_get FILENAME-NOEXT
! # -----------------------------
! # Compute the list of xref files (indexes, tables and lists).
! xref_files_get ()
{
! if $tidy; then
! # In a tidy build, all the files around as actual outputs.
! ls * 2>/dev/null
! else
! # Find all files having root filename with a two-letter extension,
! # saves the ones that are really Texinfo-related files.
! # - .?o?
! # .toc, .log, LaTeX tables and lists, FiXme's .lox, maybe more.
! # - bu[0-9]*.aux
! # Sub bibliography when using the LaTeX bibunits package.
! ls "$1".?o? "$1".aux bu[0-9]*.aux "$1".?? "$1".idx 2>/dev/null
! fi |
while read file; do
! # If the file is not suitable to be an index or xref file, don't
! # process it. It's suitable if the first character is a
! # backslash or right quote or at, as long as the first line isn't
! # \input texinfo.
! case `sed '1q' $file` in
! "\\input texinfo"*) ;;
! [\\''@]*) echo "./$file";;
esac
! done
}
# xref_files_save
# ---------------
# Save the xref files.
xref_files_save ()
{
# Save copies of auxiliary files for later comparison.
! xref_files_orig=`xref_files_get "$in_noext"`
if test -n "$xref_files_orig"; then
verbose "Backing up xref files: $xref_files_orig"
cp $xref_files_orig "$work_bak"
--- 457,552 ----
## Managing xref files. ##
## --------------------- ##
+ # aux_file_p FILE
+ # ---------------
+ # Return with success with FILE is an aux file.
+ aux_file_p ()
+ {
+ case $1 in
+ *.aux) return 0;;
+ *) return 1;;
+ esac
+ }
! # index_file_p FILE
! # -----------------
! # Return with success with FILE is an index file.
! index_file_p ()
{
! case `sed '1q' $1` in
! "\\entry{"*|"\\indexentry{"*) return 0;;
! *) return 1;;
! esac
! }
!
! # xref_file_p FILE
! # ----------------
! # Return with success if FILE is an xref file (indexes, tables and lists).
! xref_file_p ()
! {
! # If the file is not suitable to be an index or xref file, don't
! # process it. It's suitable if the first character is a
! # backslash or right quote or at, as long as the first line isn't
! # \input texinfo.
! case `sed '1q' $1` in
! "\\input texinfo"*) return 1;;
! [\\''@]*) return 0;;
! *) return 1;;
! esac
! }
!
!
! # generated_files_get FILENAME-NOEXT [PREDICATE-FILTER]
! # -----------------------------------------------------
! # Return the list of files generated by the TeX compilation of FILENAME-NOEXT.
! generated_files_get ()
! {
! local filter=true
! if test -n "$2"; then
! filter=$2
! fi
!
! # Gather the files created by TeX.
! (
! if test -f "$1.log"; then
! sed -n -e "s,^\\\\openout.* = \`\\(.*\\)'\\.,\\1,p" "$1.log"
! fi
! echo "$1.log"
! ) |
! # Depending on these files, infer outputs from other tools.
while read file; do
! echo $file
! case $language in
! (texinfo)
! # texindex: texinfo.cp -> texinfo.cps
! index_file_p $file && echo ${file}s
! ;;
! (latex)
! # bibtex: *.aux -> *.bbl and *.blg.
! if aux_file_p $file; then
! echo $file | sed 's/^\(.*\)\.aux$/\1.bbl/'
! echo $file | sed 's/^\(.*\)\.aux$/\1.blg/'
! fi
! ;;
esac
! done |
! # Filter existing files matching the criterion.
! while read file; do
! if test -f $file && $filter $file; then
! echo $file
! fi
! done |
! sort
}
+
# xref_files_save
# ---------------
# Save the xref files.
xref_files_save ()
{
# Save copies of auxiliary files for later comparison.
! xref_files_orig=`generated_files_get "$in_noext" xref_file_p`
if test -n "$xref_files_orig"; then
verbose "Backing up xref files: $xref_files_orig"
cp $xref_files_orig "$work_bak"
***************
*** 512,518 ****
# If old and new lists don't at least have the same file list,
# then one file or another has definitely changed.
! xref_files_new=`xref_files_get "$in_noext"`
verbose "Original xref files = $xref_files_orig"
verbose "New xref files = $xref_files_new"
test "x$xref_files_orig" != "x$xref_files_new" &&
--- 569,575 ----
# If old and new lists don't at least have the same file list,
# then one file or another 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"
test "x$xref_files_orig" != "x$xref_files_new" &&
***************
*** 533,538 ****
--- 590,597 ----
return 1
}
+
+
## ----------------------- ##
## Running the TeX suite. ##
## ----------------------- ##
***************
*** 655,663 ****
|| grep 'No file .*\.bbl\.' "$in_noext.log") \
>&6 2>&1; \
then
! # If using the bibunits package, we might have to run bibtex
! # on subfiles.
! for f in "$in_noext".aux bu[0-9]*.aux
do
if test -s "$f" && \
(grep '^\\bibstyle[{]' "$f" \
--- 714,721 ----
|| grep 'No file .*\.bbl\.' "$in_noext.log") \
>&6 2>&1; \
then
! generated_files_get "$in_noext" |
! while
! trap "mostly_clean" 0 1 2 15
ensure_dir "$build_dir" "$t2ddir"
***************
*** 1334,1344 ****
# Make those directories.
ensure_dir "$work_build" "$work_bak"
! # Compile the document.
! compile
! # Remove temporary files.
! $clean && clean
done
verbose "done."
--- 1377,1394 ----
# Make those directories.
ensure_dir "$work_build" "$work_bak"
! case $action in
! compile)
! # Compile the document.
! compile
! # Remove temporary files.
! $clean && mostly_clean
! ;;
! mostly-clean)
! mostly_clean
! ;;
! esac
done
verbose "done."
Index: util/texi2dvi.test
===================================================================
RCS file: /sources/texinfo/texinfo/util/texi2dvi.test,v
retrieving revision 1.5
retrieving revision 1.6
diff -c -r1.5 -r1.6
*** util/texi2dvi.test 11 Nov 2005 00:02:31 -0000 1.5
--- util/texi2dvi.test 22 Dec 2005 15:15:30 -0000 1.6
***************
*** 45,51 ****
TEXI2DVI_pass --build=tidy --batch input.texi -o output.dvi
# There should only be the DVI and the TEXI file.
test "`list_files`" = "input.texi output.dvi output.t2d"
! rm -r output.t2d output.dvi
cp input.texi input2.texi
--- 45,53 ----
TEXI2DVI_pass --build=tidy --batch input.texi -o output.dvi
# There should only be the DVI and the TEXI file.
test "`list_files`" = "input.texi output.dvi output.t2d"
! TEXI2DVI_pass --build=tidy --batch input.texi -o output.dvi --mostly-clean
! test "`list_files`" = "input.texi output.dvi"
! rm output.dvi
cp input.texi input2.texi
P ChangeLog
P doc/texi2dvi.1
P doc/version.texi
P util/texi2dvi
P util/texi2dvi.test
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo update (Thu Dec 22 10:22:09 EST 2005),
Karl Berry <=