texinfo-commits
[Top][All Lists]
Advanced

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

texinfo update (Tue Feb 22 09:52:01 EST 2005)


From: Karl Berry
Subject: texinfo update (Tue Feb 22 09:52:01 EST 2005)
Date: Tue, 22 Feb 2005 09:52:11 -0500

Index: ChangeLog
===================================================================
RCS file: /cvsroot/texinfo/texinfo/ChangeLog,v
retrieving revision 1.468
retrieving revision 1.469
diff -c -r1.468 -r1.469
*** ChangeLog   20 Feb 2005 00:00:43 -0000      1.468
--- ChangeLog   22 Feb 2005 14:42:12 -0000      1.469
***************
*** 1,3 ****
--- 1,12 ----
+ 2005-02-22  Akim Demaille  <address@hidden>
+ 
+       * util/texi2dvi (absolute_filenames): Skip nonexistent directories.
+       Factor its invocations for TeX envvars.
+       (fd6): Document and use more extensively.
+       (get_xref_files): Accept bu[0-9]#.aux files from the bibunits
+       package.
+       Also adjust the bibtex invocation.
+ 
  2005-02-19  Karl Berry  <address@hidden>
  
        The main user-visible change of all this is to make
Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.44
retrieving revision 1.45
diff -c -r1.44 -r1.45
*** util/texi2dvi       19 Feb 2005 14:39:18 -0000      1.44
--- util/texi2dvi       22 Feb 2005 14:42:13 -0000      1.45
***************
*** 1,6 ****
  #! /bin/sh
  # texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources.
! # $Id: texi2dvi,v 1.44 2005/02/19 14:39:18 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.45 2005/02/22 14:42:13 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.44 $'
  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.45 $'
  rcs_version=`set - $rcs_revision; echo $2`
  program=`echo $0 | sed -e 's!.*/!!'`
  version="texi2dvi (GNU Texinfo 4.8) $rcs_version
***************
*** 141,147 ****
      # for that.
      elif test -x "$dir/$1.exe"; then
        foundprog=true
!       break      
      fi
    done
    IFS=$saveIFS
--- 141,147 ----
      # for that.
      elif test -x "$dir/$1.exe"; then
        foundprog=true
!       break
      fi
    done
    IFS=$saveIFS
***************
*** 348,363 ****
  s/address@hidden texi2dvi//
  EOF
  
! # Compute the list of xref files.
  # Takes the filename (without extension) of which we look for xref
  # files as argument.  The index files must be reported last.
  get_xref_files ()
  {
-   # Get list of xref files (indexes, tables and lists).
    # Find all files having root filename with a two-letter extension,
!   # saves the ones that are really Texinfo-related files.  .?o? catches
!   # many files: .toc, .log, LaTeX tables and lists, FiXme's .lox, maybe more.
!   for this_file in "$1".?o? "$1".aux "$1".?? "$1".idx; do
      # If file is empty, skip it.
      test -s "$this_file" || continue
      # If the file is not suitable to be an index or xref file, don't
--- 348,370 ----
  s/address@hidden texi2dvi//
  EOF
  
! 
! # get_xref_files FILENAME-NOEXT
! # -----------------------------
! # Get list of xref files (indexes, tables and lists).
  # Takes the filename (without extension) of which we look for xref
  # files as argument.  The index files must be reported last.
  get_xref_files ()
  {
    # Find all files having root filename with a two-letter extension,
!   # saves the ones that are really Texinfo-related files.
!   # Use `ls' because some patterns are likely not to match.
!   # - .?o?
!   #   .toc, .log, LaTeX tables and lists, FiXme's .lox, maybe more.
!   # - bu[0-9]*.aux
!   #   Sub bibliography when using the LaTeX bibunits package.
!   for this_file in `(ls "$1".?o? "$1".aux bu[0-9]*.aux "$1".?? "$1".idx) 2>&6`
!   do
      # If file is empty, skip it.
      test -s "$this_file" || continue
      # If the file is not suitable to be an index or xref file, don't
***************
*** 366,372 ****
      # \input texinfo.
      first_character=`sed -n '1s/^\(.\).*$/\1/p;q' $this_file`
      if (test "x$first_character" = "x\\" \
!         && sed 1q $this_file | grep -v '^\\input *texinfo' >/dev/null) \
         || test "x$first_character" = "x'" \
         || test "x$first_character" = "x@"; then
        xref_files="$xref_files ./$this_file"
--- 373,379 ----
      # \input texinfo.
      first_character=`sed -n '1s/^\(.\).*$/\1/p;q' $this_file`
      if (test "x$first_character" = "x\\" \
!         && sed 1q $this_file | grep -v '^\\input *texinfo' >&6) \
         || test "x$first_character" = "x'" \
         || test "x$first_character" = "x@"; then
        xref_files="$xref_files ./$this_file"
***************
*** 398,407 ****
          _res=$_res$path_sep
          ;;
        [\\/]* | ?:[\\/]*)        # Absolute paths don't need to be expanded.
!         _res=$_res$path_sep$dir
          ;;
        *)
