changeset 5151:b142b5a0d6be

[project @ 2005-02-21 16:50:00 by jwe]
author jwe
date Mon, 21 Feb 2005 16:50:00 +0000
parents 5f82526a4c66
children b111ca4715c6
files ChangeLog Makeconf.in doc/ChangeLog doc/interpreter/Makefile.in doc/liboctave/Makefile.in texi2dvi
diffstat 6 files changed, 41 insertions(+), 380 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Feb 18 22:26:11 2005 +0000
+++ b/ChangeLog	Mon Feb 21 16:50:00 2005 +0000
@@ -1,3 +1,10 @@
+2005-02-21  John W. Eaton  <jwe@octave.org>
+
+	* texi2dvi: Delete our private version.
+
+	* Makeconf.in (MAKEINFO): Define.
+	(TEXI2DVI): Define as texi2dvi, not $(top_srcdir)/texi2dvi.
+
 2005-02-09  John W. Eaton  <jwe@octave.org>
 
 	* configure.in: Check for canonicalize_file_name and resolvepath.
--- a/Makeconf.in	Fri Feb 18 22:26:11 2005 +0000
+++ b/Makeconf.in	Mon Feb 21 16:50:00 2005 +0000
@@ -54,7 +54,9 @@
 
 RUNTEST = @RUNTEST@
 
-TEXI2DVI = $(top_srcdir)/texi2dvi
+MAKEINFO = makeinfo
+TEXI2DVI = texi2dvi
+TEXI2PDF = texi2pdf
 
 DEFAULT_PAGER = @DEFAULT_PAGER@
 
--- a/doc/ChangeLog	Fri Feb 18 22:26:11 2005 +0000
+++ b/doc/ChangeLog	Mon Feb 21 16:50:00 2005 +0000
@@ -1,3 +1,15 @@
+2005-02-21  John W. Eaton  <jwe@octave.org>
+
+	* liboctave/Makefile.in (liboctave.pdf): New target and rule.
+	(FORMATTED): Add liboctave.pdf to the list.
+	(all): Also epend on liboctave.pdf.
+	Use $(MAKEINFO) instead of makeinfo in rules.
+
+	* interpreter/Makefile.in (octave.pdf): New target and rule.
+	(FORMATTED): Add octave.pdf to the list.
+	(all): Also depend on octave.pdf.
+	Use $(MAKEINFO) instead of makeinfo in rules.
+
 2005-02-08  Quentin Spencer  <qspencer@ieee.org>
 
 	* interpreter/plot.txi: Emphasize compatible plotting functions
--- a/doc/interpreter/Makefile.in	Fri Feb 18 22:26:11 2005 +0000
+++ b/doc/interpreter/Makefile.in	Mon Feb 21 16:50:00 2005 +0000
@@ -37,7 +37,7 @@
 
 TEXINFO := $(MAIN_TEXINFO) $(SUB_TEXINFO)
 
-FORMATTED = octave.dvi octave.ps \
+FORMATTED = octave.dvi octave.ps octave.pdf \
 	octave.info octave.info-[0-9]* \
 	octave.html octave_*.html
 
@@ -65,7 +65,7 @@
 	$(SED) -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp
 	mv $@.tmp $@
 
-all: octave.info octave.dvi octave.ps octave_toc.html
+all: octave.info octave.dvi octave.ps octave.pdf octave_toc.html
 .PHONY: all
 
 $(TEXINFO): src-DOCSTRINGS scripts-DOCSTRINGS munge-texi$(BUILD_EXEEXT)
@@ -89,7 +89,7 @@
 	@$(top_srcdir)/move-if-change $@.t $@
 
 octave.info: $(MAIN_TEXINFO) $(SUB_TEXINFO) ../conf.texi
-	-makeinfo -I$(srcdir) -I$(srcdir)/.. $<
+	-$(MAKEINFO) -I$(srcdir) -I$(srcdir)/.. $<
 
 octave.dvi: $(MAIN_TEXINFO) $(SUB_TEXINFO) ../conf.texi
 	-TEXINPUTS="$(srcdir):$(srcdir)/..:$(TEXINPUTS):"; \
@@ -99,16 +99,21 @@
 octave.ps: octave.dvi
 	-dvips -o octave.ps octave.dvi
 
