texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo update (Fri Jun 24 09:22:01 EDT 2005)


From: Karl Berry
Subject: texinfo update (Fri Jun 24 09:22:01 EDT 2005)
Date: Fri, 24 Jun 2005 09:22:17 -0400

Index: ChangeLog
===================================================================
RCS file: /cvsroot/texinfo/texinfo/ChangeLog,v
retrieving revision 1.511
retrieving revision 1.512
diff -c -r1.511 -r1.512
*** ChangeLog   20 Jun 2005 12:42:37 -0000      1.511
--- ChangeLog   24 Jun 2005 13:01:36 -0000      1.512
***************
*** 1,3 ****
--- 1,11 ----
+ 2005-06-24  Akim Demaille  <address@hidden>
+ 
+       * util/texi2dvi (tex, bibtex, texindex): Move their computation to...
+       (run_tex, run_bibtex, run_texindex): here, to clarify.
+       (move_to_dest): New.
+       (run_tex): Use it to copy the result back.
+       Don't bother exporting the log.
+ 
  2005-06-10  Karl Berry  <address@hidden>
  
        * doc/texinfo.tex (\., \!, \?): include \space after setting
Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.55
retrieving revision 1.56
diff -c -r1.55 -r1.56
*** util/texi2dvi       22 Jun 2005 13:08:39 -0000      1.55
--- util/texi2dvi       24 Jun 2005 13:01:37 -0000      1.56
***************
*** 1,6 ****
  #! /bin/sh
  # texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources.
! # $Id: texi2dvi,v 1.55 2005/06/22 13:08:39 karl 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 LaTeX) sources.
! # $Id: texi2dvi,v 1.56 2005/06/24 13:01:37 karl 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.55 $'
  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.56 $'
  rcs_version=`set - $rcs_revision; echo $2`
  program=`echo $0 | sed -e 's!.*/!!'`
  version="texi2dvi (GNU Texinfo 4.8) $rcs_version
***************
*** 317,322 ****
--- 317,345 ----
    echo "$_res"
  }
  
+ # move_to_dest FILE
+ # -----------------
+ # Move the FILE to the place where the user expects it.  FILE can be
+ # the principal output (in which case -o directly apply), or an auxiliary
+ # file with the same base name.
+ move_to_dest ()
+ {
+   _file_noext=`echo "$1" | sed 's/\.[^.]*$//'`
+   _file_ext=`echo "$1" | sed 's/^.*\.//'`
+   _out_noext=`echo "$oname" | sed 's/\.[^.]*$//'`
+   _out_ext=`echo "$oname" | sed 's/^.*\.//'`
+ 
+   case $tidy:$oname in
+     true:)  _dest=$orig_pwd;;
+     false:) _dest=;;
+     *:*)    _dest=$_out_noext.$_file_ext;;
+   esac
+   if test -n "$_dest"; then
+     verbose "Copying $1 to $_dest"
+     cp -p "$1" "$_dest"
+   fi
+ }
+ 
  
  ## ----------------------- ##
  ## Running the TeX suite.  ##
***************
*** 328,333 ****
--- 351,369 ----
  # and logs.
  run_tex ()
  {
+   case $language:$oformat in
+     latex:pdf)   tex=${PDFLATEX:-pdflatex};;
+     latex:dvi)   tex=${LATEX:-latex};;
+     texinfo:pdf) tex=$PDFTEX;;
+     texinfo:dvi)
+         # MetaPost also uses the TEX environment variable.  If the user
+         # has set TEX=latex for that reason, don't bomb out.
+         case $TEX in
+         *latex) tex=tex;; # don't bother trying to find etex
+              *) tex=$TEX
+         esac
+   esac
+ 
    # Note that this will be used via an eval: quote properly.
    cmd=$tex
  
***************
*** 349,369 ****
  
    verbose "Running $cmd ..."
    if eval "$cmd" >&5; then