!         abs=`cd "$dir" && pwd` && _res=$_res$path_sep$abs
          ;;
      esac
    done
--- 405,414 ----
          _res=$_res$path_sep
          ;;
        [\\/]* | ?:[\\/]*)        # Absolute paths don't need to be expanded.
!         test -d $dir && _res=$_res$path_sep$dir
          ;;
        *)
!         test -d $dir && abs=`cd "$dir" && pwd` && _res=$_res$path_sep$abs
          ;;
      esac
    done
***************
*** 452,465 ****
  # 5 tools output (turned off by --quiet)
  # 6 tracing/debugging (set -x output, etc.)
  
! # Tools' output.  If quiet, discard, else redirect to the message flow.
  if test "$quiet" = t; then
    exec 5>/dev/null
  else
    exec 5>&1
  fi
  
! # Enable tracing
  if test "$debug" = t; then
    exec 6>&1
    set -x
--- 459,481 ----
  # 5 tools output (turned off by --quiet)
  # 6 tracing/debugging (set -x output, etc.)
  
! 
! # Main tools' output (TeX, etc.) that TeX users are used to seeing.
! #
! # If quiet, discard, else redirect to the message flow.
  if test "$quiet" = t; then
    exec 5>/dev/null
  else
    exec 5>&1
  fi
  
! 
! # Enable tracing, and auxiliary tools output.
! #
! # 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., from
! # a grep) to aid debugging.  Especially debugging at distance, via the
! # user.
  if test "$debug" = t; then
    exec 6>&1
    set -x
***************
*** 491,497 ****
    # because in clean mode we are in tmp, in which case a relative
    # path has no meaning.
    filename_dir=`echo $command_line_filename | sed 's!/[^/]*$!!;s!^$!.!'`
!   filename_dir=`cd "$filename_dir" >/dev/null && pwd`
  
    # Strip directory part but leave extension.
    filename_ext=`basename "$command_line_filename"`
--- 507,513 ----
    # because in clean mode we are in tmp, in which case a relative
    # path has no meaning.
    filename_dir=`echo $command_line_filename | sed 's!/[^/]*$!!;s!^$!.!'`
!   filename_dir=`cd "$filename_dir" >&6 && pwd`
  
    # Strip directory part but leave extension.
    filename_ext=`basename "$command_line_filename"`
***************
*** 529,549 ****
    # we've cd'd to a temp directory.
    common="$orig_pwd$path_sep$filename_dir$path_sep$txincludes"
    for var in $tex_envvars; do
!     eval ${var}="\$common\$${var}_orig"
!     export $var
    done
  
-   # Convert relative paths to absolute paths, so we can run in another
-   # directory (e.g., in --clean mode, or during the macro-support detection.)
-   TEXINPUTS=`absolute_filenames "$TEXINPUTS"`
-   verbose "TEXINPUTS: $TEXINPUTS"
-   BIBINPUTS=`absolute_filenames "$BIBINPUTS"`
-   verbose "BIBINPUTS: $BIBINPUTS"
-   BSTINPUTS=`absolute_filenames "$BSTINPUTS"`
-   verbose "BSTINPUTS: $BSTINPUTS"
-   INDEXSTYLE=`absolute_filenames "$INDEXSTYLE"`
-   verbose "INDEXSTYLE: $INDEXSTYLE"
- 
    # If the user explicitly specified the language, use that.
    # Otherwise, if the first line is \input texinfo, assume it's texinfo.
    # Otherwise, guess from the file extension.
--- 545,558 ----
    # we've cd'd to a temp directory.
    common="$orig_pwd$path_sep$filename_dir$path_sep$txincludes"
    for var in $tex_envvars; do
!     eval val="\$common\$${var}_orig"
!     # Convert relative paths to absolute paths, so we can run in another
!     # directory (e.g., in --clean mode, or during the macro-support 
detection.)
!     val=`absolute_filenames "$val"`
!     eval export $var=$val
!     eval verbose "$var=\'\$${var}\'"
    done
  
    # If the user explicitly specified the language, use that.
    # Otherwise, if the first line is \input texinfo, assume it's texinfo.
    # Otherwise, guess from the file extension.
