texinfo-commits
[Top][All Lists]
Advanced

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

texinfo update (Sun Sep 4 09:22:01 EDT 2005)


From: Karl Berry
Subject: texinfo update (Sun Sep 4 09:22:01 EDT 2005)
Date: Sun, 04 Sep 2005 09:22:04 -0400

Index: ChangeLog
===================================================================
RCS file: /cvsroot/texinfo/texinfo/ChangeLog,v
retrieving revision 1.532
retrieving revision 1.533
diff -c -r1.532 -r1.533
*** ChangeLog   30 Aug 2005 13:55:55 -0000      1.532
--- ChangeLog   4 Sep 2005 13:07:40 -0000       1.533
***************
*** 1,3 ****
--- 1,19 ----
+ 2005-08-31  Akim Demaille  <address@hidden>
+ 
+       * utils/texi2dvi: Fix white space issues.
+       Quote uses of directory and file names.
+       Don't expect "export var=val" to work (e.g., SunOS 5.9): do it in
+       two steps.
+       ($tex_help): Compute it where needed (run_tex), in particular so
+       that $tex is defined when used.
+       (func_dirname): New.
+       ($quiet, $verb): Now regular true/false variables.
+       (verbose): Adjust.
+       (run_tex): When we introduced white space by making absolute file
+       names, circumvent TeX's phobia of space in file names by
+       introducing a symbolic link.
+       (filename_dir): Keep it relative when not $tidy.
+ 
  2005-08-30  Karl Berry  <address@hidden>
  
        * makeinfo/xref.c (cm_xref): if the following wrong char is ),
Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.58
retrieving revision 1.59
diff -c -r1.58 -r1.59
*** util/texi2dvi       19 Aug 2005 22:23:54 -0000      1.58
--- util/texi2dvi       4 Sep 2005 13:07:40 -0000       1.59
***************
*** 1,6 ****
  #! /bin/sh
  # texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources.
! # $Id: texi2dvi,v 1.58 2005/08/19 22:23:54 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.59 2005/09/04 13:07:40 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.58 $'
  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.59 $'
  rcs_version=`set - $rcs_revision; echo $2`
  program=`echo $0 | sed -e 's!.*/!!'`
  version="texi2dvi (GNU Texinfo 4.8) $rcs_version
***************
*** 127,140 ****
  miincludes=     # makeinfo include path
  oformat=dvi
  oname=          # --output
! quiet=          # by default let the tools' message be displayed
  recode=false
  set_language=
  textra=         # Extra TeX commands to insert in the input file.
  textra_cmd=     # sed command to insert TEXTRA where appropriate
  txincludes=     # TEXINPUTS extensions, with trailing colon
  txiprereq=19990129 # minimum texinfo.tex version with macro expansion
! verb=false      # echo for verbose mode
  
  orig_pwd=`pwd`
  
--- 127,140 ----
  miincludes=     # makeinfo include path
  oformat=dvi
  oname=          # --output
! quiet=false     # by default let the tools' message be displayed
  recode=false
  set_language=
  textra=         # Extra TeX commands to insert in the input file.
  textra_cmd=     # sed command to insert TEXTRA where appropriate
  txincludes=     # TEXINPUTS extensions, with trailing colon
  txiprereq=19990129 # minimum texinfo.tex version with macro expansion
! verb=false      # true for verbose mode
  
  orig_pwd=`pwd`
  
***************
*** 158,163 ****
--- 158,172 ----
  ## Auxiliary functions.  ##
  ## --------------------- ##
  
+ # func_dirname FILE
+ # -----------------
+ # Return the directory part of FILE.
+ func_dirname ()
+ {
+   dirname "$1" 2>&6 \
+   || { echo "$1" | sed 's!/[^/]*$!!;s!^$!.!'; }
+ }
+ 
  # return true if program $1 is somewhere in PATH, else false.
  #
  findprog ()
***************
*** 200,206 ****
  # Report some verbose information.
  verbose ()
  {
!   $verb >&2 "$0: $@"
  }
  
  # fatal EXIT_STATUS LINE1 LINE2...
--- 209,215 ----
  # Report some verbose information.
  verbose ()
  {
!   $verb && echo >&2 "$0: $@"
  }
  
  # fatal EXIT_STATUS LINE1 LINE2...
***************
*** 349,356 ****
  
  # run_tex ()
  # ----------