+octave.pdf: $(MAIN_TEXINFO) $(SUB_TEXINFO) ../conf.texi
+	-TEXINPUTS="$(srcdir):$(srcdir)/..:$(TEXINPUTS):"; \
+	  export TEXINPUTS; \
+	  $(TEXI2PDF) $<
+
 ../../INSTALL.OCTAVE: install.texi
 	rm -f INSTALL
-	-makeinfo -D INSTALLONLY \
+	-$(MAKEINFO) -D INSTALLONLY \
 	  --no-validate --no-headers --no-split --output INSTALL \
 	  -I$(srcdir) -I$(srcdir)/.. $<
 	mv INSTALL ../../INSTALL.OCTAVE
 
 ../../BUGS: bugs.texi
 	rm -f BUGS
-	-makeinfo -D BUGSONLY \
+	-$(MAKEINFO) -D BUGSONLY \
 	  --no-validate --no-headers --no-split --output BUGS \
 	  -I$(srcdir) -I$(srcdir)/.. $<
 	mv BUGS ../../BUGS
--- a/doc/liboctave/Makefile.in	Fri Feb 18 22:26:11 2005 +0000
+++ b/doc/liboctave/Makefile.in	Mon Feb 21 16:50:00 2005 +0000
@@ -25,7 +25,8 @@
 	liboctave.texi matvec.texi nleqn.texi nlfunc.texi ode.texi \
 	optim.texi preface.texi quad.texi range.texi
 
-FORMATTED = liboctave.dvi liboctave.ps liboctave.info liboctave*.html
+FORMATTED = liboctave.dvi liboctave.ps liboctave.pdf \
+	liboctave.info liboctave*.html
 
 DISTFILES = Makefile.in gpl.texi $(TEXINFO) $(FORMATTED)
 
@@ -38,11 +39,11 @@
 	$(SED) -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp
 	mv $@.tmp $@
 
-all: liboctave.info liboctave.dvi liboctave.ps liboctave_toc.html
+all: liboctave.info liboctave.dvi liboctave.ps liboctave.pdf liboctave_toc.html
 .PHONY: all
 
 liboctave.info: $(TEXINFO) ../conf.texi
-	-makeinfo -I$(srcdir) -I$(srcdir)/.. $(srcdir)/liboctave.texi
+	-$(MAKEINFO) -I$(srcdir) -I$(srcdir)/.. $(srcdir)/liboctave.texi
 
 liboctave.dvi: $(TEXINFO) ../conf.texi
 	-TEXINPUTS="$(srcdir):$(srcdir)/..:$(TEXINPUTS):"; \
@@ -52,6 +53,11 @@
 liboctave.ps: liboctave.dvi
 	-dvips -o liboctave.ps liboctave.dvi
 
+liboctave.pdf: $(TEXINFO) ../conf.texi
+	-TEXINPUTS="$(srcdir):$(srcdir)/..:$(TEXINPUTS):"; \
+	  export TEXINPUTS; \
+	  $(TEXI2PDF) $(srcdir)/liboctave.texi
+
 # These option forms are supported by texi2html 1.65 and probably also
 # more recent versions.
 liboctave_toc.html:
--- a/texi2dvi	Fri Feb 18 22:26:11 2005 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,371 +0,0 @@
-#! /bin/sh
-# texi2dvi --- smartly produce DVI files from texinfo sources
-
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-
-# $Id: texi2dvi,v 1.3 1999-10-13 21:59:11 jwe Exp $
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, you can either send email to this
-# program's maintainer or write to: The Free Software Foundation,
-# Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
-
-# Commentary:
-
-# Author: Noah Friedman <friedman@gnu.org>
-
-# Please send bug reports, etc. to bug-texinfo@gnu.org.
-# If possible, please send a copy of the output of the script called with
-# the `--debug' option when making a bug report.
-
-# In the interest of general portability, some common bourne shell
-# constructs were avoided because they weren't guaranteed to be available
-# in some earlier implementations.  I've tried to make this program as
-# portable as possible.  Welcome to unix, where the lowest common
-# denominator is rapidly diminishing.
-#
-# Among the more interesting lossages I noticed with some bourne shells
-# are:
-#     * No shell functions.
-#     * No `unset' builtin.
-#     * `shift' cannot take a numeric argument, and signals an error if
-#       there are no arguments to shift.
-
-# Code:
-
-# Name by which this script was invoked.
-progname=`echo "$0" | sed -e 's/[^\/]*\///g'`
-
-# This string is expanded by rcs automatically when this file is checked out.
-rcs_revision='$Revision: 1.3 $'
-version=`set - $rcs_revision; echo $2`
-
-# To prevent hairy quoting and escaping later.
-bq='`'
-eq="'"
-
-usage="Usage: $0 [OPTION]... FILE...
-Run a Texinfo document through TeX.
-
-Options:
--D, --debug          Turn on shell debugging ($bq${bq}set -x$eq$eq).
--t, --texinfo CMD    Insert CMD after @setfilename before running TeX.
---verbose            Report on what is done.
--h, --help           Display this help and exit.
--v, --version        Display version information and exit.
-
-The values of the TEX, TEXINDEX, and MAKEINFO environment variables are
-used to run those commands, if they are set.
-
-Email bug reports to bug-texinfo@prep.ai.mit.edu.
-"
-
-# Initialize variables.
-# Don't use `unset' since old bourne shells don't have this command.
-# Instead, assign them an empty value.
-# Some of these, like TEX and TEXINDEX, may be inherited from the environment.
-backup_extension=.bak # these files get deleted if all goes well.
-debug=
-orig_pwd="`pwd`"
-textra=
-verbose=false
-makeinfo="${MAKEINFO-makeinfo}"
-texindex="${TEXINDEX-texindex}"
-tex="${TEX-tex}"
-
-# Save this so we can construct a new TEXINPUTS path for each file.
-TEXINPUTS_orig="$TEXINPUTS"
-export TEXINPUTS
-
-# Parse command line arguments.
-# Make sure that all wildcarded options are long enough to be unambiguous.
-# It's a good idea to document the full long option name in each case.
-# Long options which take arguments will need a `*' appended to the
-# canonical name to match the value appended after the `=' character.
-while : ; do
-  case $# in 0) break ;; esac
-  case "$1" in
-    -D | --debug | --d* ) debug=t; shift ;;
-    -h | --help | --h* )   echo "$usage"; exit 0 ;;
-    # OK, we should do real option parsing here, but be lazy for now.
-    -t | --texinfo | --t*) shift; textra="$textra $1"; shift ;; 
-    -v | --vers* )
-      echo "$progname (Texinfo 3.9) $version"
-      echo "Copyright (C) 1996 Free Software Foundation, Inc.
-There is NO warranty.  You may redistribute this software
-under the terms of the GNU General Public License.
-For more information about these matters, see the files named COPYING."
-      exit 0 ;;
-    --verb* )            verbose=echo; shift ;;
-    -- )     # Stop option processing
-      shift
-      break
-     ;;
-    -* )
-      case "$1" in
-        --*=* ) arg=`echo "$1" | sed -e 's/=.*//'` ;;
-        * )     arg="$1" ;;
-      esac
-      exec 1>&2
-      echo "$progname: Unknown or ambiguous option $bq$arg$eq."
-      echo "$progname: Try $bq--help$eq for more information."
-      exit 1
-     ;;
-    * )
-      break
-     ;;
-   esac
-done
-
-# See if there are any command line args left (which will be interpreted as
-# filename arguments).
-if test $# -eq 0; then
-  exec 1>&2
-  echo "$progname: At least one file name is required as an argument."
-  echo "$progname: Try $bq--help$eq for more information."
-  exit 2
-fi
-
-test "$debug" = t && set -x
-
-# Texify files
-for command_line_filename in ${1+"$@"} ; do
-  $verbose "Processing $command_line_filename ..."
-
-  # See if file exists.  If it doesn't we're in trouble since, even
-  # though the user may be able to reenter a valid filename at the tex
-  # prompt (assuming they're attending the terminal), this script won't
-  # be able to find the right index files and so forth.
-  if test ! -r "${command_line_filename}" ; then
-    echo "$0: Could not read ${command_line_filename}." >&2
-    continue
-  fi
-
-  # Roughly equivalent to `dirname ...`, but more portable
-  directory="`echo ${command_line_filename} | sed 's/\/[^\/]*$//'`"
-  filename_texi="`basename ${command_line_filename}`"
-  # Strip off the last extension part (probably .texinfo or .texi)
-  filename_noext="`echo ${filename_texi} | sed 's/\.[^.]*$//'`"
-
-  # Use same basename since we want to generate aux files with the same
-  # basename as the manual.  Use extension .texi for the temp file so
-  # that TeX will ignore it.  Thus, we must use a subdirectory.
-  #
-  # Output the macro-expanded file to here.
-  tmp_dir=${TMPDIR-/tmp}/$$
-  filename_tmp=$tmp_dir/$filename_noext.texi
-  # Output the file with the user's extra commands to here.
-  filename_tmp2=$tmp_dir.2/$filename_noext.texi
-  mkdir $tmp_dir $tmp_dir.2
-
-  # If directory and file are the same, then it's probably because there's
-  # no pathname component.  Set dirname to `.', the current directory.
-  if test "z${directory}" = "z${command_line_filename}" ; then
-     directory=.
-  fi
-
-  # Source file might @include additional texinfo sources.  Put `.' and
-  # directory where source file(s) reside in TEXINPUTS before anything
-  # else.  `.' goes first to ensure that any old .aux, .cps, etc. files in
-  # ${directory} don't get used in preference to fresher files in `.'.
-  TEXINPUTS=".:${directory}:${TEXINPUTS_orig}"
-  makeinfo_inputs="-I`echo $TEXINPUTS | sed 's,:, -I,g'`"
-
-  # Expand macro commands in the original source file using Makeinfo;
-  #   the macro syntax bfox implemented is impossible to implement in TeX.
-  # Always use `end' footnote style, since the `separate' style
-  #   generates different output (arguably this is a bug in -E).
-  # Discard main info output, the user asked to run TeX, not makeinfo.
-  # Redirect output to /dev/null to throw away `Making info file...' msg.
-  $verbose "Macro-expanding $command_line_filename to $filename_tmp ..."
-  $makeinfo $makeinfo_inputs --footnote-style=end -E $filename_tmp \
-    -o /dev/null $command_line_filename >/dev/null
-
-  # But if there were no macros, or makeinfo failed for some reason,
-  # just use the original file.  (It shouldn't make any difference, but
-  # let's be safe.)
-  if test $? -ne 0 || cmp -s $filename_tmp $command_line_filename; then
-    $verbose "Reverting to $command_line_filename ..."
-    filename_input=$command_line_filename
-  else
-    filename_input=$filename_tmp
-  fi
-
-  # Used most commonly for @finalout, @smallbook, etc.
-  if test -n "$textra"; then
-    $verbose "Inserting extra commands: $textra."
-    sed '/^@setfilename/a\
-'"$textra" $filename_input >$filename_tmp2
-   filename_input=$filename_tmp2
-  fi
-
-  while true; do # will break out of loop below
-    # "Unset" variables that might have values from previous iterations and
-    # which won't be completely reset later.
-    definite_index_files=
-
-    # Find all files having root filename with a two-letter extension,
-    # determine whether they're really index files, and save them.  Foo.aux
-    # is actually the cross-references file, but we need to keep track of
-    # that too.
-    possible_index_files="`eval echo ${filename_noext}.?? ${filename_noext}.aux`"
-    for this_file in ${possible_index_files} ; do
-       # If file is empty, forget it.
-       test -s "${this_file}" || continue
-
-       # Examine first character of file.  If it's not suitable to be an
-       # index or xref file, don't process it.
-       first_character="`sed -n '1s/^\(.\).*$/\1/p;q' ${this_file}`"
-       if test "x${first_character}" = "x\\" \
-          || test "x${first_character}" = "x'"; then
-         definite_index_files="${definite_index_files} ${this_file}"
-       fi
-    done
-    orig_index_files="${definite_index_files}"
-    orig_index_files_sans_aux="`echo ${definite_index_files} \
-                                 | sed 's/'${filename_noext}'\.aux//;
-                                        s/^[ ]*//;s/[ ]*$//;'`"
-
-    # Now save copies of original index files so we have some means of
-    # comparison later.
-    $verbose "Backing up current index files: $orig_index_files ..."  
-    for index_file_to_save in ${orig_index_files} ; do
-      cp "${index_file_to_save}" "${index_file_to_save}${backup_extension}"
-    done
-
-    # Run texindex on current index files.  If they already exist, and
-    # after running TeX a first time the index files don't change, then
-    # there's no reason to run TeX again.  But we won't know that if the
-    # index files are out of date or nonexistent.
-    if test -n "${orig_index_files_sans_aux}" ; then
-       $verbose "Running $texindex $orig_index_files_sans_aux ..."
-       ${texindex} ${orig_index_files_sans_aux}
-    fi
-
-    # Finally, run TeX.
-    $verbose "Running $tex $filename_input ..."
-    ${tex} "$filename_input"
-
-    # Check if index files changed.
-    # 
-    definite_index_files=
-    # Get list of new index files.
-    possible_index_files="`eval echo ${filename_noext}.?? ${filename_noext}.aux`"
-    for this_file in ${possible_index_files} ; do
-       # If file is empty, forget it.
-       test -s "${this_file}" || continue
-
-       # Examine first character of file.  If it's not a backslash or
-       # single quote, then it's definitely not an index or xref file.
-       # (Will have to check for @ when we switch to Texinfo syntax in
-       # all these files...)
-       first_character="`sed -n '1s/^\(.\).*$/\1/p;q' ${this_file}`"
-       if test "x${first_character}" = "x\\" \
-          || test "x${first_character}" = "x'"; then
-         definite_index_files="${definite_index_files} ${this_file}"
-       fi
-    done
-    new_index_files="${definite_index_files}"
-    new_index_files_sans_aux="`echo ${definite_index_files} \
-                               | sed 's/'${filename_noext}'\.aux//;
-                                      s/^[ ]*//;s/[ ]*$//;'`"
-
-    # If old and new list don't at least have the same file list, then one
-    # file or another has definitely changed.
-    $verbose "Original index files =$orig_index_files"
-    $verbose "New index files =$new_index_files"
-    if test "z${orig_index_files}" != "z${new_index_files}" ; then
-      index_files_changed_p=t
-    else
-      # File list is the same.  We must compare each file until we find a
-      # difference.
-      index_files_changed_p=
-      for this_file in ${new_index_files} ; do
-        $verbose "Comparing index file $this_file ..."
-        # cmp -s will return nonzero exit status if files differ.
-        cmp -s "${this_file}" "${this_file}${backup_extension}"
-        if test $? -ne 0 ; then
-          # We only need to keep comparing until we find *one* that
-          # differs, because we'll have to run texindex & tex no
-          # matter what.
-          index_files_changed_p=t
-          $verbose "Index file $this_file differed:"
-          test $verbose = echo \
-          && diff -c "${this_file}${backup_extension}" "${this_file}"
-          break
-        fi
-      done
-    fi
-
-    # If index files have changed since TeX has been run, or if the aux
-    # file wasn't present originally, run texindex and TeX again.
-    if test "${index_files_changed_p}" ; then :; else
-      # Nothing changed.  We're done with TeX.
-      break
-    fi
-  done
-
-  # Generate list of files to delete, then call rm once with the entire
-  # list.  This is significantly faster than multiple executions of rm.
-  file_list=
-  for file in ${orig_index_files} ; do
-    file_list="${file_list} ${file}${backup_extension}"
-  done
-  if test -n "${file_list}" ; then
-    $verbose "Removing $file_list $tmp_dir $tmp_dir.2 ..."
-    rm -f ${file_list}
-    rm -rf $tmp_dir $tmp_dir.2
-  fi
-done
-
-$verbose "$0 done."
-true # exit successfully.
-
-# texi2dvi ends here
-# $Log: texi2dvi,v $
-# Revision 1.3  1999-10-13 21:59:11  jwe
-# *** empty log message ***
-#
-# Revision 1.1  1996/11/14 20:42:03  jwe
-# *** empty log message ***
-#
-# Revision 1.10  1996/10/04 18:21:55  karl
-# Include only the current year in the copyright message.
-#
-# Revision 1.9  1996/10/04 11:49:48  karl
-# Exit successfully.  From arnold.
-#
-# Revision 1.8  1996/10/03 23:14:26  karl
-# Only show diff if verbose.
-# Update version number.
-#
-# Revision 1.7  1996/09/29 22:56:08  karl
-# Use $progname instead of $0 for --version.
-#
-# Revision 1.6  1996/09/28 21:01:23  karl
-# Recompute original index files each time through loop.
-# Make indentation uniform.
-# Use same basename for the temp input files.
-# Standardize --version output.
-#
-# Revision 1.5  1996/09/26 14:46:34  karl
-# (texi2dvi): Run TeX until the aux/index files stabilize, instead of just
-# twice.  From: David Shaw <daves@gsms01.alcatel.com.au>.
-#
-# Revision 1.4  1996/08/27 18:59:26  karl
-# Include bug reporting address.
-#
-# Revision 1.3  1996/07/26 18:20:56  karl
-# Do macro expansion with makeinfo before running TeX.
-# Various expansion safety measures added for test; avoid use of -o.
-#