***************
*** 583,589 ****
        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$' >/dev/null; then
            tex=tex  # don't bother trying to find etex
          else
            tex=$TEX
--- 592,598 ----
        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
***************
*** 616,622 ****
          fi
        eval `sed -n 's/^.*\[\(.*\)version 
\(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p' 
$tmpdir/txiversion.out`
          verbose "texinfo.tex preloaded as \`$txiformat', version is 
\`$txiversion' ..."
!         if test "$txiprereq" -le "$txiversion" >/dev/null 2>&1; then
            makeinfo=
          else
            makeinfo=${MAKEINFO:-makeinfo}
--- 625,631 ----
          fi
        eval `sed -n 's/^.*\[\(.*\)version 
\(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p' 
$tmpdir/txiversion.out`
          verbose "texinfo.tex preloaded as \`$txiformat', version is 
\`$txiversion' ..."
!         if test "$txiprereq" -le "$txiversion" >&6 2>&1; then
            makeinfo=
          else
            makeinfo=${MAKEINFO:-makeinfo}
***************
*** 630,636 ****
  
    # Go to $tmpdir to try --help, since old versions that don't accept
    # --help will generate a texput.log.
!   tex_help=`cd $tmpdir >/dev/null && $tex --help </dev/null 2>&1`
  
    # Expand macro commands in the original source file using Makeinfo.
    # Always use `end' footnote style, since the `separate' style
--- 639,645 ----
  
    # Go to $tmpdir to try --help, since old versions that don't accept
    # --help will generate a texput.log.
!   tex_help=`cd $tmpdir >&6 && $tex --help </dev/null 2>&1`
  
    # Expand macro commands in the original source file using Makeinfo.
    # Always use `end' footnote style, since the `separate' style
***************
*** 697,703 ****
  
      # Run bibtex on current file.
      # - If its input (AUX) exists.
-     # - If AUX contains both `\bibdata' and `\bibstyle'.
      # - If some citations are missing (LOG contains `Citation').
      #   or the LOG complains of a missing .bbl
      #
--- 706,711 ----
***************
*** 705,728 ****
      # to change after bibtex is run, but I see no reason for the
      # converse.
      #
!     # Don't try to be too smart.  Running bibtex only if the bbl file
!     # exists and is older than the LaTeX file is wrong, since the
!     # document might include files that have changed.  Because there
!     # can be several AUX (if there are \include's), but a single LOG,
!     # looking for missing citations in LOG is easier, though we take
!     # the risk to match false messages.
      if test -n "$bibtex" \
         && test -r "$filename_noext.aux" \
         && test -r "$filename_noext.log" \
!        && (grep '^\\bibdata[{]'  "$filename_noext.aux" \
!            && grep '^\\bibstyle[{]' "$filename_noext.aux" \
!            && (grep 'Warning:.*Citation.*undefined' "$filename_noext.log" \
!                || grep 'No file .*\.bbl\.' "$filename_noext.log")) \
            >&6 2>&1; \
      then
!       verbose "Running $bibtex $filename_noext ..."
!       $bibtex "$filename_noext" >&5 ||
!         fatal 1 "$bibtex exited with bad status, quitting."
      fi
  
      # What we'll run texindex on -- exclude non-index files.
--- 713,746 ----
      # to change after bibtex is run, but I see no reason for the
      # converse.
      #
!     # Don't try to be too smart:
!     #
!     # 1. Running bibtex only if the bbl file exists and is older than
!     # the LaTeX file is wrong, since the document might include files
!     # that have changed.
!     #
!     # 3. Because there can be several AUX (if there are \include's),
!     # but a single LOG, looking for missing citations in LOG is
!     # easier, though we take the risk to match false messages.
      if test -n "$bibtex" \
         && test -r "$filename_noext.aux" \
         && test -r "$filename_noext.log" \
!        && (grep 'Warning:.*Citation.*undefined' "$filename_noext.log" \
!             || grep 'No file .*\.bbl\.' "$filename_noext.log") \
            >&6 2>&1; \
      then
!       # If using the bibunits package, we might have to run bibtex
!       # on subfiles.
!       for f in `(ls "$filename_noext".aux bu[0-9]*.aux) 2>&6`
!       do
!       if (grep '^\\bibstyle[{]' $f   \
!           && grep '^\\bibdata[{]' $f \
!           && grep '^\\citation[{]' $f) >&6 2>&1; then
!           verbose "Running $bibtex $f ..."
!           $bibtex "$f" >&5 ||
!             fatal 1 "$bibtex exited with bad status, quitting."
!       fi
!       done
      fi
  
      # What we'll run texindex on -- exclude non-index files.
P ChangeLog
P util/texi2dvi


reply via email to

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