! # Run TeX as "$tex $tex_args $filename_input", taking care of errors
! # and logs.
  run_tex ()
  {
    case $language:$oformat in
--- 358,364 ----
  
  # run_tex ()
  # ----------
! # Run TeX as "$tex $filename_input", taking care of errors and logs.
  run_tex ()
  {
    case $language:$oformat in
***************
*** 370,376 ****
    cmd=$tex
  
    # If possible, make TeX report error locations in GNU format.
!   tex_args=
    case $tex_help in
      *file-line-error*) cmd="$cmd --file-line-error";;
    esac
--- 378,390 ----
    cmd=$tex
  
    # If possible, make TeX report error locations in GNU format.
!   if test "${tex_help:+set}" != set; then
!     # Go to a temporary directory to try --help, since old versions that
!     # don't accept --help will generate a texput.log.
!     tex_help_dir=$t2ddir/tex_help
!     ensure_dir "$tex_help_dir"
!     tex_help=`cd "$tex_help_dir" >&6 && $tex --help </dev/null 2>&1`
!   fi
    case $tex_help in
      *file-line-error*) cmd="$cmd --file-line-error";;
    esac
***************
*** 383,389 ****
      cmd="$cmd </dev/null '${escape}nonstopmode' '${escape}input'"
    fi
  
!   cmd="$cmd '$filename_input'"
  
    verbose "Running $cmd ..."
    if eval "$cmd" >&5; then
--- 397,420 ----
      cmd="$cmd </dev/null '${escape}nonstopmode' '${escape}input'"
    fi
  
!   # TeX's \input does not support white spaces in file names.  Our
!   # intensive use of absolute file names makes this worse: the
!   # enclosing directory names may include white spaces.  Improve the
!   # situation using a symbolic link.  Do not alter filename_input.
!   case $tidy:`func_dirname "$filename_input"` in
!     true:*' '*)
!       _run_tex_file_name=`basename "$filename_input"`
!       if test ! -f "$_run_tex_file_name"; then
!       verbose ln -sf "$filename_input"
!         ln -sf "$_run_tex_file_name"
!       fi
!       cmd="$cmd '$_run_tex_file_name'"
!       ;;
! 
!     *)
!       cmd="$cmd '$filename_input'"
!       ;;
!   esac
  
    verbose "Running $cmd ..."
    if eval "$cmd" >&5; then
***************
*** 545,553 ****
        # digits.
        # Run in a temporary directory to avoid leaving files.
        version_test_dir=$t2ddir/version_test
!       ensure_dir $version_test_dir
        (
!          cd $version_test_dir
           echo '\input texinfo.tex @bye' >txiversion.tex
           # Be sure that if tex wants to fail, it is not interactive:
           # close stdin.
--- 576,584 ----
        # digits.
        # Run in a temporary directory to avoid leaving files.
        version_test_dir=$t2ddir/version_test
!       ensure_dir "$version_test_dir"
        (
!          cd "$version_test_dir"
           echo '\input texinfo.tex @bye' >txiversion.tex
           # Be sure that if tex wants to fail, it is not interactive:
           # close stdin.
***************
*** 602,608 ****
      # _xtr.  The file with the user's extra commands.
      work_xtr=$workdir/xtr
      filename_xtr=$work_xtr/$filename_noext.$ext
!     ensure_dir $work_xtr
      verbose "Inserting extra commands: $textra"
      sed "$textra_cmd\\
  $textra" "$filename_input" >"$filename_xtr"
--- 633,639 ----
      # _xtr.  The file with the user's extra commands.
      work_xtr=$workdir/xtr
      filename_xtr=$work_xtr/$filename_noext.$ext
!     ensure_dir "$work_xtr"
      verbose "Inserting extra commands: $textra"
      sed "$textra_cmd\\
  $textra" "$filename_input" >"$filename_xtr"
***************
*** 626,634 ****
      if $recode && test -n "$encoding" && findprog recode; then
        verbose "Recoding from $encoding to Texinfo."
        # _rcd.  The Texinfo file recoded in 7bit.
!       work_rcd=$workdir/rcd
        filename_rcd=$work_rcd/$filename_noext.$ext
!       ensure_dir $work_rcd
        if recode "$encoding"..texinfo <"$filename_input" >"$filename_rcd" \
           && test -s "$filename_rcd"; then
          filename_input=$filename_rcd
--- 657,665 ----
      if $recode && test -n "$encoding" && findprog recode; then
        verbose "Recoding from $encoding to Texinfo."
        # _rcd.  The Texinfo file recoded in 7bit.
!       work_rcd=$workdir/recode
        filename_rcd=$work_rcd/$filename_noext.$ext
!       ensure_dir "$work_rcd"
        if recode "$encoding"..texinfo <"$filename_input" >"$filename_rcd" \
           && test -s "$filename_rcd"; then
          filename_input=$filename_rcd
***************
*** 690,702 ****
                  *) oname="$orig_pwd/$1";;
        esac;;
      -p | --p*) oformat=pdf;;