!     # Update the actual output.
!     case $tidy:$oname in
!       true:)  dest=$orig_pwd;;
!       false:) dest=;;
!       *:*)    dest=$oname;;
!     esac
!     if test -n "$dest"; then
!       verbose "Copying $oformat file from `pwd` to $dest"
!       cp -p "./$filename_noext.$oformat" "$dest"
!     fi
    else
!     $tidy &&
!       cp "$filename_noext.log" "$orig_pwd"
!     fatal 1 "$tex exited with bad status, quitting." \
!             "see $filename_noext.log for errors."
    fi
  }
  
--- 385,393 ----
  
    verbose "Running $cmd ..."
    if eval "$cmd" >&5; then
!     move_to_dest "$filename_noext.$oformat"
    else
!     fatal 1 "$tex exited with bad status, quitting."
    fi
  }
  
***************
*** 389,394 ****
--- 413,423 ----
  # easier, though we take the risk to match false messages.
  run_bibtex ()
  {
+   case $language in
+     latex)   bibtex=${BIBTEX:-bibtex};;
+     texinfo) bibtex=;;
+   esac
+ 
    if test -n "$bibtex" \
       && test -r "$filename_noext.aux" \
       && test -r "$filename_noext.log" \
***************
*** 420,425 ****
--- 449,458 ----
  # that if the index files are out of date or nonexistent.
  run_index ()
  {
+   case $language in
+     latex)   texindex=${MAKEINDEX:-makeindex};;
+     texinfo) texindex=${TEXINDEX:-texindex};;
+   esac
    index_files=`get_index_files $orig_xref_files`
    if test -n "$texindex" && test -n "$index_files"; then
      verbose "Running $texindex $index_files ..."
***************
*** 767,773 ****
  
    # An auxiliary directory used for all the auxiliary tasks involved
    # in compiling this document.
!   t2ddir=`$clean && echo ${TMPDIR:-/tmp}/`$filename_noext.t2d
    # Remove it at exit if clean mode.
    $clean &&
      trap "cd / && rm -rf $t2ddir" 0 1 2 15
--- 800,806 ----
  
    # An auxiliary directory used for all the auxiliary tasks involved
    # in compiling this document.
!   t2ddir=$filename_noext.t2d
    # Remove it at exit if clean mode.
    $clean &&
      trap "cd / && rm -rf $t2ddir" 0 1 2 15
***************
*** 832,865 ****
        # Assume a LaTeX file.  LaTeX needs bibtex and uses latex for
        # compilation.  No makeinfo.
        language=latex
-       bibtex=${BIBTEX:-bibtex}
        makeinfo= # no point in running makeinfo on latex source.
-       texindex=${MAKEINDEX:-makeindex}
        textra_cmd=1i
-       if test $oformat = dvi; then
-         tex=${LATEX:-latex}
-       else
-         tex=${PDFLATEX:-pdflatex}
-       fi
        ;;
  
      *)
!       # Assume a Texinfo file.  Texinfo files need makeinfo, texindex and tex.
        language=texinfo
-       bibtex=
-       texindex=${TEXINDEX:-texindex}
        textra_cmd='/address@hidden/a'
-       if test $oformat = dvi; then
-         # MetaPost also uses the TEX environment variable.  If the user
-         # has set TEX=latex for that reason, don't bomb out.
-         if echo $TEX | grep 'latex$' >&6; then
-           tex=tex  # don't bother trying to find etex
-         else
-           tex=$TEX
-         fi
-       else
-         tex=$PDFTEX
-       fi
        # Unless required by the user, makeinfo expansion is wanted only
        # if texinfo.tex is too old.
        if test "$expand" = t; then
--- 865,878 ----
        # Assume a LaTeX file.  LaTeX needs bibtex and uses latex for
        # compilation.  No makeinfo.
        language=latex
        makeinfo= # no point in running makeinfo on latex source.
        textra_cmd=1i
        ;;
  
      *)
!       # Assume a Texinfo file.
        language=texinfo
        textra_cmd='/address@hidden/a'
        # Unless required by the user, makeinfo expansion is wanted only
        # if texinfo.tex is too old.
        if test "$expand" = t; then
P ChangeLog
P util/texi2dvi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]