!     -q | -s | --q* | --s*) quiet=t; batch=true;;
      -r | --r*) recode=true;;
      -t | --tex* | --com* ) shift; textra="$textra\\
  "`echo "$1" | sed 's/\\\\/\\\\\\\\/g'`;;
      --tidy) build_mode=tidy;;
      -v | --vers*) echo "$version"; exit 0;;
!     -V | --verb*) verb=echo;;
      --) # What remains are not options.
        shift
        while test x"$1" != x"$arg_sep"; do
--- 721,733 ----
                  *) oname="$orig_pwd/$1";;
        esac;;
      -p | --p*) oformat=pdf;;
!     -q | -s | --q* | --s*) quiet=true; batch=true;;
      -r | --r*) recode=true;;
      -t | --tex* | --com* ) shift; textra="$textra\\
  "`echo "$1" | sed 's/\\\\/\\\\\\\\/g'`;;
      --tidy) build_mode=tidy;;
      -v | --vers*) echo "$version"; exit 0;;
!     -V | --verb*) verb=true;;
      --) # What remains are not options.
        shift
        while test x"$1" != x"$arg_sep"; do
***************
*** 715,720 ****
--- 746,753 ----
  # Pop the token
  shift
  
+ # clean: remove the t2d directory afterward.
+ # tidy:  compile in this t2d directory.
  case $build_mode in
    local) clean=true;  tidy=false;;
    tidy)  clean=false; tidy=true;;
***************
*** 781,787 ****
  # 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
--- 814,820 ----
  # Main tools' output (TeX, etc.) that TeX users are used to seeing.
  #
  # If quiet, discard, else redirect to the message flow.
! if $quiet; then
    exec 5>/dev/null
  else
    exec 5>&1
***************
*** 824,834 ****
      continue
    fi
  
!   # Get the name of the current directory.  We want the full path
!   # because in clean build 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"`
--- 857,868 ----
      continue
    fi
  
!   # Get the name of the current directory.
!   filename_dir=`func_dirname "$command_line_filename"`
!   # In a clean build, we `cd', so get an absolute file name.
!   case $tidy in
!     true)  filename_dir=`cd "$filename_dir" >&6 && pwd` ;;
!   esac
  
    # Strip directory part but leave extension.
    filename_ext=`basename "$command_line_filename"`
***************
*** 869,875 ****
    work_bak=$workdir/bak
  
    # Make those directories.
!   ensure_dir $work_build $work_bak
  
    # Source file might include additional sources.
    # We want `.:$orig_pwd' before anything else.  (We'll add `.:' later
--- 903,909 ----
    work_bak=$workdir/bak
  
    # Make those directories.
!   ensure_dir "$work_build" "$work_bak"
  
    # Source file might include additional sources.
    # We want `.:$orig_pwd' before anything else.  (We'll add `.:' later
***************
*** 885,891 ****
      # directory (e.g., in clean build mode, or during the macro-support
      # detection).
      val=`absolute_filenames "$val"`
!     eval export $var=$val
      eval verbose "$var=\'\$${var}\'"
    done
  
--- 919,926 ----
      # directory (e.g., in clean build mode, or during the macro-support
      # detection).
      val=`absolute_filenames "$val"`
!     eval $var="$val"
!     eval export $var
      eval verbose "$var=\'\$${var}\'"
    done
  
***************
*** 917,928 ****
        ;;
    esac
  
-   # Go to a temporary directory to try --help, since old versions that
-   # don't accept --help will generate a texput.log.
-   tex_help_dir=$t2ddir/tex_help
-   ensure_dir $tex_help_dir
-   tex_help=`cd $tex_help_dir >&6 && $tex --help </dev/null 2>&1`
- 
    # --expand
    run_makeinfo
  
--- 952,957 ----
***************
*** 949,955 ****
      orig_xref_files=`get_xref_files  "$filename_noext"`
      if test -n "$orig_xref_files"; then
        verbose "Backing up xref files: $orig_xref_files"
!       cp $orig_xref_files $work_bak
      fi
  
      run_bibtex
--- 978,984 ----
      orig_xref_files=`get_xref_files  "$filename_noext"`
      if test -n "$orig_xref_files"; then
        verbose "Backing up xref files: $orig_xref_files"
!       cp $orig_xref_files "$work_bak"
      fi
  
      run_bibtex
***************
*** 995,1001 ****
    # - the next file is processed in correct conditions
    # - the temporary file can be removed
    cd / # in case $orig_pwd is on a different drive (for DOS)
!   cd $orig_pwd || exit 1
  
    # Remove temporary files.
    if $clean; then
--- 1024,1030 ----
    # - the next file is processed in correct conditions
    # - the temporary file can be removed
    cd / # in case $orig_pwd is on a different drive (for DOS)
!   cd "$orig_pwd" || exit 1
  
    # Remove temporary files.
    if $clean; then
P ChangeLog
P util/texi2dvi


reply via email to

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