summaryrefslogtreecommitdiff
path: root/Build/source/utils/texinfo/util
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-04-20 15:41:14 +0000
committerKarl Berry <karl@freefriends.org>2008-04-20 15:41:14 +0000
commitf90831f6e47e7321ba5f1d9f75f847ba33764c81 (patch)
treeb42b3d59ddbfaffc25e5f2324d4e4351201c0d89 /Build/source/utils/texinfo/util
parent57e45350ccbae224c5cf45171e024ab43e56cf8f (diff)
texinfo 4.12
git-svn-id: svn://tug.org/texlive/trunk@7545 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/texinfo/util')
-rw-r--r--Build/source/utils/texinfo/util/Makefile.am47
-rw-r--r--Build/source/utils/texinfo/util/Makefile.in554
-rw-r--r--Build/source/utils/texinfo/util/README9
-rwxr-xr-xBuild/source/utils/texinfo/util/bibtex.test57
-rw-r--r--Build/source/utils/texinfo/util/defs.in364
-rw-r--r--Build/source/utils/texinfo/util/deref.c7
-rw-r--r--Build/source/utils/texinfo/util/dir-example150
-rwxr-xr-xBuild/source/utils/texinfo/util/dvipdf.test66
-rw-r--r--Build/source/utils/texinfo/util/fixref.gawk8
-rwxr-xr-xBuild/source/utils/texinfo/util/gendocs.sh209
-rwxr-xr-xBuild/source/utils/texinfo/util/gendocs_template130
-rwxr-xr-xBuild/source/utils/texinfo/util/latex2html.test79
-rwxr-xr-xBuild/source/utils/texinfo/util/local.test59
-rw-r--r--Build/source/utils/texinfo/util/outline.gawk5
-rwxr-xr-xBuild/source/utils/texinfo/util/pdftexi2dvi19
-rw-r--r--Build/source/utils/texinfo/util/prepinfo.awk7
-rw-r--r--Build/source/utils/texinfo/util/texi-docstring-magic.el4
-rwxr-xr-xBuild/source/utils/texinfo/util/texi2dvi2030
-rwxr-xr-xBuild/source/utils/texinfo/util/texi2dvi.test79
-rwxr-xr-xBuild/source/utils/texinfo/util/texi2pdf8
-rw-r--r--Build/source/utils/texinfo/util/texindex.c496
-rw-r--r--Build/source/utils/texinfo/util/texinfo.dtd167
-rwxr-xr-xBuild/source/utils/texinfo/util/txitextest12
23 files changed, 3064 insertions, 1502 deletions
diff --git a/Build/source/utils/texinfo/util/Makefile.am b/Build/source/utils/texinfo/util/Makefile.am
index 6451fa9b653..fec2df92dbf 100644
--- a/Build/source/utils/texinfo/util/Makefile.am
+++ b/Build/source/utils/texinfo/util/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.14 2004/08/26 11:43:18 karl Exp $
+# $Id: Makefile.am,v 1.34 2008/03/25 10:51:20 akim Exp $
# Makefile.am for texinfo/util.
# Run automake in .. to produce Makefile.in from this.
#
@@ -10,21 +10,20 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-bin_PROGRAMS = ginstall-info texindex
-bin_SCRIPTS = texi2dvi texi2pdf
+bin_PROGRAMS = texindex
+bin_SCRIPTS = texi2dvi texi2pdf pdftexi2dvi
-# Use `ginstall-info' in the definition of PROGRAMS and in dependencies
-# because automake generates an install-info target in every Makefile (a
-# bug, IMHO, but this is easier than patching Automake.)
-ginstall_info_SOURCES = install-info.c
-
-# Transform `ginstall-info' to `install-info' before applying any
-# user-specified name transformations.
-transform = s/ginstall-info/install-info/; $(program_transform_name)
+# for auctex.
+pdftexi2dvi: texi2pdf
+ cp -f $(srcdir)/texi2pdf $@
localedir = $(datadir)/locale
-INCLUDES = -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
-LDADD = ../lib/libtxi.a $(LIBINTL)
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/gnulib/lib \
+ -I$(top_builddir)/gnulib/lib \
+ -DLOCALEDIR=\"$(localedir)\"
+LDADD = ../lib/libtxi.a $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
dist_pkgdata_DATA = texinfo.dtd texinfo.xsl
pkgdata_DATA = texinfo.cat
@@ -35,11 +34,29 @@ texinfo.cat: texinfo-cat.in $(top_srcdir)/doc/version.texi
sed 's/__VERSION__/@VERSION@/g' $(srcdir)/texinfo-cat.in >$@
# Most of these are for fun. The only official/installed ones are the
-# texi2* scripts.
+# *texi2* scripts.
#
EXTRA_DIST = README deref.c dir-example fix-info-dir fixfonts \
fixref.gawk gdoc gen-dir-node gendocs.sh gendocs_template infosrch \
- install-info-html outline.gawk \
+ install-info-html outline.gawk pdftexi2dvi \
prepinfo.awk tex3patch texi-docstring-magic.el texi2dvi texi2pdf txitextest \
$(dist_pkgdata_DATA) texinfo-cat.in
CLEANFILES = $(pkgdata_DATA)
+
+
+# Let's not stress people's TeX installations, etc.
+if MAINTAINER_MODE
+TESTS = \
+bibtex.test \
+dvipdf.test \
+latex2html.test \
+local.test \
+texi2dvi.test
+
+EXTRA_DIST += $(TESTS)
+
+# Each test case depends on defs.
+check_SCRIPTS = defs
+distclean-local:
+ -rm -rf testSubDir
+endif
diff --git a/Build/source/utils/texinfo/util/Makefile.in b/Build/source/utils/texinfo/util/Makefile.in
index 3111b3c27ff..255d7fc2c09 100644
--- a/Build/source/utils/texinfo/util/Makefile.in
+++ b/Build/source/utils/texinfo/util/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am,v 1.14 2004/08/26 11:43:18 karl Exp $
+# $Id: Makefile.am,v 1.34 2008/03/25 10:51:20 akim Exp $
# Makefile.am for texinfo/util.
# Run automake in .. to produce Makefile.in from this.
#
@@ -28,19 +28,16 @@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
@@ -49,57 +46,95 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-bin_PROGRAMS = ginstall-info$(EXEEXT) texindex$(EXEEXT)
+bin_PROGRAMS = texindex$(EXEEXT)
+@MAINTAINER_MODE_TRUE@am__append_1 = $(TESTS)
subdir = util
DIST_COMMON = README $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+ $(srcdir)/Makefile.in $(srcdir)/defs.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
- $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
- $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
- $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
- $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \
- $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mkstemp.m4 \
- $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
- $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \
- $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
- $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/uintmax_t.m4 \
- $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
- $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/alloca.m4 \
+ $(top_srcdir)/gnulib/m4/argz.m4 \
+ $(top_srcdir)/gnulib/m4/codeset.m4 \
+ $(top_srcdir)/gnulib/m4/eealloc.m4 \
+ $(top_srcdir)/gnulib/m4/environ.m4 \
+ $(top_srcdir)/gnulib/m4/error.m4 \
+ $(top_srcdir)/gnulib/m4/exitfail.m4 \
+ $(top_srcdir)/gnulib/m4/extensions.m4 \
+ $(top_srcdir)/gnulib/m4/getopt.m4 \
+ $(top_srcdir)/gnulib/m4/gettext.m4 \
+ $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+ $(top_srcdir)/gnulib/m4/glibc21.m4 \
+ $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+ $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+ $(top_srcdir)/gnulib/m4/iconv.m4 \
+ $(top_srcdir)/gnulib/m4/include_next.m4 \
+ $(top_srcdir)/gnulib/m4/inline.m4 \
+ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+ $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+ $(top_srcdir)/gnulib/m4/lib-link.m4 \
+ $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+ $(top_srcdir)/gnulib/m4/localcharset.m4 \
+ $(top_srcdir)/gnulib/m4/longlong.m4 \
+ $(top_srcdir)/gnulib/m4/malloc.m4 \
+ $(top_srcdir)/gnulib/m4/malloca.m4 \
+ $(top_srcdir)/gnulib/m4/mbchar.m4 \
+ $(top_srcdir)/gnulib/m4/mbiter.m4 \
+ $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+ $(top_srcdir)/gnulib/m4/mbscasecmp.m4 \
+ $(top_srcdir)/gnulib/m4/mbsncasecmp.m4 \
+ $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+ $(top_srcdir)/gnulib/m4/mbswidth.m4 \
+ $(top_srcdir)/gnulib/m4/memchr.m4 \
+ $(top_srcdir)/gnulib/m4/memcpy.m4 \
+ $(top_srcdir)/gnulib/m4/memmove.m4 \
+ $(top_srcdir)/gnulib/m4/mkstemp.m4 \
+ $(top_srcdir)/gnulib/m4/nls.m4 \
+ $(top_srcdir)/gnulib/m4/onceonly.m4 \
+ $(top_srcdir)/gnulib/m4/po.m4 \
+ $(top_srcdir)/gnulib/m4/progtest.m4 \
+ $(top_srcdir)/gnulib/m4/setenv.m4 \
+ $(top_srcdir)/gnulib/m4/stdbool.m4 \
+ $(top_srcdir)/gnulib/m4/stdint.m4 \
+ $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+ $(top_srcdir)/gnulib/m4/strdup.m4 \
+ $(top_srcdir)/gnulib/m4/strerror.m4 \
+ $(top_srcdir)/gnulib/m4/string_h.m4 \
+ $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+ $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+ $(top_srcdir)/gnulib/m4/tempname.m4 \
+ $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+ $(top_srcdir)/gnulib/m4/wchar.m4 \
+ $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+ $(top_srcdir)/gnulib/m4/wctype.m4 \
+ $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+ $(top_srcdir)/gnulib/m4/wint_t.m4 \
+ $(top_srcdir)/gnulib/m4/xalloc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = defs
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgdatadir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
-am_ginstall_info_OBJECTS = install-info.$(OBJEXT)
-ginstall_info_OBJECTS = $(am_ginstall_info_OBJECTS)
-ginstall_info_LDADD = $(LDADD)
-am__DEPENDENCIES_1 =
-ginstall_info_DEPENDENCIES = ../lib/libtxi.a $(am__DEPENDENCIES_1)
texindex_SOURCES = texindex.c
texindex_OBJECTS = texindex.$(OBJEXT)
texindex_LDADD = $(LDADD)
-texindex_DEPENDENCIES = ../lib/libtxi.a $(am__DEPENDENCIES_1)
+am__DEPENDENCIES_1 =
+texindex_DEPENDENCIES = ../lib/libtxi.a \
+ $(top_builddir)/gnulib/lib/libgnu.a $(am__DEPENDENCIES_1)
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(ginstall_info_SOURCES) texindex.c
-DIST_SOURCES = $(ginstall_info_SOURCES) texindex.c
+SOURCES = texindex.c
+DIST_SOURCES = texindex.c
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -112,28 +147,26 @@ DATA = $(dist_pkgdata_DATA) $(pkgdata_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-# Transform `ginstall-info' to `install-info' before applying any
-# user-specified name transformations.
-transform = s/ginstall-info/install-info/; $(program_transform_name)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
+ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
+ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
-CATOBJEXT = @CATOBJEXT@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
@@ -141,41 +174,155 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-GENCAT = @GENCAT@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
GREP = @GREP@
-HAVE_ASPRINTF = @HAVE_ASPRINTF@
-HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
-HAVE_SNPRINTF = @HAVE_SNPRINTF@
-HAVE_WPRINTF = @HAVE_WPRINTF@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_IO_H = @HAVE_IO_H@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRNDUP = @HAVE_STRNDUP@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
+HEVEA = @HEVEA@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTALL_WARNINGS_FALSE = @INSTALL_WARNINGS_FALSE@
-INSTALL_WARNINGS_TRUE = @INSTALL_WARNINGS_TRUE@
-INSTOBJEXT = @INSTOBJEXT@
-INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
+LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@
+LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
+MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -185,20 +332,50 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
STRIP = @STRIP@
+SYS_STAT_H = @SYS_STAT_H@
+SYS_TIME_H = @SYS_TIME_H@
TERMLIBS = @TERMLIBS@
-TOOLS_ONLY_FALSE = @TOOLS_ONLY_FALSE@
-TOOLS_ONLY_TRUE = @TOOLS_ONLY_TRUE@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+TEX = @TEX@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+VOID_UNSETENV = @VOID_UNSETENV@
+WCHAR_H = @WCHAR_H@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -210,11 +387,16 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -238,29 +420,45 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-bin_SCRIPTS = texi2dvi texi2pdf
-
-# Use `ginstall-info' in the definition of PROGRAMS and in dependencies
-# because automake generates an install-info target in every Makefile (a
-# bug, IMHO, but this is easier than patching Automake.)
-ginstall_info_SOURCES = install-info.c
-INCLUDES = -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\"
-LDADD = ../lib/libtxi.a $(LIBINTL)
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_SCRIPTS = texi2dvi texi2pdf pdftexi2dvi
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/gnulib/lib \
+ -I$(top_builddir)/gnulib/lib \
+ -DLOCALEDIR=\"$(localedir)\"
+
+LDADD = ../lib/libtxi.a $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
dist_pkgdata_DATA = texinfo.dtd texinfo.xsl
pkgdata_DATA = texinfo.cat
# Most of these are for fun. The only official/installed ones are the
-# texi2* scripts.
+# *texi2* scripts.
#
EXTRA_DIST = README deref.c dir-example fix-info-dir fixfonts \
- fixref.gawk gdoc gen-dir-node gendocs.sh gendocs_template infosrch \
- install-info-html outline.gawk \
- prepinfo.awk tex3patch texi-docstring-magic.el texi2dvi texi2pdf txitextest \
- $(dist_pkgdata_DATA) texinfo-cat.in
-
+ fixref.gawk gdoc gen-dir-node gendocs.sh gendocs_template \
+ infosrch install-info-html outline.gawk pdftexi2dvi \
+ prepinfo.awk tex3patch texi-docstring-magic.el texi2dvi \
+ texi2pdf txitextest $(dist_pkgdata_DATA) texinfo-cat.in \
+ $(am__append_1)
CLEANFILES = $(pkgdata_DATA)
+
+# Let's not stress people's TeX installations, etc.
+@MAINTAINER_MODE_TRUE@TESTS = \
+@MAINTAINER_MODE_TRUE@bibtex.test \
+@MAINTAINER_MODE_TRUE@dvipdf.test \
+@MAINTAINER_MODE_TRUE@latex2html.test \
+@MAINTAINER_MODE_TRUE@local.test \
+@MAINTAINER_MODE_TRUE@texi2dvi.test
+
+
+# Each test case depends on defs.
+@MAINTAINER_MODE_TRUE@check_SCRIPTS = defs
all: all-am
.SUFFIXES:
@@ -294,9 +492,11 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+defs: $(top_builddir)/config.status $(srcdir)/defs.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@@ -317,15 +517,12 @@ uninstall-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-ginstall-info$(EXEEXT): $(ginstall_info_OBJECTS) $(ginstall_info_DEPENDENCIES)
- @rm -f ginstall-info$(EXEEXT)
- $(LINK) $(ginstall_info_LDFLAGS) $(ginstall_info_OBJECTS) $(ginstall_info_LDADD) $(LIBS)
texindex$(EXEEXT): $(texindex_OBJECTS) $(texindex_DEPENDENCIES)
@rm -f texindex$(EXEEXT)
- $(LINK) $(texindex_LDFLAGS) $(texindex_OBJECTS) $(texindex_LDADD) $(LIBS)
+ $(LINK) $(texindex_OBJECTS) $(texindex_LDADD) $(LIBS)
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
@@ -349,26 +546,24 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/install-info.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texindex.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-uninstall-info-am:
install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
+ test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
@list='$(dist_pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -385,7 +580,7 @@ uninstall-dist_pkgdataDATA:
done
install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)"
+ test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
@list='$(pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -406,8 +601,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -419,8 +614,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -430,13 +625,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -449,23 +643,95 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *$$ws$$tst$$ws*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+ ;; \
+ *) \
+ echo "PASS: $$tst"; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *$$ws$$tst$$ws*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ echo "SKIP: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ fi; \
else \
- dir=''; \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all tests failed"; \
+ else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ skipped="($$skip tests were not run)"; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -477,11 +743,13 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgdatadir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -508,6 +776,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@MAINTAINER_MODE_FALSE@distclean-local:
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
@@ -516,7 +785,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
+ distclean-local distclean-tags
dvi: dvi-am
@@ -530,12 +799,20 @@ info-am:
install-data-am: install-dist_pkgdataDATA install-pkgdataDATA
+install-dvi: install-dvi-am
+
install-exec-am: install-binPROGRAMS install-binSCRIPTS
+install-html: install-html-am
+
install-info: install-info-am
install-man:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -556,28 +833,37 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
- uninstall-dist_pkgdataDATA uninstall-info-am \
- uninstall-pkgdataDATA
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic ctags distclean distclean-compile \
- distclean-generic distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-binPROGRAMS \
- install-binSCRIPTS install-data install-data-am \
- install-dist_pkgdataDATA install-exec install-exec-am \
- install-info install-info-am install-man install-pkgdataDATA \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-binSCRIPTS uninstall-dist_pkgdataDATA \
- uninstall-info-am uninstall-pkgdataDATA
-
+ uninstall-dist_pkgdataDATA uninstall-pkgdataDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+ clean-binPROGRAMS clean-generic ctags distclean \
+ distclean-compile distclean-generic distclean-local \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-binSCRIPTS \
+ install-data install-data-am install-dist_pkgdataDATA \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-pkgdataDATA \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-dist_pkgdataDATA uninstall-pkgdataDATA
+
+
+# for auctex.
+pdftexi2dvi: texi2pdf
+ cp -f $(srcdir)/texi2pdf $@
# we don't actually use version.texi in the rule, but it's one way of
# noticing when the version changes.
texinfo.cat: texinfo-cat.in $(top_srcdir)/doc/version.texi
sed 's/__VERSION__/@VERSION@/g' $(srcdir)/texinfo-cat.in >$@
+@MAINTAINER_MODE_TRUE@distclean-local:
+@MAINTAINER_MODE_TRUE@ -rm -rf testSubDir
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/Build/source/utils/texinfo/util/README b/Build/source/utils/texinfo/util/README
index 5354c3520b2..8ed7b074812 100644
--- a/Build/source/utils/texinfo/util/README
+++ b/Build/source/utils/texinfo/util/README
@@ -1,14 +1,13 @@
-$Id: README,v 1.5 2004/04/11 17:56:47 karl Exp $
+$Id: README,v 1.6 2008/01/02 01:36:32 karl Exp $
texinfo/util/README
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2008 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
-Assorted Texinfo-related programs and scripts.
+Assorted Texinfo-related files.
-texindex, texi2dvi, and install-info get installed.
+texindex, texi2dvi, texi2pdf, pdftexi2dvi, and the XML stuff get installed.
The other items here are for your amusement and/or hacking pleasure.
-
diff --git a/Build/source/utils/texinfo/util/bibtex.test b/Build/source/utils/texinfo/util/bibtex.test
new file mode 100755
index 00000000000..0bb29a05965
--- /dev/null
+++ b/Build/source/utils/texinfo/util/bibtex.test
@@ -0,0 +1,57 @@
+#! /bin/sh
+# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Texinfo.
+#
+# GNU Texinfo 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 3 of the License,
+# or (at your option) any later version.
+#
+# GNU Texinfo 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, see <http://www.gnu.org/licenses/>.
+
+required='hevea'
+
+. ./defs || exit 1
+
+set -e
+
+create_input_tex <<EOF
+\cite{texinfo.doc}
+\bibliographystyle{plain}
+\bibliography{sample}
+EOF
+
+cat >sample.bib <<EOF
+@misc{texinfo.doc,
+ title = "{GNU Texinfo}: The {GNU} documentation format",
+ author = "Robert J. Chassell and Richard M. Stallman",
+ year = "1988"
+}
+EOF
+
+
+# check HTML|INFO|TEXT|DVI|PDF
+# ----------------------------
+check ()
+{
+ out=$1
+ # Testing the local build mode.
+ TEXI2DVI_pass --$out --batch --tidy input.tex
+ # There should only be the DVI and the TEXI file.
+ assert_files input.$out input.tex sample.bib input.t2d
+ cp input.$out /tmp/foo
+ rm input.$out
+}
+
+# Currently we don't use bibtex with hevea. This is to be fixed.
+for out in dvi pdf # html info text
+do
+ check $out
+done
diff --git a/Build/source/utils/texinfo/util/defs.in b/Build/source/utils/texinfo/util/defs.in
new file mode 100644
index 00000000000..f70b1e71a84
--- /dev/null
+++ b/Build/source/utils/texinfo/util/defs.in
@@ -0,0 +1,364 @@
+# -*- shell-script -*-
+# @configure_input@
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+#
+# (This file was originally part of GNU Automake.)
+#
+# 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+
+# Defines for Automake testing environment.
+# Tom Tromey <tromey@cygnus.com>
+
+# Be Bourne compatible.
+# (Snippet copied from configure's initialization in Autoconf 2.57.)
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Ensure we are running from the right directory.
+test -f ./defs || {
+ echo "defs: not found in current directory" 1>&2
+ exit 1
+}
+
+# If srcdir is not set, then we are not running from `make check', be verbose.
+if test -z "$srcdir"; then
+ VERBOSE=x
+ # compute $srcdir.
+ srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
+ test $srcdir = $0 && srcdir=.
+fi
+
+# Ensure $srcdir is set correctly.
+test -f $srcdir/defs.in || {
+ echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
+ exit 1
+}
+
+me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+
+# See how redirections should work. User can set VERBOSE to see all
+# output.
+test -z "$VERBOSE" && {
+ exec > /dev/null 2>&1
+}
+
+# Make sure we override the user shell.
+SHELL='@SHELL@'
+export SHELL
+
+srcdir_abs=`cd $srcdir && pwd`
+test -z "$TEXI2DVI" && TEXI2DVI=$srcdir_abs/texi2dvi
+
+# be sure we use texi2dvi and texindex from our own directory, not
+# whatever happens to be in the path.
+echo "defs: prepending $srcdir_abs to PATH for testing."
+PATH="@abs_builddir@:@abs_srcdir@:$PATH"
+
+# Some shells forget to export modified environment variables.
+# (See note about `export' in the Autoconf manual.)
+export PATH
+
+# User can override various tools used.
+test -z "$PERL" && PERL='@PERL@'
+
+if test -n "$required"
+then
+ for tool in $required
+ do
+ # Check that each required tool is present.
+ case $tool in
+ hevea)
+ # HeVeA supports -version only. Use configure to find it.
+ test -n "@HEVEA@" || exit 77
+ ;;
+ tex)
+ # No all versions of Tex support `--version', so we use
+ # a configure check.
+ test -n "@TEX@" || exit 77
+ ;;
+ # Generic case: the tool must support --version.
+ *)
+ echo "$me: running $tool --version"
+ ( $tool --version ) || exit 77
+ ;;
+ esac
+ done
+fi
+
+
+# Always use an absolute srcdir. Otherwise symlinks made in subdirs
+# of the test dir just won't work.
+case "$srcdir" in
+ [\\/]* | ?:[\\/]*)
+ ;;
+
+ *)
+ srcdir=`CDPATH=: && cd "$srcdir" && pwd`
+ ;;
+esac
+
+chmod -R a+rwx testSubDir > /dev/null 2>&1
+rm -rf testSubDir > /dev/null 2>&1
+mkdir testSubDir
+
+# Copy in some files we need.
+cp $srcdir/../doc/texinfo.tex testSubDir || exit 1
+
+cd ./testSubDir
+
+
+# Unset the user's envvars that might change the behavior.
+unset TEXI2DVI_BUILD_MODE
+unset TEXI2DVI_BUILD_DIRECTORY
+
+echo "=== Running test $0"
+
+# POSIX no longer requires 'egrep' and 'fgrep',
+# but some hosts lack 'grep -E' and 'grep -F'.
+EGREP='@EGREP@'
+FGREP='@FGREP@'
+
+# The amount we should wait after modifying files depends on the platform.
+# For instance, Windows '95, '98 and ME have 2-second granularity
+# and can be up to 3 seconds in the future w.r.t. the system clock.
+sleep='sleep @MODIFICATION_DELAY@'
+
+# The tests call `make -e' but we do not want $srcdir from the environment
+# to override the definition from the Makefile.
+testsrcdir=$srcdir
+unset srcdir
+
+
+# create_input_texi < INPUT
+# -------------------------
+# Create input.texi adding stdin inside a default prologue/epilogue
+create_input_texi ()
+{
+ {
+ cat << END
+\input texinfo @c -*-texinfo-*-
+@setfilename input
+@settitle input
+
+@ifnottex
+@node Top
+@top input
+@end ifnottex
+
+END
+ cat
+ cat << END
+@bye
+END
+ } >input.texi
+}
+
+
+# create_input_tex < INPUT
+# ------------------------
+# Create input.tex adding stdin inside a default prologue/epilogue
+create_input_tex ()
+{
+ {
+ cat << END
+\documentclass{article}
+
+\begin{document}
+END
+ cat
+ cat << END
+\end{document}
+END
+ } >input.tex
+}
+
+
+# TEXI2DVI_run status [options...]
+# --------------------------------
+# Run texi2dvi with OPTIONS, and fail if does not exit with STATUS.
+TEXI2DVI_run ()
+{
+ expected_exitcode=$1
+ shift
+ exitcode=0
+ if test -n "$VERBOSE"; then
+ set x --debug --verbose ${1+"$@"}
+ shift
+ fi
+ texi2dvi ${1+"$@"} 2>stderr >stdout || exitcode=$?
+ cat stderr
+ cat stdout
+ test $exitcode = $expected_exitcode || exit 1
+}
+
+
+# TEXI2DVI_fail [options...]
+# ---------------------------
+# Run texi2dvi with OPTIONS, and fail if does not exit with failure.
+TEXI2DVI_fail ()
+{
+ TEXI2DVI_run 1 ${1+"$@"}
+}
+
+
+# TEXI2DVI_pass [options...]
+# ---------------------------
+# Run texi2dvi with OPTIONS, and fail if does not exit with failure.
+TEXI2DVI_pass ()
+{
+ TEXI2DVI_run 0 ${1+"$@"}
+}
+
+
+# optionset_get N OPTIONSET<1> -- OPTIONSET<2> -- ...
+# ---------------------------------------------------
+# Return OPTIONSET<N>
+optionset_get ()
+{
+ n=$1
+ shift
+ # Find the optionset.
+ while test $n != 1; do
+ case $1 in
+ --) n=`expr $n - 1`;;
+ esac
+ shift
+ done
+ # Return the optionset.
+ while true; do
+ case $#:$1 in
+ 0:) break;;
+ *:--) shift; break;;
+ *) echo "$1"; shift;;
+ esac
+ done
+}
+
+# list_files ()
+# -------------
+# Return the sorted list of files in this directory, except the "invisible" ones.
+list_files ()
+{
+ for f in *
+ do
+ case $f in
+ texinfo.tex | stdout | stderr | ls.expected | ls.value );;
+ *) echo $f;;
+ esac
+ done | sort
+}
+
+
+# assert_files (EXPECTED-FILES)
+# -----------------------------
+# Only those files are valid in the current directory.
+assert_files ()
+{
+ if test -n "$VERBOSE"; then
+ ls
+ fi
+ list_files > ls.value
+ echo "$*" | tr ' ' '\n' | sort > ls.expected
+ diff -u ls.expected ls.value
+}
+
+
+# assert_and_remove_files (EXPECTED-FILES)
+# ----------------------------------------
+# Only those files are valid in the current directory. Remove them
+# afterwards.
+assert_and_remove_files ()
+{
+ assert_files "$@"
+ rm -rf "$@"
+}
+
+
+# title TITLE...
+# --------------
+# Make a huge title to ease the reading of the output.
+title ()
+{
+ (
+ set +x
+ echo " $@ " | sed -e 's/./=/g'
+ echo " $@ "
+ echo " $@ " | sed -e 's/./=/g'
+ )
+}
+
+# $latex_paragraph
+# ----------------
+# Some lengthy LaTeX.
+# grep -E '^[a-zA-Z]+$' /usr/share/dict/words | sed 200q | pr --page-width=76 --column=5 --omit-header
+latex_paragraph='
+A Acrux Aegean Ahmad Albany
+AOL Actaeon Aelfric Ahmadabad Albee
+Aachen Acton Aeneas Ahmed Alberio
+Aaliyah Acts Aeneid Ahriman Albert
+Aaron Acuff Aeolus Aida Alberta
+Abbas Ada Aeroflot Aiken Alberto
+Abbasid Adam Aeschylus Aileen Albigensian
+Abbott Adams Aesculapius Aimee Albion
+Abby Adan Aesop Ainu Albireo
+Abdul Adana Afghan Airedale Albuquerque
+Abe Adar Afghanistan Airedales Alcatraz
+Abel Addams Afghans Aisha Alcestis
+Abelard Adderley Africa Ajax Alcibiades
+Abelson Addie African Akbar Alcmena
+Aberdeen Addison Africans Akhmatova Alcoa
+Abernathy Adela Afrikaans Akihito Alcott
+Abidjan Adelaide Afrikaner Akita Alcuin
+Abigail Adele Afrikaners Akkad Alcyone
+Abilene Adeline Afro Akron Aldan
+Abner Aden Afrocentrism Al Aldebaran
+Abraham Adenauer Afros Ala Alden
+Abram Adhara Ag Alabama Alderamin
+Abrams Adidas Agamemnon Alabaman Aldo
+Absalom Adirondack Agassi Alabamans Aldrin
+Abuja Adirondacks Agassiz Alabamian Alec
+Abyssinia Adkins Agatha Alabamians Aleichem
+Abyssinian Adler Aggie Aladdin Alejandra
+Ac Adolf Aglaia Alamo Alejandro
+Acadia Adolfo Agnes Alamogordo Alembert
+Acapulco Adolph Agnew Alan Aleppo
+Accra Adonis Agni Alana Aleut
+Acevedo Adonises Agra Alar Aleutian
+Achaean Adrian Agricola Alaric Alex
+Achebe Adriana Agrippa Alaska Alexander
+Achernar Adriatic Agrippina Alaskan Alexandra
+Acheson Adrienne Aguilar Alaskans Alexandria
+Achilles Advent Aguinaldo Alba Alexei
+Aconcagua Adventist Aguirre Albania Alexis
+Acosta Advents Agustin Albanian Alfonso
+Acropolis Advil Ahab Albanians Alfonzo
+'
+
+
+# Turn on shell traces when VERBOSE is set.
+if test -n "$VERBOSE"; then
+ set -x
+else
+ :
+fi
+pwd
diff --git a/Build/source/utils/texinfo/util/deref.c b/Build/source/utils/texinfo/util/deref.c
index e08be48105f..98e8ce0563d 100644
--- a/Build/source/utils/texinfo/util/deref.c
+++ b/Build/source/utils/texinfo/util/deref.c
@@ -8,11 +8,11 @@
* Written: December, 1991
* Released: November, 1998
*
- * Copyright, 1991, 1998 Arnold David Robbins
+ * Copyright 1991, 1998 Arnold David Robbins
*
* DEREF 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 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* DEREF is distributed in the hope that it will be useful,
@@ -21,8 +21,7 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
diff --git a/Build/source/utils/texinfo/util/dir-example b/Build/source/utils/texinfo/util/dir-example
index 2b88f5f9217..eac9490af52 100644
--- a/Build/source/utils/texinfo/util/dir-example
+++ b/Build/source/utils/texinfo/util/dir-example
@@ -10,7 +10,7 @@ rms suggested that we follow the categories of the Free Software
If you have dir entries for Texinfo manuals you'd like to be added here,
please send them to karl@gnu.org.
-$Id: dir-example,v 1.51 2004/12/18 02:11:43 karl Exp $
+$Id: dir-example,v 1.77 2008/03/25 15:09:14 karl Exp $

File: dir, Node: Top, This is the top of the INFO tree.
@@ -33,17 +33,18 @@ Basics
* Coreutils: (coreutils). Core GNU (file, text, shell) utilities.
* DC: (dc). Postfix desk calculator.
* Date input formats: (coreutils)Date input formats.
+* Ed: (ed). The GNU line editor.
* File permissions: (coreutils)File permissions. Access modes.
* Finding files: (find). Operating on files matching certain criteria.
* Gcal: (gcal). GNU calendar program.
+* Hello: (hello). Hello, GNU world.
* Time: (time). Measuring program resource usage.
Text creation and manipulation
* Diffutils: (diff). Comparing and merging files.
-* Ed: (ed). Line editor.
* Gawk: (gawk). A text scanning and processing language.
+* M4: (m4). A powerful macro processor.
* grep: (grep). Print lines matching a pattern.
-* m4: (m4). General-purpose text macro processor.
* sed: (sed). Stream EDitor.
* Wdiff: (wdiff). Word difference finder and related tools.
@@ -76,11 +77,12 @@ Network applications
* Wget: (wget). Non-interactive network downloader.
Printing Tools
-* a2ps: (a2ps). PostScript Generating Utility
* PreScript: (a2ps) PreScript. Input language for a2ps
+* a2ps: (a2ps). PostScript Generating Utility
* card: (a2ps) card. Print Reference Cards
-* fixps: (a2ps) fixps. Fixing Some Ill Designed PostScript Files
* fixnt: (a2ps) fixnt. Fixing Microsoft NT PostScript Files
+* fixps: (a2ps) fixps. Fixing Some Ill Designed PostScript Files
+* ogonkify: (ogonkify). Ogonkify
* pdiff: (a2ps) pdiff. Produce Pretty Comparison of Files
* psmandup: (a2ps) psmandup. Printing Duplex on Simplex Printers
* psset: (a2ps) psset. Inserting calls to setpagedevice
@@ -88,14 +90,15 @@ Printing Tools
Software development
* As: (as). Assembler.
* Autoconf: (autoconf). Create source code configuration scripts.
-* Binutils: (binutils). ar/copy/objdump/nm/size/strip/ranlib.
-* automake: (automake). Making Makefile.in's.
-* bison: (bison). GNU parser generator (Yacc replacement).
+* Automake: (automake). Making GNU standards-compliant Makefiles.
+* Binutils: (binutils). The GNU binary utilities.
* Cpp: (cpp). The GNU C preprocessor.
* Cpplib: (cppinternals). Cpplib internals.
-* CVS: (cvs). Concurrent versions system for source control.
+* CVS: (cvs). Concurrent Versions System
* DejaGnu: (dejagnu). Testing framework.
+* Dmalloc: (dmalloc). Malloc debug library.
* Gdb: (gdb). The GNU debugger.
+* bison: (bison). GNU parser generator (Yacc replacement).
* egcs: (egcs). Experimental GNU C compiler.
* Flex: (flex). A fast scanner generator.
* g77: (g77). GNU Fortran 77 compiler.
@@ -109,7 +112,7 @@ Software development
* Gprof: (gprof). Profiler.
* Guile Reference: (guile). The Guile reference manual.
* Guile Tutorial: (guile-tut). The Guile Tutorial.
-* Identifier DB: (id-utils). Identifier database utilities.
+* ID database: (id-utils). Identifier database utilities.
* Indent: (indent). Prettyprinter for programs.
* Ld: (ld). Linker.
* Libtool: (libtool). Generic library support script.
@@ -123,7 +126,7 @@ Emacs
* Ada mode: (ada-mode). The GNU Emacs mode for editing Ada.
* Autotype: (autotype). Convenient features for text that you enter frequently
in Emacs.
-* CC Mode: (ccmode). Emacs mode for editing C, C++, Objective-C,
+* CC Mode: (ccmode). Emacs mode for editing C, C++, Objective-C,
Java, Pike, and IDL code.
* CL: (cl). Partial Common Lisp support for Emacs Lisp.
* Dired-X: (dired-x). Dired Extra Features.
@@ -131,7 +134,7 @@ Emacs
* Ebrowse: (ebrowse). A C++ class browser for Emacs.
* Ediff: (ediff). A visual interface for comparing and merging programs.
* Emacs: (emacs). The extensible self-documenting text editor.
-* Elisp: (elisp). GNU Emacs Lisp reference manual.
+* Elisp: (elisp). The Emacs Lisp Reference Manual.
* Emacs FAQ: (efaq). Frequently Asked Questions about Emacs.
* Emacs MIME: (emacs-mime). The MIME de/composition library.
* Eshell: (eshell). A command shell implemented in Emacs Lisp.
@@ -167,7 +170,6 @@ Typesetting
GNU Gettext Utilities
* ISO3166: (gettext)Country Codes. ISO 3166 country codes.
* ISO639: (gettext)Language Codes. ISO 639 language codes.
-* xgettext: (gettext)xgettext Invocation. Extract strings into a PO file.
* autopoint: (gettext)autopoint Invocation. Copy gettext infrastructure.
* envsubst: (gettext)envsubst Invocation. Expand environment variables.
* gettext: (gettext). GNU gettext utilities.
@@ -187,11 +189,11 @@ GNU Gettext Utilities
* msgunfmt: (gettext)msgunfmt Invocation. Uncompile MO file into PO file.
* msguniq: (gettext)msguniq Invocation. Unify duplicates for PO file.
* ngettext: (gettext)ngettext Invocation. Translate a message with plural.
+* xgettext: (gettext)xgettext Invocation. Extract strings into a PO file.
Software libraries
* Annotate: (annotate). High-level GDB to GUI's.
* Bfd: (bfd). The Binary File Descriptor library.
-* CVS protocol: (cvsclient). CVS client/server protocol specification.
* Gdb-Internals: (gdbint). The GNU debugger's internals.
* GDB library: (libgdb). Application programming interface to GDB.
* GDBM: (gdbm). Hashed databases.
@@ -203,18 +205,16 @@ Software libraries
* Mmalloc: (mmalloc). The GNU mapped-malloc package.
* Stabs: (stabs). The "stabs" debugging information format.
* Readline: (readline). General command-line interface.
-* Regex: (regex). Regular expressions.
* Termcap: (termcap). All about /etc/termcap.
C++ libraries
* Iostream: (iostream). C++ input/output.
-* Libg++: (libg++). C++ classes.
* autosprintf: (autosprintf). Support for printf format strings in C++.
GNU organization
* Maintain: (maintain). GNU maintainer guidelines.
+* Maintaining Findutils: (find-maint). Maintaining GNU findutils.
* Standards: (standards). GNU coding standards.
-* Tasks: (tasks). GNU task list.
GNU music project
* LilyPond: (lilypond). The GNU music typesetter.
@@ -234,7 +234,7 @@ TeX
* DVI-to-PNG: (dvipng). DVI to Portable Network Graphics (PNG).
* Eplain: (eplain). Expanding on plain TeX.
* Kpathsearch: (kpathsea). File lookup along search paths.
-* LaTeX: (latex). LaTeX.
+* LaTeX: (latex2e). LaTeX2e.
* MakeIndex: (makeindex). Index creation for TeX.
* Naming TeX fonts: (fontname). Filenames for TeX fonts.
* TDS: (tds). Standard TeX directory structure.
@@ -249,41 +249,30 @@ Science
* R FAQ: (R-FAQ). The R statistical language FAQ.
Other things
-* Amd: (am-utils). Filesystem automounter.
-* CMUCL: (cmu-user). CMU Common Lisp.
-* File headers: (filehdr). Bibliographic information for computer files.
-* GCP: (gcp). Game club protocol.
-* GIMP: (pdb). The GIMP procedural database.
-* HTML: (snafu). Hypertext Markup Language 2.0 specification.
* Jargon: (jargon). The jargon file.
* Netpbm: (netpbm). Images/graphics manipulation programs.
* JED: (jed). JED editor documentation.
-* octave: (octave). Octave - A language for numerical computation.
-* Perl: (perl). Practical extraction and report language.
+* Octave: (octave). Octave - A language for numerical computation.
* PRCS: (prcs). Project revision control system.
* Screen: (screen). Terminal multiplexer.
Individual utilities
* aclocal: (automake)Invoking aclocal. Generating aclocal.m4.
-* aid: (id-utils)aid invocation. Matching strings.
-* ar: (binutils)ar. Create/modify/extract archives.
+* addr2line: (binutils)addr2line. Convert addresses to file and line.
+* ar: (binutils)ar. Create, modify, and extract from archives.
* at-pr: (gnats)at-pr. Bug report timely reminders.
-* autoconf: (autoconf)autoconf Invocation.
- How to create configuration scripts
-* autoheader: (autoconf)autoheader Invocation.
- How to create configuration templates
-* autom4te: (autoconf)autom4te Invocation.
- The Autoconf executables backbone
-* autoreconf: (autoconf)autoreconf Invocation.
- Remaking multiple `configure' scripts
-* autoscan: (autoconf)autoscan Invocation.
- Semi-automatic `configure.ac' writing
-* autoupdate: (autoconf)autoupdate Invocation.
- Automatic update of `configure.ac'
+* autoconf: (autoconf)autoconf Invocation. How to create configuration scripts.
+* autoheader: (autoconf)autoheader Invocation. How to create configuration templates
+* autom4te: (autoconf)autom4te Invocation. The Autoconf executables backbone.
+* automake: (automake)Invoking Automake. Generating Makefile.in.
+* autoreconf: (autoconf)autoreconf Invocation. Remaking multiple `configure' scripts
+* autoscan: (autoconf)autoscan Invocation. Semi-automatic `configure.ac' writing
+* autoupdate: (autoconf)autoupdate Invocation. Automatic update of `configure.ac'
* awk: (gawk)Invoking gawk. Text scanning and processing.
+* base64: (coreutils)base64 invocation. Base64 encode/decode data.
* basename: (coreutils)basename invocation. Strip directory and suffix.
* bibtex: (web2c)BibTeX invocation. Maintaining bibliographies.
-* c++filt: (binutils)c++filt. Demangle C++ symbols.
+* c++filt: (binutils)c++filt. Filter to demangle encoded C++ symbols.
* cat: (coreutils)cat invocation. Concatenate and write files.
* chgrp: (coreutils)chgrp invocation. Change file groups.
* chmod: (coreutils)chmod invocation. Change file permissions.
@@ -298,14 +287,18 @@ Individual utilities
* cp: (coreutils)cp invocation. Copy files.
* csplit: (coreutils)csplit invocation. Split by context.
* cut: (coreutils)cut invocation. Print selected parts of lines.
+* cvs: (cvs)CVS commands. Concurrent Versions System
+* cvsclient: (cvsclient). The CVS client/server protocol.
+* cxxfilt: (binutils)c++filt. MS-DOS name for c++filt.
* date: (coreutils)date invocation. Print/set system date and time.
* dd: (coreutils)dd invocation. Copy and convert a file.
-* df: (coreutils)df invocation. Report filesystem disk usage.
-* diff: (diff)Invoking diff. Compare 2 files line by line.
+* df: (coreutils)df invocation. Report file system disk usage.
* diff3: (diff)Invoking diff3. Compare 3 files line by line.
+* diff: (diff)Invoking diff. Compare 2 files line by line.
* dir: (coreutils)dir invocation. List directories briefly.
* dircolors: (coreutils)dircolors invocation. Color setup for ls.
* dirname: (coreutils)dirname invocation. Strip non-directory suffix.
+* dlltool: (binutils)dlltool. Create files needed to build and use DLLs.
* dmp: (web2c)Dmp invocation. Troff->MPX (MetaPost pictures).
* du: (coreutils)du invocation. Report on disk usage.
* dvicopy: (web2c)DVIcopy invocation. Virtual font expansion
@@ -315,24 +308,25 @@ Individual utilities
* echo: (coreutils)echo invocation. Print a line of text.
* edit-pr: (gnats)Invoking edit-pr. Changing bugs.
* egrep: (grep)Invoking. grep -E.
-* eid: (id-utils)eid invocation. Invoking an editor on matches.
* env: (coreutils)env invocation. Modify the environment.
* expand: (coreutils)expand invocation. Convert tabs to spaces.
* expr: (coreutils)expr invocation. Evaluate expressions.
* factor: (coreutils)factor invocation. Print prime factors
* false: (coreutils)false invocation. Do nothing, unsuccessfully.
* fgrep: (fgrep)Invoking. grep -F.
-* fid: (id-utils)fid invocation. Listing a file's identifiers.
+* fid: (id-utils)fid invocation. Listing a file's tokens.
* file-pr: (gnats)file-pr. Processing incoming traffic.
* find: (find)Invoking find. Finding and acting on files.
* fmt: (coreutils)fmt invocation. Reformat paragraph text.
+* fnid: (id-utils)fnid invocation. Looking up file names.
* fold: (coreutils)fold invocation. Wrap long input lines.
* frm: (mailutils)frm. List headers from a mailbox.
+* ftp: (inetutils)ftp invocation. File Transfer Protocol.
+* ftpd: (inetutils)ftpd invocation. FTP Daemon.
* gcal2txt: (gcal)Invoking gcal2txt. Calendar resource to text file.
* gftodvi: (web2c)GFtoDVI invocation. Generic font proofsheets.
* gftopk: (web2c)GFtoPK invocation. Generic to packed fonts.
* gftype: (web2c)GFtype invocation. GF to human-readable text.
-* gid: (id-utils)gid invocation. Listing all matching lines.
* git: (git). GNU interactive tools.
* groups: (coreutils)groups invocation. Print group names a user is in.
* guimb: (mailutils)guimb. Mailbox processing language.
@@ -341,11 +335,10 @@ Individual utilities
* head: (coreutils)head invocation. Output the first part of files.
* hostid: (coreutils)hostid invocation. Print numeric host identifier.
* hostname: (coreutils)hostname invocation. Print or set system name.
-* id: (coreutils)id invocation. Print real/effective uid/gid.
-* idx: (id-utils)idx invocation. Testing mkid scanners.
+* id: (coreutils)id invocation. Print user identity.
* ifnames: (autoconf)ifnames Invocation. Listing conditionals in source.
-* iid: (id-utils)iid invocation. Interactive complex queries.
* imap4d: (mailutils)imap4d. IMAP4 daemon.
+* inetd: (inetutils)inetd invocation. Internet super-server.
* inimf: (web2c)inimf invocation. Initial Metafont.
* inimp: (web2c)inimp invocation. Initial MetaPost.
* initex: (web2c)initex invocation. Initial TeX.
@@ -354,10 +347,11 @@ Individual utilities
* kill: (coreutils)kill invocation. Send a signal to processes.
* kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching.
* libtoolize: (libtool)Invoking libtoolize. Adding libtool support.
-* lid: (id-utils)lid invocation. Matching identifier patterns.
+* lid: (id-utils)lid invocation. Matching words and patterns.
* link: (coreutils)link invocation. Make hard links between files.
* ln: (coreutils)ln invocation. Make links between files.
* locate: (find)Invoking locate. Finding files in a database.
+* logger: (inetutils)logger invocation. Logger.
* logname: (coreutils)logname invocation. Print current login name.
* ls: (coreutils)ls invocation. List directory contents.
* mail-files: (sharutils)mail-files invocation. Send files to remote site.
@@ -369,7 +363,7 @@ Individual utilities
* maketexpk: (kpathsea)MakeTeX scripts. PK bitmap generation.
* maketextex: (kpathsea)MakeTeX scripts. TeX source generation.
* maketextfm: (kpathsea)MakeTeX scripts. TeX font metric generation.
-* md5sum: (coreutils)md5sum invocation. Print or check message-digests.
+* md5sum: (coreutils)md5sum invocation. Print or check MD5 digests.
* mdiff: (wdiff)mdiff invocation. Line cluster finder.
* messages: (mailutils)messages. Count messages in mailbox.
* mf: (web2c)mf invocation. Creating typeface families.
@@ -377,65 +371,78 @@ Individual utilities
* mgetty: (mgetty). Faxes, voicemail and more.
* mkdir: (coreutils)mkdir invocation. Create directories.
* mkfifo: (coreutils)mkfifo invocation. Create FIFOs (named pipes).
-* mkid: (id-utils)mkid invocation. Creating an ID database.
+* mkid: (id-utils)mkid invocation. Creating an ID database.
* mknod: (coreutils)mknod invocation. Create special files.
* mp: (web2c)mp invocation. Creating technical diagrams.
* mpto: (web2c)MPto invocation. MetaPost label extraction.
* mv: (coreutils)mv invocation. Rename files.
+* networking(inet) utilities: (inetutils). GNU networking utilities.
* newer: (web2c)Newer invocation. Compare modification times.
-* nice: (coreutils)nice invocation. Modify scheduling priority.
+* nice: (coreutils)nice invocation. Modify niceness.
* nl: (coreutils)nl invocation. Number lines and write files.
-* nlmconv: (binutils)nlmconv. Convert object to NetWare LM.
-* nm: (binutils)nm. List symbols in object files.
+* nlmconv: (binutils)nlmconv. Converts object code into an NLM.
+* nm: (binutils)nm. List symbols from object files.
* nohup: (coreutils)nohup invocation. Immunize to hangups.
-* objcopy: (binutils)objcopy. Copy/translate object files.
-* objdump: (binutils)objdump. Display info from object files.
+* objcopy: (binutils)objcopy. Copy and translate object files.
+* objdump: (binutils)objdump. Display information from object files.
* od: (coreutils)od invocation. Dump files in octal, etc.
* paste: (coreutils)paste invocation. Merge lines of files.
* patch: (diff)Invoking patch. Apply a patch to a file.
* patgen: (web2c)Patgen invocation. Creating hyphenation patterns.
* pathchk: (coreutils)pathchk invocation. Check file name portability.
-* pid: (id-utils)pid invocation. Looking up filenames.
+* ping: (inetutils)ping invocation. Packets to network hosts.
* pktogf: (web2c)PKtoGF invocation. Packed to generic fonts.
* pktype: (web2c)PKtype invocation. PK to human-readable text.
* pltotf: (web2c)PLtoTF invocation. Property list to TFM.
* pooltype: (web2c)Pooltype invocation. Display WEB pool files.
* pop3d: (mailutils)pop3d. POP3 daemon.
-* pr: (coreutils)pr invocation. Paginate or columnate files.
* pr-addr: (gnats)pr-addr. Bug report address retrieval.
* pr-edit: (gnats)pr-edit. The edit-pr driver.
+* pr: (coreutils)pr invocation. Paginate or columnate files.
* printenv: (coreutils)printenv invocation. Print environment variables.
* printf: (coreutils)printf invocation. Format and print data.
-* protoize: (gcc)Running Protoize. Add prototypes to sources.
* ptx: (coreutils)ptx invocation. Produce permuted indexes.
* pwd: (coreutils)pwd invocation. Print working directory.
* query-pr: (gnats)Invoking query-pr. Bug searching/reporting.
* queue-pr: (gnats)queue-pr. Handling incoming traffic.
-* ranlib: (binutils)ranlib. Index archive file contents.
+* ranlib: (binutils)ranlib. Generate index to archive contents.
+* rcp: (inetutils)rcp invocation. Strip non-directory suffix.
+* readelf: (binutils)readelf. Display the contents of ELF format files.
* readlink: (coreutils)readlink invocation. Print referent of a symlink.
* readmsg: (mailutils)readmsg. Extract messages from a folder.
+* rexecd: (inetutils)rexecd invocation. Remote execution server.
+* rlogin: (inetutils)rlogin invocation. Remote login.
+* rlogind: (inetutils)rlogind invocation. Remote login server.
* rm: (coreutils)rm invocation. Remove files.
* rmdir: (coreutils)rmdir invocation. Remove empty directories.
+* rsh: (inetutils)rsh invocation. Remote shell.
+* rshd: (inetutils)rshd invocation. Remote shell server.
* sdiff: (diff)Invoking sdiff. Merge 2 files side-by-side.
* send-pr: (gnats)Invoking send-pr. Submitting bugs.
* seq: (coreutils)seq invocation. Print numeric sequences
-* shar: (sharutils)shar invocation. Create shell archive.
+* sha1sum: (coreutils)sha1sum invocation. Print or check SHA-1 digests.
+* sha2: (coreutils)sha2 utilities. Print or check SHA-2 digests.
+* shar: (sharutils)shar invocation. Make a shell archive.
* shred: (coreutils)shred invocation. Remove files more securely.
+* shuf: (coreutils)shuf invocation. Shuffling text files.
* sieve: (mailutils)sieve. Mail filtering utility.
-* size: (binutils)size. List object file section sizes.
+* size: (binutils)size. List section sizes and total size.
* sleep: (coreutils)sleep invocation. Delay for a specified time.
* sort: (coreutils)sort invocation. Sort text files.
* split: (coreutils)split invocation. Split into fixed-size pieces.
* stat: (coreutils)stat invocation. Report file(system) status.
-* strings: (binutils)strings. List printable strings.
-* strip: (binutils)strip. Discard symbols.
+* strings: (binutils)strings. List printable strings from files.
+* strip: (binutils)strip. Discard symbols.
* stty: (coreutils)stty invocation. Print/change terminal settings.
-* su: (coreutils)su invocation. Modify user and group id.
+* su: (coreutils)su invocation. Modify user and group ID.
* sum: (coreutils)sum invocation. Print traditional checksum.
* sync: (coreutils)sync invocation. Synchronize memory and disk.
+* syslogd: (inetutils)syslogd invocation. Syslog server.
* tabs: (tput)Invoking tabs. Tab settings.
* tac: (coreutils)tac invocation. Reverse files.
* tail: (coreutils)tail invocation. Output the last part of files.
+* talk: (inetutils)talk invocation. Talk client.
+* talkd: (inetutils)talkd invocation. Talk server.
* tangle: (web2c)Tangle invocation. WEB to Pascal.
* tar: (tar)tar invocation. Invoking GNU `tar'.
* tcal: (gcal)Invoking tcal. Run Gcal with tomorrow's date.
@@ -444,6 +451,7 @@ Individual utilities
* testsuite: (autoconf)testsuite Invocation. Running an Autotest test suite.
* tex: (web2c)tex invocation. Typesetting.
* tftopl: (web2c)TFtoPL invocation. TFM -> property list.
+* tftp: (inetutils)tftp invocation. Trivial FTP.
* touch: (coreutils)touch invocation. Change file timestamps.
* tput: (tput)Invoking tput. Termcap in shell scripts.
* tr: (coreutils)tr invocation. Translate characters.
@@ -457,10 +465,11 @@ Individual utilities
* unify: (wdiff)unify invocation. Diff format converter.
* uniq: (coreutils)uniq invocation. Uniquify files.
* unlink: (coreutils)unlink invocation. Removal via unlink(2).
-* unprotoize: (gcc)Running Protoize. Remove prototypes from sources.
-* unshar: (sharutils)unshar invocation. Extract from shell archive.
+* unshar: (sharutils)unshar invocation. Explode a shell archive.
* updatedb: (find)Invoking updatedb. Building the locate database.
* users: (coreutils)users invocation. Print current user names.
+* uudecode: (sharutils)uudecode invocation. Restore file from 7-bits.
+* uuencode: (sharutils)uuencode invocation. Force binary file to 7-bits.
* vdir: (coreutils)vdir invocation. List directories verbosely.
* vftovp: (web2c)VFtoVP invocation. Virtual font -> virtual pl.
* view-pr: (gnats)Invoking view-pr. Showing bug reports.
@@ -471,8 +480,11 @@ Individual utilities
* wc: (coreutils)wc invocation. Line, word, and byte counts.
* weave: (web2c)Weave invocation. WEB to TeX.
* who: (coreutils)who invocation. Print who is logged in.
-* whoami: (coreutils)whoami invocation. Print effective user id.
+* whoami: (coreutils)whoami invocation. Print effective user ID.
+* windmc: (binutils)windmc. Generator for Windows message resources.
+* windres: (binutils)windres. Manipulate Windows resources.
* xargs: (find)Invoking xargs. Operating on many files.
+* xtokid: (id-utils)xtokid invocation. Testing mkid scanners.
* yes: (coreutils)yes invocation. Print a string indefinitely.
* zcat: (gzip)Overview. Decompression to stdout.
* zdiff: (gzip)Overview. Compare compressed files.
diff --git a/Build/source/utils/texinfo/util/dvipdf.test b/Build/source/utils/texinfo/util/dvipdf.test
new file mode 100755
index 00000000000..f66375be55d
--- /dev/null
+++ b/Build/source/utils/texinfo/util/dvipdf.test
@@ -0,0 +1,66 @@
+#! /bin/sh
+# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Texinfo.
+#
+# GNU Texinfo 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 3 of the License,
+# or (at your option) any later version.
+#
+# GNU Texinfo 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, see <http://www.gnu.org/licenses/>.
+
+required='tex'
+
+. ./defs || exit 1
+
+set -e
+
+# one_run ARGS -- FILES
+# ---------------------
+# Run texi2dvi with ARGS, expect the FILES to be left. Remove them.
+one_run ()
+{
+ # Use pstricks.
+ cat >input.tex <<EOF
+\documentclass[a4paper]{article}
+\usepackage{pst-node}
+\pagestyle{empty}
+\begin{document}
+\begin{psmatrix}
+ A & B & C & D & E & F
+\end{psmatrix}
+\psset{arrows=->}
+\nccircle{1,1}{0.5}
+\nccircle[angleA=30]{1,2}{0.4}
+\nccircle[arrows=-,nodesep=0.05]{1,3}{0.2}
+\ncloop[angleB=180]{1,4}{1,4}
+\ncloop[angleB=180,linearc=0.35,nodesep=0.1]{1,5}{1,5}
+\ncloop[angleB=180,linearc=0.15,loopsize=0.4]{1,6}{1,6}
+
+\vspace{1cm}
+\begin{psmatrix}
+ A & B & C & D
+\end{psmatrix}
+\psset{arrows=->,nodesep=0.05}
+\ncangles[armA=0.8,armB=0,angleA=70,angleB=110,linearc=0.22]{1,1}{1,1}
+\ncdiag[arm=0.9,angleA=70,angleB=110,linearc=0.3]{1,2}{1,2}
+\ncdiag[arm=0.8,angleA=50,angleB=130,linearc=0.25]{1,3}{1,3}
+\ncdiag[arm=0.8,angleA=50,angleB=130,linearc=0.28]{1,4}{1,4}
+\end{document}
+EOF
+
+ TEXI2DVI_pass $(optionset_get 1 "$@") input.tex
+ # There should only be the expected and input files.
+ assert_and_remove_files $(optionset_get 2 "$@") input.tex
+}
+
+one_run --dvipdf --batch --clean \
+ -- \
+ input.pdf
diff --git a/Build/source/utils/texinfo/util/fixref.gawk b/Build/source/utils/texinfo/util/fixref.gawk
index f0e3cf6d606..4a692f7b7b1 100644
--- a/Build/source/utils/texinfo/util/fixref.gawk
+++ b/Build/source/utils/texinfo/util/fixref.gawk
@@ -1,12 +1,11 @@
#! /usr/local/bin/gawk -f
# fixref.awk --- fix xrefs in texinfo documents
-# Copyright, 1991, Arnold David Robbins, arnold@skeeve.atl.ga.us
-# Copyright, 1998, Arnold David Robbins, arnold@gnu.org
+# Copyright 1991, 1998 Arnold David Robbins
# FIXREF 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 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# FIXREF is distributed in the hope that it will be useful,
@@ -15,8 +14,7 @@
# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Updated: Jul 21 1992 --- change unknown
# Updated: Jul 18 1997 --- bug fix
diff --git a/Build/source/utils/texinfo/util/gendocs.sh b/Build/source/utils/texinfo/util/gendocs.sh
index 27d4f52d653..5247034fe0b 100755
--- a/Build/source/utils/texinfo/util/gendocs.sh
+++ b/Build/source/utils/texinfo/util/gendocs.sh
@@ -1,14 +1,16 @@
#!/bin/sh
# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
-# $Id: gendocs.sh,v 1.13 2004/09/01 11:40:20 karl Exp $
-#
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+scriptversion=2008-03-05.14
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
#
# 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.
+# the Free Software Foundation; either version 3 of the License,
+# 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
@@ -16,35 +18,33 @@
# 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.
-#
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
# Original author: Mohit Agarwal.
# Send bug reports and any other correspondence to bug-texinfo@gnu.org.
-prog="`basename \"$0\"`"
+prog=`basename "$0"`
srcdir=`pwd`
-scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs.sh"
-templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs_template"
+scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh"
+templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template"
+: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
: ${MAKEINFO="makeinfo"}
: ${TEXI2DVI="texi2dvi -t @finalout"}
: ${DVIPS="dvips"}
-: ${DOCBOOK2TXT="docbook2txt"}
: ${DOCBOOK2HTML="docbook2html"}
: ${DOCBOOK2PDF="docbook2pdf"}
: ${DOCBOOK2PS="docbook2ps"}
+: ${DOCBOOK2TXT="docbook2txt"}
: ${GENDOCS_TEMPLATE_DIR="."}
+: ${TEXI2HTML="texi2html"}
unset CDPATH
+unset use_texi2html
-rcs_revision='$Revision: 1.13 $'
-rcs_version=`set - $rcs_revision; echo $2`
-program=`echo $0 | sed -e 's!.*/!!'`
-version="gendocs.sh $rcs_version
+version="gendocs.sh $scriptversion
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2007 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."
@@ -58,7 +58,8 @@ See the GNU Maintainers document for a more extensive discussion:
Options:
-o OUTDIR write files into OUTDIR, instead of manual/.
--docbook convert to DocBook too (xml, txt, html, pdf and ps).
- --html ARG pass indicated ARG to makeinfo for HTML targets.
+ --html ARG pass indicated ARG to makeinfo or texi2html for HTML targets.
+ --texi2html use texi2html to generate HTML targets.
--help display this help and exit successfully.
--version display version information and exit successfully.
@@ -85,16 +86,27 @@ times with different YOURMANUAL values, specifying a different output
directory with -o each time. Then write (by hand) an overall index.html
with links to them all.
+If a manual's texinfo sources are spread across several directories,
+first copy or symlink all Texinfo sources into a single directory.
+(Part of the script's work is to make a tar.gz of the sources.)
+
You can set the environment variables MAKEINFO, TEXI2DVI, and DVIPS to
control the programs that get executed, and GENDOCS_TEMPLATE_DIR to
-control where the gendocs_template file is looked for.
+control where the gendocs_template file is looked for. (With --docbook,
+the environment variables DOCBOOK2HTML, DOCBOOK2PDF, DOCBOOK2PS, and
+DOCBOOK2TXT are also respected.)
+
+By default, makeinfo is run in the default (English) locale, since
+that's the language of most Texinfo manuals. If you happen to have a
+non-English manual and non-English web site, check the SETLANG setting
+in the source.
Email bug reports or enhancement requests to bug-texinfo@gnu.org.
"
calcsize()
{
- size="`ls -ksl $1 | awk '{print $1}'`"
+ size=`ls -ksl $1 | awk '{print $1}'`
echo $size
}
@@ -110,6 +122,7 @@ while test $# -gt 0; do
-o) shift; outdir=$1;;
--docbook) docbook=yes;;
--html) shift; html=$1;;
+ --texi2html) use_texi2html=1;;
-*)
echo "$0: Unknown or ambiguous option \`$1'." >&2
echo "$0: Try \`--help' for more information." >&2
@@ -127,11 +140,11 @@ while test $# -gt 0; do
shift
done
-if test -s $srcdir/$PACKAGE.texinfo; then
+if test -s "$srcdir/$PACKAGE.texinfo"; then
srcfile=$srcdir/$PACKAGE.texinfo
-elif test -s $srcdir/$PACKAGE.texi; then
+elif test -s "$srcdir/$PACKAGE.texi"; then
srcfile=$srcdir/$PACKAGE.texi
-elif test -s $srcdir/$PACKAGE.txi; then
+elif test -s "$srcdir/$PACKAGE.txi"; then
srcfile=$srcdir/$PACKAGE.txi
else
echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2
@@ -146,91 +159,123 @@ fi
echo Generating output formats for $srcfile
-cmd="${MAKEINFO} -o $PACKAGE.info $srcfile"
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\""
echo "Generating info files... ($cmd)"
-$cmd
+eval "$cmd"
mkdir -p $outdir/
tar czf $outdir/$PACKAGE.info.tar.gz $PACKAGE.info*
-info_tgz_size="`calcsize $outdir/$PACKAGE.info.tar.gz`"
+info_tgz_size=`calcsize $outdir/$PACKAGE.info.tar.gz`
# do not mv the info files, there's no point in having them available
# separately on the web.
-cmd="${TEXI2DVI} $srcfile"
+cmd="${TEXI2DVI} \"$srcfile\""
echo "Generating dvi ... ($cmd)"
-$cmd
+eval "$cmd"
# now, before we compress dvi:
echo Generating postscript...
${DVIPS} $PACKAGE -o
gzip -f -9 $PACKAGE.ps
-ps_gz_size="`calcsize $PACKAGE.ps.gz`"
+ps_gz_size=`calcsize $PACKAGE.ps.gz`
mv $PACKAGE.ps.gz $outdir/
# compress/finish dvi:
gzip -f -9 $PACKAGE.dvi
-dvi_gz_size="`calcsize $PACKAGE.dvi.gz`"
+dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
mv $PACKAGE.dvi.gz $outdir/
-cmd="${TEXI2DVI} --pdf $srcfile"
+cmd="${TEXI2DVI} --pdf \"$srcfile\""
echo "Generating pdf ... ($cmd)"
-$cmd
-pdf_size="`calcsize $PACKAGE.pdf`"
+eval "$cmd"
+pdf_size=`calcsize $PACKAGE.pdf`
mv $PACKAGE.pdf $outdir/
-cmd="${MAKEINFO} -o $PACKAGE.txt --no-split --no-headers $srcfile"
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
echo "Generating ASCII... ($cmd)"
-$cmd
-ascii_size="`calcsize $PACKAGE.txt`"
+eval "$cmd"
+ascii_size=`calcsize $PACKAGE.txt`
gzip -f -9 -c $PACKAGE.txt >$outdir/$PACKAGE.txt.gz
-ascii_gz_size="`calcsize $outdir/$PACKAGE.txt.gz`"
+ascii_gz_size=`calcsize $outdir/$PACKAGE.txt.gz`
mv $PACKAGE.txt $outdir/
-cmd="${MAKEINFO} --no-split --html -o $PACKAGE.html $html $srcfile"
-echo "Generating monolithic html... ($cmd)"
-rm -rf $PACKAGE.html # in case a directory is left over
-$cmd
-html_mono_size="`calcsize $PACKAGE.html`"
-gzip -f -9 -c $PACKAGE.html >$outdir/$PACKAGE.html.gz
-html_mono_gz_size="`calcsize $outdir/$PACKAGE.html.gz`"
-mv $PACKAGE.html $outdir/
-
-cmd="${MAKEINFO} --html -o $PACKAGE.html $html $srcfile"
-echo "Generating html by node... ($cmd)"
-$cmd
-split_html_dir=$PACKAGE.html
-(
- cd ${split_html_dir} || exit 1
- tar -czf ../$outdir/${PACKAGE}.html_node.tar.gz -- *.html
-)
-html_node_tgz_size="`calcsize $outdir/${PACKAGE}.html_node.tar.gz`"
-rm -f $outdir/html_node/*.html
-mkdir -p $outdir/html_node/
-mv ${split_html_dir}/*.html $outdir/html_node/
-rmdir ${split_html_dir}
+html_split() {
+ cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html --split=$1 $html --node-files \"$srcfile\""
+ echo "Generating html by $1... ($cmd)"
+ eval "$cmd"
+ split_html_dir=$PACKAGE.html
+ (
+ cd ${split_html_dir} || exit 1
+ ln -sf ${PACKAGE}.html index.html
+ tar -czf ../$outdir/${PACKAGE}.html_$1.tar.gz -- *.html
+ )
+ eval html_$1_tgz_size=`calcsize $outdir/${PACKAGE}.html_$1.tar.gz`
+ rm -f $outdir/html_$1/*.html
+ mkdir -p $outdir/html_$1/
+ mv ${split_html_dir}/*.html $outdir/html_$1/
+ rmdir ${split_html_dir}
+}
+
+if test -z "$use_texi2html"; then
+ cmd="$SETLANG $MAKEINFO --no-split --html -o $PACKAGE.html $html \"$srcfile\""
+ echo "Generating monolithic html... ($cmd)"
+ rm -rf $PACKAGE.html # in case a directory is left over
+ eval "$cmd"
+ html_mono_size=`calcsize $PACKAGE.html`
+ gzip -f -9 -c $PACKAGE.html >$outdir/$PACKAGE.html.gz
+ html_mono_gz_size=`calcsize $outdir/$PACKAGE.html.gz`
+ mv $PACKAGE.html $outdir/
+
+ cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $html \"$srcfile\""
+ echo "Generating html by node... ($cmd)"
+ eval "$cmd"
+ split_html_dir=$PACKAGE.html
+ (
+ cd ${split_html_dir} || exit 1
+ tar -czf ../$outdir/${PACKAGE}.html_node.tar.gz -- *.html
+ )
+ html_node_tgz_size=`calcsize $outdir/${PACKAGE}.html_node.tar.gz`
+ rm -f $outdir/html_node/*.html
+ mkdir -p $outdir/html_node/
+ mv ${split_html_dir}/*.html $outdir/html_node/
+ rmdir ${split_html_dir}
+else
+ cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $html \"$srcfile\""
+ echo "Generating monolithic html... ($cmd)"
+ rm -rf $PACKAGE.html # in case a directory is left over
+ eval "$cmd"
+ html_mono_size=`calcsize $PACKAGE.html`
+ gzip -f -9 -c $PACKAGE.html >$outdir/$PACKAGE.html.gz
+ html_mono_gz_size=`calcsize $outdir/$PACKAGE.html.gz`
+ mv $PACKAGE.html $outdir/
+
+ html_split node
+ html_split chapter
+ html_split section
+fi
echo Making .tar.gz for sources...
srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null`
tar cvzfh $outdir/$PACKAGE.texi.tar.gz $srcfiles
-texi_tgz_size="`calcsize $outdir/$PACKAGE.texi.tar.gz`"
+texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz`
if test -n "$docbook"; then
- cmd="${MAKEINFO} -o - --docbook $srcfile > ${srcdir}/$PACKAGE-db.xml"
+ cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
echo "Generating docbook XML... $(cmd)"
- eval $cmd
- docbook_xml_size="`calcsize $PACKAGE-db.xml`"
+ eval "$cmd"
+ docbook_xml_size=`calcsize $PACKAGE-db.xml`
gzip -f -9 -c $PACKAGE-db.xml >$outdir/$PACKAGE-db.xml.gz
- docbook_xml_gz_size="`calcsize $outdir/$PACKAGE-db.xml.gz`"
+ docbook_xml_gz_size=`calcsize $outdir/$PACKAGE-db.xml.gz`
mv $PACKAGE-db.xml $outdir/
cmd="${DOCBOOK2HTML} -o $split_html_db_dir ${outdir}/$PACKAGE-db.xml"
echo "Generating docbook HTML... ($cmd)"
- $cmd
+ eval "$cmd"
split_html_db_dir=html_node_db
(
cd ${split_html_db_dir} || exit 1
tar -czf ../$outdir/${PACKAGE}.html_node_db.tar.gz -- *.html
)
- html_node_db_tgz_size="`calcsize $outdir/${PACKAGE}.html_node_db.tar.gz`"
+ html_node_db_tgz_size=`calcsize $outdir/${PACKAGE}.html_node_db.tar.gz`
rm -f $outdir/html_node_db/*.html
mkdir -p $outdir/html_node_db
mv ${split_html_db_dir}/*.html $outdir/html_node_db/
@@ -238,26 +283,32 @@ if test -n "$docbook"; then
cmd="${DOCBOOK2TXT} ${outdir}/$PACKAGE-db.xml"
echo "Generating docbook ASCII... ($cmd)"
- $cmd
- docbook_ascii_size="`calcsize $PACKAGE-db.txt`"
+ eval "$cmd"
+ docbook_ascii_size=`calcsize $PACKAGE-db.txt`
mv $PACKAGE-db.txt $outdir/
cmd="${DOCBOOK2PS} ${outdir}/$PACKAGE-db.xml"
echo "Generating docbook PS... $(cmd)"
- $cmd
+ eval "$cmd"
gzip -f -9 -c $PACKAGE-db.ps >$outdir/$PACKAGE-db.ps.gz
- docbook_ps_gz_size="`calcsize $outdir/$PACKAGE-db.ps.gz`"
+ docbook_ps_gz_size=`calcsize $outdir/$PACKAGE-db.ps.gz`
mv $PACKAGE-db.ps $outdir/
cmd="${DOCBOOK2PDF} ${outdir}/$PACKAGE-db.xml"
echo "Generating docbook PDF... ($cmd)"
- $cmd
- docbook_pdf_size="`calcsize $PACKAGE-db.pdf`"
+ eval "$cmd"
+ docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
mv $PACKAGE-db.pdf $outdir/
fi
echo Writing index file...
-curdate="`date '+%B %d, %Y'`"
+if test -z "$use_texi2html"; then
+ CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
+ /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
+else
+ CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
+fi
+curdate=`$SETLANG date '+%B %d, %Y'`
sed \
-e "s!%%TITLE%%!$MANUAL_TITLE!g" \
-e "s!%%DATE%%!$curdate!g" \
@@ -265,6 +316,8 @@ sed \
-e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \
-e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \
-e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \
+ -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \
+ -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \
-e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
-e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
-e "s!%%PDF_SIZE%%!$pdf_size!g" \
@@ -280,6 +333,14 @@ sed \
-e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
-e "s,%%SCRIPTURL%%,$scripturl,g" \
-e "s!%%SCRIPTNAME%%!$prog!g" \
+ -e "$CONDS" \
$GENDOCS_TEMPLATE_DIR/gendocs_template >$outdir/index.html
echo "Done! See $outdir/ subdirectory for new files."
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/Build/source/utils/texinfo/util/gendocs_template b/Build/source/utils/texinfo/util/gendocs_template
index 6fb2cf950ba..be93a637bc5 100755
--- a/Build/source/utils/texinfo/util/gendocs_template
+++ b/Build/source/utils/texinfo/util/gendocs_template
@@ -1,15 +1,7 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<!-- $Id: gendocs_template,v 1.6 2004/09/23 13:16:19 karl Exp $ -->
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-
-<head>
+<!--#include virtual="/server/header.html" -->
<title>%%TITLE%% - GNU Project - Free Software Foundation (FSF)</title>
-<meta http-equiv="content-type" content='text/html; charset=utf-8' />
-<link rel="stylesheet" type="text/css" href="/gnu.css" />
-<link rev="made" href="webmasters@gnu.org" />
-</head>
+<!--#include virtual="/server/banner.html" -->
+<h2>%%TITLE%%</h2>
<!-- This document is in XML, and xhtml 1.0 -->
<!-- Please make sure to properly nest your tags -->
@@ -17,84 +9,92 @@
<!-- consistent with W3C xhtml 1.0 and CSS standards -->
<!-- See validator.w3.org -->
-<body>
-
-<h3>%%TITLE%%</h3>
-
<address>Free Software Foundation</address>
<address>last updated %%DATE%%</address>
-<p>
-<a href="/graphics/gnu-head.jpg">
- <img src="/graphics/gnu-head-sm.jpg"
- alt=" [image of the head of a GNU] "
- width="129" height="122" />
-</a>
-<a href="/philosophy/gif.html">(no gifs due to patent problems)</a>
-</p>
-<hr />
<p>This manual (%%PACKAGE%%) is available in the following formats:</p>
<ul>
- <li><a href="%%PACKAGE%%.html">HTML
- (%%HTML_MONO_SIZE%%K characters)</a> - entirely on one web page.</li>
- <li><a href="html_node/index.html">HTML</a> - with one web page per
- node.</li>
- <li><a href="%%PACKAGE%%.html.gz">HTML compressed
- (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
- one web page.</li>
- <li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
- (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
- with one web page per node.</li>
- <li><a href="%%PACKAGE%%.info.tar.gz">Info document
- (%%INFO_TGZ_SIZE%%K characters gzipped tar file)</a>.</li>
- <li><a href="%%PACKAGE%%.txt">ASCII text
- (%%ASCII_SIZE%%K characters)</a>.</li>
- <li><a href="%%PACKAGE%%.txt.gz">ASCII text compressed
- (%%ASCII_GZ_SIZE%%K gzipped characters)</a>.</li>
- <li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
- (%%DVI_GZ_SIZE%%K characters gzipped)</a>.</li>
- <li><a href="%%PACKAGE%%.ps.gz">PostScript file
- (%%PS_GZ_SIZE%%K characters gzipped)</a>.</li>
- <li><a href="%%PACKAGE%%.pdf">PDF file
- (%%PDF_SIZE%%K characters)</a>.</li>
- <li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
- (%%TEXI_TGZ_SIZE%%K characters gzipped tar file)</a></li>
+<li><a href="%%PACKAGE%%.html">HTML
+ (%%HTML_MONO_SIZE%%K bytes)</a> - entirely on one web page.</li>
+<li><a href="html_node/index.html">HTML</a> - with one web page per
+ node.</li>
+%%IF HTML_SECTION%%
+<li><a href="html_section/index.html">HTML</a> - with one web page per
+ section.</li>
+%%ENDIF HTML_SECTION%%
+%%IF HTML_CHAPTER%%
+<li><a href="html_chapter/index.html">HTML</a> - with one web page per
+ chapter.</li>
+%%ENDIF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.html.gz">HTML compressed
+ (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
+ one web page.</li>
+<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
+ (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per node.</li>
+%%IF HTML_SECTION%%
+<li><a href="%%PACKAGE%%.html_section.tar.gz">HTML compressed
+ (%%HTML_SECTION_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per section.</li>
+%%ENDIF HTML_SECTION%%
+%%IF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.html_chapter.tar.gz">HTML compressed
+ (%%HTML_CHAPTER_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per chapter.</li>
+%%ENDIF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.info.tar.gz">Info document
+ (%%INFO_TGZ_SIZE%%K bytes gzipped tar file)</a>.</li>
+<li><a href="%%PACKAGE%%.txt">ASCII text
+ (%%ASCII_SIZE%%K bytes)</a>.</li>
+<li><a href="%%PACKAGE%%.txt.gz">ASCII text compressed
+ (%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
+<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
+ (%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
+<li><a href="%%PACKAGE%%.ps.gz">PostScript file
+ (%%PS_GZ_SIZE%%K bytes gzipped)</a>.</li>
+<li><a href="%%PACKAGE%%.pdf">PDF file
+ (%%PDF_SIZE%%K bytes)</a>.</li>
+<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
+ (%%TEXI_TGZ_SIZE%%K bytes gzipped tar file).</a></li>
</ul>
+<p>You can <a href="http://www.gnu.org/order/">buy printed copies of
+some manuals</a> (among other items) from the Free Software Foundation;
+this helps support FSF activities.</p>
+
<p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
script</a>.)</p>
-<div class="copyright">
-<p>
-Return to the <a href="/home.html">GNU Project home page</a>.
-</p>
+<!-- If needed, change the copyright block at the bottom. In general, -->
+<!-- all pages on the GNU web server should have the section about -->
+<!-- verbatim copying. Please do NOT remove this without talking -->
+<!-- with the webmasters first. -->
+<!-- Please make sure the copyright date is consistent with the document -->
+<!-- and that it is like this "2001, 2002" not this "2001-2002." -->
+</div><!-- for id="content", starts in the include above -->
+<!--#include virtual="/server/footer-min.html" -->
+<div id="footer">
<p>
Please send FSF &amp; GNU inquiries to
<a href="mailto:gnu@gnu.org"><em>gnu@gnu.org</em></a>.
-There are also <a href="/home.html#ContactInfo">other ways to contact</a>
+There are also <a href="/contact/">other ways to contact</a>
the FSF.
<br />
-Please send broken links and other corrections (or suggestions) to
+Please send broken links and other corrections or suggestions to
<a href="mailto:webmasters@gnu.org"><em>webmasters@gnu.org</em></a>.
</p>
<p>
-Copyright (C) 2004 Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111, USA
-<br />
-Verbatim copying and distribution of this entire article is
+Copyright &copy; 2007 Free Software Foundation, Inc.,
+</p>
+<address>51 Franklin Street, Fifth Floor, Boston, MA 02111, USA</address>
+<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.
</p>
-<p>
-Updated:
-<!-- timestamp start -->
-$Date: 2004/09/23 13:16:19 $ $Author: karl $
-<!-- timestamp end -->
-</p>
</div>
-
+</div>
</body>
</html>
diff --git a/Build/source/utils/texinfo/util/latex2html.test b/Build/source/utils/texinfo/util/latex2html.test
new file mode 100755
index 00000000000..d52bf2f7084
--- /dev/null
+++ b/Build/source/utils/texinfo/util/latex2html.test
@@ -0,0 +1,79 @@
+#! /bin/sh
+# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Texinfo.
+#
+# GNU Texinfo 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 3 of the License,
+# or (at your option) any later version.
+#
+# GNU Texinfo 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, see <http://www.gnu.org/licenses/>.
+
+required='hevea'
+
+. ./defs || exit 1
+
+set -e
+
+# Force the creation of auxiliary files.
+# Force it to be big enough to trigger the info file splitting.
+{
+ echo "\tableofcontents"
+ for section in 1 2 3 4 5 6
+ do
+ echo "\section{$i}"
+ for subsection in 1 2 3 4 5 6
+ do
+ echo "\subsection{$i}"
+ echo "$latex_paragraph"
+ done
+ done
+} |
+create_input_tex
+
+
+# run_hevea_check FORMAT OPTIONS
+# ------------------------------
+run_hevea_check ()
+{
+ title "$@"
+
+ format="$1"
+ shift
+
+ # Testing the local build mode.
+ TEXI2DVI_pass --batch --$format "$@" input.tex
+
+ # Compute the expected output.
+ outfiles=input.$out
+ case $format in
+ info) outfiles="$outfiles input.info-1 input.info-2";;
+ esac
+
+ # Compute the aux files.
+ case $format:$@ in
+ *clean* ) auxfiles='';;
+ *tidy* ) auxfiles='input.t2d';;
+ html:*|text:* ) auxfiles='input.haux input.htoc';;
+ dvi:* ) auxfiles='input.aux input.log input.toc';;
+ * ) auxfiles='';;
+ esac
+ # There should only be the expected output and the source file.
+ assert_files input.tex $outfiles $auxfiles
+ rm -fr $outfiles $auxfiles
+}
+
+for opt in "" "--clean" "--tidy"
+do
+ for out in html info text
+ do
+ run_hevea_check $out $opt
+ done
+done
diff --git a/Build/source/utils/texinfo/util/local.test b/Build/source/utils/texinfo/util/local.test
new file mode 100755
index 00000000000..ff4aa7928ac
--- /dev/null
+++ b/Build/source/utils/texinfo/util/local.test
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Texinfo.
+#
+# GNU Texinfo 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 3 of the License,
+# or (at your option) any later version.
+#
+# GNU Texinfo 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, see <http://www.gnu.org/licenses/>.
+
+# Make sure no "local" variable identifier is used twice, since
+# local is not actually portable.
+
+. ./defs || exit 1
+
+set -e
+
+# Make sure quotes are used to protect the value. See the comment in
+# texi2dvi itself about local.
+if sed -e 's/^[ ]*#.*//' $TEXI2DVI |
+ $EGREP "\blocal [a-zA-Z_0-9]*=[^\"']" |
+ $EGREP -v "\blocal [a-zA-Z_0-9]*=[a-zA-Z0-9]*$" |
+ grep .
+then
+ false
+else
+ true
+fi
+
+
+# Make sure each name is used only once.
+if sed -n -e 's/^#.*//' \
+ -e 's/local \([a-zA-Z_0-9]*\)/\1/gp' $TEXI2DVI |
+ sort |
+ uniq -c |
+ grep -v '^.*1 ' |
+ grep .
+then
+ false
+else
+ true
+fi
+
+
+# Make sure we don't use $().
+if $FGREP '$(' $TEXI2DVI
+then
+ false
+else
+ true
+fi
diff --git a/Build/source/utils/texinfo/util/outline.gawk b/Build/source/utils/texinfo/util/outline.gawk
index 329bb17529a..fa6726356e3 100644
--- a/Build/source/utils/texinfo/util/outline.gawk
+++ b/Build/source/utils/texinfo/util/outline.gawk
@@ -6,7 +6,7 @@
#
# TEXI.OUTLINE 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 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# TEXI.OUTLINE is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# NOTE:
# This program uses gensub(), which is specific to gawk.
diff --git a/Build/source/utils/texinfo/util/pdftexi2dvi b/Build/source/utils/texinfo/util/pdftexi2dvi
new file mode 100755
index 00000000000..17708e76579
--- /dev/null
+++ b/Build/source/utils/texinfo/util/pdftexi2dvi
@@ -0,0 +1,19 @@
+#!/bin/sh
+# $Id: pdftexi2dvi,v 1.3 2007/07/05 15:22:26 karl Exp $
+# Written by Thomas Esser. Public domain.
+# Execute texi2dvi --pdf.
+
+test -f /bin/ksh && test -z "$RUNNING_KSH" \
+ && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
+ && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; }
+unset RUNNING_KSH
+
+test -f /bin/bsh && test -z "$RUNNING_BSH" \
+ && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
+ && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
+unset RUNNING_BSH
+
+# hack around a bug in zsh:
+test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
+
+texi2dvi --pdf ${1+"$@"}
diff --git a/Build/source/utils/texinfo/util/prepinfo.awk b/Build/source/utils/texinfo/util/prepinfo.awk
index 273c97f8460..18e668b298e 100644
--- a/Build/source/utils/texinfo/util/prepinfo.awk
+++ b/Build/source/utils/texinfo/util/prepinfo.awk
@@ -2,11 +2,11 @@
# prepinfo.awk --- fix node lines and menus
#
-# Copyright, 1998, Arnold Robbins, arnold@gnu.org
+# Copyright 1998 Arnold Robbins, arnold@gnu.org
#
# PREPINFO 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 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# PREPINFO is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
BEGIN \
{
diff --git a/Build/source/utils/texinfo/util/texi-docstring-magic.el b/Build/source/utils/texinfo/util/texi-docstring-magic.el
index 9cbca2b7591..ab66c911939 100644
--- a/Build/source/utils/texinfo/util/texi-docstring-magic.el
+++ b/Build/source/utils/texinfo/util/texi-docstring-magic.el
@@ -5,10 +5,10 @@
;; Copyright (C) 1998 David Aspinall
;; Maintainer: David Aspinall <da@dcs.ed.ac.uk>
;;
-;; $Id: texi-docstring-magic.el,v 1.2 2004/04/11 17:56:47 karl Exp $
+;; $Id: texi-docstring-magic.el,v 1.3 2007/07/01 21:20:33 karl Exp $
;;
;; This package is distributed under the terms of the
-;; GNU General Public License, Version 2.
+;; GNU General Public License, Version 3.
;; You should have a copy of the GPL with your version of
;; GNU Emacs or the Texinfo distribution.
;;
diff --git a/Build/source/utils/texinfo/util/texi2dvi b/Build/source/utils/texinfo/util/texi2dvi
index 18f6f59322b..4607be1949e 100755
--- a/Build/source/utils/texinfo/util/texi2dvi
+++ b/Build/source/utils/texinfo/util/texi2dvi
@@ -1,14 +1,14 @@
#! /bin/sh
-# texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources.
-# $Id: texi2dvi,v 1.42 2005/02/11 13:35:14 karl Exp $
+# texi2dvi --- produce DVI (or PDF) files from Texinfo (or (La)TeX) sources.
+# $Id: texi2dvi,v 1.122 2008/04/17 18:45:49 karl Exp $
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
-# 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# 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.
+# the Free Software Foundation; either version 3 of the License,
+# 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
@@ -16,9 +16,7 @@
# 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.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Original author: Noah Friedman.
#
@@ -31,48 +29,106 @@ test -f /bin/ksh && test -z "$RUNNING_KSH" \
&& { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; }
unset RUNNING_KSH
+# No failure shall remain unpunished.
+set -e
+
# This string is expanded by rcs automatically when this file is checked out.
-rcs_revision='$Revision: 1.42 $'
+rcs_revision='$Revision: 1.122 $'
rcs_version=`set - $rcs_revision; echo $2`
program=`echo $0 | sed -e 's!.*/!!'`
-version="texi2dvi (GNU Texinfo 4.8) $rcs_version
+version="texi2dvi (GNU Texinfo 4.12) $rcs_version
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+"
-Copyright (C) 2005 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."
+build_mode=${TEXI2DVI_BUILD_MODE:-local}
+build_dir=${TEXI2DVI_BUILD_DIRECTORY:-.}
usage="Usage: $program [OPTION]... FILE...
-Run each Texinfo or LaTeX FILE through TeX in turn until all
+Run each Texinfo or (La)TeX FILE through TeX in turn until all
cross-references are resolved, building all indices. The directory
containing each FILE is searched for included files. The suffix of FILE
-is used to determine its language (LaTeX or Texinfo).
+is used to determine its language ((La)TeX or Texinfo). To process
+(e)plain TeX files, set the environment variable LATEX=tex.
+
+In order to make texi2dvi a drop-in replacement of TeX/LaTeX in AUC-TeX,
+the FILE may also be composed of the following simple TeX commands.
+ \`\\input{FILE}' the actual file to compile
+ \`\\nonstopmode' same as --batch
Makeinfo is used to perform Texinfo macro expansion before running TeX
when needed.
-Operation modes:
+General options:
-b, --batch no interaction
- -c, --clean remove all auxiliary files
-D, --debug turn on shell debugging (set -x)
-h, --help display this help and exit successfully
-o, --output=OFILE leave output in OFILE (implies --clean);
- Only one input FILE may be specified in this case
+ only one input FILE may be specified in this case
-q, --quiet no output unless errors (implies --batch)
-s, --silent same as --quiet
-v, --version display version information and exit successfully
-V, --verbose report on what is done
TeX tuning:
- -@ use @input instead of \input; for preloaded Texinfo
- -e, -E, --expand force macro expansion using makeinfo
- -I DIR search DIR for Texinfo files
- -l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo)
- -p, --pdf use pdftex or pdflatex for processing
- -r, --recode call recode before TeX to translate input characters
- -t, --command=CMD insert CMD in copy of input file
- or --texinfo=CMD multiple values accumulate
+ -@ use @input instead of \input for preloaded Texinfo
+ --dvi output a DVI file [default]
+ -e, -E, --expand force macro expansion using makeinfo
+ -I DIR search DIR for Texinfo files
+ -l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo)
+ --no-line-error do not pass --file-line-error to TeX
+ -p, --pdf use pdftex or pdflatex for processing
+ -r, --recode call recode before TeX to translate input
+ --recode-from=ENC recode from ENC to the @documentencoding
+ --src-specials pass --src-specials to TeX
+ -t, --command=CMD insert CMD in copy of input file
+ or --texinfo=CMD multiple values accumulate
+ --translate-file=FILE use given charset translation file for TeX
+
+Build modes:
+ --build=MODE specify the treatment of auxiliary files [$build_mode]
+ --tidy same as --build=tidy
+ -c, --clean same as --build=clean
+ --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
+can also be set using the environment variable TEXI2DVI_BUILD_MODE.
+
+Valid MODEs are:
+ \`local' compile in the current directory, leaving all the auxiliary
+ files around. This is the traditional TeX use.
+ \`tidy' compile in a local *.t2d directory, where the auxiliary files
+ are left. Output files are copied back to the original file.
+ \`clean' same as \`tidy', but remove the auxiliary directory afterwards.
+ Every compilation therefore requires the full cycle.
+
+Using the \`tidy' mode brings several advantages:
+ - the current directory is not cluttered with plethora of temporary files.
+ - clutter can be even reduced using --build-dir=dir: all the *.t2d
+ directories are stored there.
+ - clutter can be reduced to zero using, e.g., --build-dir=/tmp/\$USER.t2d
+ or --build-dir=\$HOME/.t2d.
+ - the output file is updated after every succesful TeX run, for
+ sake of concurrent visualization of the output. In a \`local' build
+ the viewer stops during the whole TeX run.
+ - if the compilation fails, the previous state of the output file
+ is preserved.
+ - PDF and DVI compilation are kept in separate subdirectories
+ preventing any possibility of auxiliary file incompatibility.
+
+On the other hand, because \`tidy' compilation takes place in another
+directory, occasionally TeX won't be able to find some files (e.g., when
+using \\graphicspath): in that case use -I to specify the additional
+directories to consider.
The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO,
TEX (or PDFTEX), TEXINDEX, and THUMBPDF environment variables are used
@@ -86,30 +142,48 @@ Texinfo home page: http://www.gnu.org/software/texinfo/"
# 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.
-batch=false # eval for batch mode
-clean=
-debug=
-escape='\'
+action=compile
+batch=false # true for batch mode
+debug=false
+escape="\\"
expand= # t for expansion via makeinfo
-miincludes= # makeinfo include path
-oformat=dvi
+includes=
+line_error=true # Pass --file-line-error to TeX.
+no_line_error=false # absolutely do not pass --file-line-error to TeX
oname= # --output
-quiet= # by default let the tools' message be displayed
+out_lang=dvi
+quiet=false # by default let the tools' message be displayed
recode=false
set_language=
+src_specials=
textra= # Extra TeX commands to insert in the input file.
-textra_cmd= # sed command to insert TEXTRA where appropriate
-tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems.
-txincludes= # TEXINPUTS extensions, with trailing colon
txiprereq=19990129 # minimum texinfo.tex version with macro expansion
-verb=false # echo for verbose mode
+verb=false # true for verbose mode
+translate_file= # name of charset translation file
+recode_from= # if not empty, recode from this encoding to @documentencoding
orig_pwd=`pwd`
+# We have to initialize IFS to space tab newline since we save and
+# restore IFS and apparently POSIX allows stupid/broken behavior with
+# empty-but-set IFS.
+# http://lists.gnu.org/archive/html/automake-patches/2006-05/msg00008.html
+# We need space, tab and new line, in precisely that order. And don't leave
+# trailing blanks.
+space=' '
+tab=' '
+newline='
+'
+IFS="$space$tab$newline"
+
+# In case someone pedantic insists on using grep -E.
+: ${EGREP=egrep}
+
# Systems which define $COMSPEC or $ComSpec use semicolons to separate
-# directories in TEXINPUTS -- except for Cygwin, where COMSPEC might be
-# inherited, but : is used.
-if test -n "$COMSPEC$ComSpec" && uname | grep -iv cygwin >/dev/null; then
+# directories in TEXINPUTS -- except for Cygwin et al., where COMSPEC
+# might be inherited, but : is used.
+if test -n "$COMSPEC$ComSpec" \
+ && uname | $EGREP -iv 'cygwin|mingw|djgpp' >/dev/null; then
path_sep=";"
else
path_sep=":"
@@ -118,37 +192,129 @@ fi
# Pacify verbose cds.
CDPATH=${ZSH_VERSION+.}$path_sep
-# In case someone crazy insists on using grep -E.
-: ${EGREP=egrep}
+# If $TEX is set to a directory, don't use it.
+test -n "$TEX" && test -d "$TEX" && unset TEX
-# return true if program $1 is somewhere in PATH, else false.
+#
+## --------------------- ##
+## Auxiliary functions. ##
+## --------------------- ##
+
+# In case `local' is not supported by the shell, provide a function
+# that simulates it by simply performing the assignments. This means
+# that we must not expect `local' to work, i.e., we must not (i) rely
+# on it during recursion, and (ii) have two local declarations of the
+# same variable. (ii) is easy to check statically, and our test suite
+# does make sure there is never twice a static local declaration of a
+# variable. (i) cannot be checked easily, so just be careful.
#
-findprog ()
+# Note that since we might use a function simulating `local', we can
+# no longer rely on the fact that no IFS-splitting is performed. So,
+# while
+#
+# foo=$bar
+#
+# is fine (no IFS-splitting), never write
+#
+# local foo=$bar
+#
+# but rather
+#
+# local foo="$bar"
+(
+ foo=bar
+ test_local () {
+ local foo=foo
+ }
+ test_local
+ test $foo = bar
+) || local () {
+ case $1 in
+ *=*) eval "$1";;
+ esac
+}
+
+
+# cd_orig
+# -------
+# Return to the original directory.
+cd_orig ()
{
- foundprog=false
+ # In case $orig_pwd is on a different drive (for DOS).
+ cd /
- saveIFS=$IFS
+ # 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.
+func_dirname ()
+{
+ dirname "$1" 2>/dev/null \
+ || { echo "$1" | sed 's!/[^/]*$!!;s!^$!.!'; }
+}
+
+
+# absolute NAME -> ABS-NAME
+# -------------------------
+# Return an absolute path to NAME.
+absolute ()
+{
+ case $1 in
+ [\\/]* | ?:[\\/]*)
+ # Absolute paths don't need to be expanded.
+ echo "$1"
+ ;;
+ *) local slashes
+ slashes=`echo "$1" | sed -n 's,.*[^/]\(/*\)$,\1,p'`
+ local rel
+ rel=$orig_pwd/`func_dirname "$1"`
+ if test -d "$rel"; then
+ (cd "$rel" 2>/dev/null &&
+ local n
+ n=`pwd`/`basename "$1"`"$slashes"
+ echo "$n")
+ else
+ error 1 "not a directory: $rel"
+ fi
+ ;;
+ esac
+}
+
+
+# findprog PROG
+# -------------
+# Return true if PROG is somewhere in PATH, else false.
+findprog ()
+{
+ local saveIFS="$IFS"
IFS=$path_sep # break path components at the path separator
for dir in $PATH; do
- # use test -x rather than test -f for DJGPP, where test -x checks
- # for .exe. But test -x will also return true for directories, so
- # explicitly ignore those.
- if test -x "$dir/$1" && test ! -d "$dir/$1"; then
- foundprog=true
- break
-
- # But on cygwin, test -x foo will not find foo.exe. So also check
- # for that.
- elif test -x "$dir/$1.exe"; then
- foundprog=true
- break
+ IFS=$saveIFS
+ # The basic test for an executable is `test -f $f && test -x $f'.
+ # (`test -x' is not enough, because it can also be true for directories.)
+ # We have to try this both for $1 and $1.exe.
+ #
+ # Note: On Cygwin and DJGPP, `test -x' also looks for .exe. On Cygwin,
+ # also `test -f' has this enhancement, bot not on DJGPP. (Both are
+ # design decisions, so there is little chance to make them consistent.)
+ # Thusly, it seems to be difficult to make use of these enhancements.
+ #
+ if { test -f "$dir/$1" && test -x "$dir/$1"; } ||
+ { test -f "$dir/$1.exe" && test -x "$dir/$1.exe"; }; then
+ return 0
fi
done
- IFS=$saveIFS
- $foundprog
+ return 1
}
-# Report some information.
+# report LINE1 LINE2...
+# ---------------------
+# Report some information on stderr.
report ()
{
for i in "$@"
@@ -157,30 +323,1083 @@ report ()
done
}
+# verbose WORD1 WORD2
+# -------------------
# Report some verbose information.
verbose ()
{
- $verb >&2 "$0: $@"
+ if $verb; then
+ echo >&2 "$0: $@"
+ fi
}
-# Report an error and exit with failure.
-fatal ()
+# run COMMAND-LINE
+# ----------------
+# Run the COMMAND-LINE verbosely, and catching errors as failures.
+run ()
{
- s=$1
+ verbose "Running $@"
+ "$@" 2>&5 1>&2 ||
+ error 1 "$1 failed"
+}
+
+
+# error EXIT_STATUS LINE1 LINE2...
+# --------------------------------
+# Report an error and exit with failure if EXIT_STATUS is non null.
+error ()
+{
+ local s="$1"
shift
report "$@"
- exit $s
+ if test "$s" != 0; then
+ exit $s
+ fi
+}
+
+# ensure_dir DIR1 DIR2...
+# -----------------------
+# Make sure the directories exist.
+ensure_dir ()
+{
+ for dir
+ do
+ test -d "$dir" \
+ || mkdir "$dir" \
+ || error 1 "cannot create directory: $dir"
+ done
+}
+
+
+## ---------------- ##
+## Handling lists. ##
+## ---------------- ##
+
+
+# list_append LIST-NAME ELEM
+# --------------------------
+# Set LIST-NAME to its former contents, with ELEM appended.
+list_append ()
+{
+ local la_l="$1"
+ shift
+ eval set X \$$la_l "$@"
+ shift
+ eval $la_l=\""$@"\"
+}
+
+# list_prefix LIST-NAME SEP -> STRING
+# -----------------------------------
+# Return a string that is composed of the LIST-NAME with each item
+# preceded by SEP.
+list_prefix ()
+{
+ local lp_p="$2"
+ eval set X \$$1
+ shift
+ local lp_res
+ for i
+ do
+ lp_res="$lp_res \"$lp_p\" \"$i\""
+ done
+ echo "$lp_res"
}
+# list_infix LIST-NAME SEP -> STRING
+# ----------------------------------
+# Same as list_prefix, but a separator.
+list_infix ()
+{
+ eval set X \$$1
+ shift
+ local la_IFS="$IFS"
+ IFS=$path_sep
+ echo "$*"
+ IFS=$la_IFS
+}
+
+# list_dir_to_abs LIST-NAME
+# -------------------------
+# Convert the list to using only absolute dir names.
+# Currently unused, but should replace absolute_filenames some day.
+list_dir_to_abs ()
+{
+ local ld_l="$1"
+ eval set X \$$ld_l
+ shift
+ local ld_res
+ for dir
+ do
+ dir=`absolute "$dir"`
+ test -d "$dir" || continue
+ ld_res="$ld_res \"$dir\""
+ done
+ set X $ld_res; shift
+ eval $ld_l=\"$@\"
+}
+
+
+## ------------------------------ ##
+## Language auxiliary functions. ##
+## ------------------------------ ##
+
+# out_lang_tex
+# ------------
+# Return the tex output language (DVI or PDF) for $OUT_LANG.
+out_lang_tex ()
+{
+ case $out_lang in
+ dvi | ps | dvipdf ) echo dvi;;
+ pdf ) echo $out_lang;;
+ html | info | text ) echo $out_lang;;
+ *) error 1 "$0: invalid out_lang: $1";;
+ esac
+}
+
+
+# out_lang_ext
+# ------------
+# Return the extension for $OUT_LANG.
+out_lang_ext ()
+{
+ case $out_lang in
+ dvipdf ) echo pdf;;
+ dvi | html | info | pdf | ps | text ) echo $out_lang;;
+ *) error 1 "$0: invalid out_lang: $1";;
+ esac
+}
+
+
+## ------------------------- ##
+## TeX auxiliary functions. ##
+## ------------------------- ##
+
# Save TEXINPUTS so we can construct a new TEXINPUTS path for each file.
# Likewise for bibtex and makeindex.
-tex_envvars="BIBINPUTS BSTINPUTS INDEXSTYLE TEXINPUTS"
+tex_envvars="BIBINPUTS BSTINPUTS DVIPSHEADERS INDEXSTYLE MFINPUTS MPINPUTS \
+TEXINPUTS TFMFONTS"
for var in $tex_envvars; do
eval ${var}_orig=\$$var
export $var
done
+# absolute_filenames TEX-PATH -> TEX-PATH
+# ---------------------------------------
+# Convert relative paths to absolute paths, so we can run in another
+# directory (e.g., in tidy build mode, or during the macro-support
+# detection).
+#
+# Empty path components are meaningful to tex. We rewrite them
+# as `EMPTY' so they don't get lost when we split on $path_sep.
+# Hopefully no one will have an actual directory named EMPTY.
+absolute_filenames ()
+{
+ local replace_empty="-e 's/^$path_sep/EMPTY$path_sep/g' \
+ -e 's/$path_sep\$/${path_sep}EMPTY/g' \
+ -e 's/$path_sep$path_sep/${path_sep}EMPTY:/g'"
+ local res
+ res=`echo "$1" | eval sed $replace_empty`
+ save_IFS=$IFS
+ IFS=$path_sep
+ set x $res; shift
+ res=.
+ for dir
+ do
+ case $dir in
+ EMPTY)
+ res=$res$path_sep
+ ;;
+ *)
+ if test -d $dir; then
+ res=$res$path_sep`absolute "$dir"`
+ fi
+ ;;
+ esac
+ done
+ echo "$res"
+}
+
+
+# output_base_name FILE
+# ---------------------
+# The name of FILE, possibly renamed to satisfy --output.
+output_base_name ()
+{
+ case $oname in
+ '') echo "$1";;
+ *) local out_noext
+ out_noext=`echo "$oname" | sed 's/\.[^.]*$//'`
+ local file_ext
+ file_ext=`echo "$1" | sed 's/^.*\.//'`
+ echo "$out_noext.$file_ext"
+ ;;
+ esac
+}
+
+
+# move_to_dest FILE...
+# --------------------
+# Move FILE to the place where the user expects it. Truly move it, that
+# is, it must not remain in its build location unless that is also the
+# output location. (Otherwise it might appear as an extra file in make
+# distcheck.)
+#
+# FILE can be the principal output (in which case -o directly applies), or
+# an auxiliary file with the same base name.
+move_to_dest ()
+{
+ local dest
+ local destfile
+ local destdir
+ local destbase
+ local sourcedir
+ local sourcebase
+
+ for file
+ do
+ case $tidy:$oname in
+ true:) dest=$orig_pwd;;
+ false:) dest=;;
+ *:*) dest=`output_base_name "$file"`;;
+ esac
+ if test ! -f "$file"; then
+ error 1 "no such file or directory: $file"
+ fi
+ if test -n "$dest"; then
+ # We need to know whether $dest is a directory.
+ if test -d "$dest"; then
+ destdir=$dest
+ destfile=$dest/$file
+ else
+ destdir="`dirname $dest`"
+ destfile=$dest
+ fi
+ # We want to compare the source location and the output location,
+ # and if they are different, do the move. But if they are the
+ # same, we must preserve the source. Since we can't assume
+ # stat(1) or test -ef is available, resort to comparing the
+ # directory names, canonicalized with pwd. We can't use cmp -s
+ # since the output file might not actually change from run to run;
+ # e.g., TeX DVI output is timestamped to only the nearest minute.
+ destdir=`cd $destdir && pwd`
+ destbase=`basename $destfile`
+ #
+ sourcedir=`dirname $file`
+ sourcedir=`cd $sourcedir && pwd`
+ sourcebase=`basename $file`
+ #
+ if test "$sourcedir/$sourcebase" != "$destdir/$destbase"; then
+ verbose "Moving $file to $destfile"
+ rm -f "$destfile"
+ mv "$file" "$destfile"
+ fi
+ fi
+ done
+}
+
+
+## --------------------- ##
+## Managing xref files. ##
+## --------------------- ##
+
+# aux_file_p FILE
+# ---------------
+# Return with success with FILE is an aux file.
+aux_file_p ()
+{
+ test -f "$1" || return 1
+ case $1 in
+ *.aux) return 0;;
+ *) return 1;;
+ esac
+}
+
+# bibaux_file_p FILE
+# ------------------
+# Return with success with FILE is an aux file containing citation
+# requests.
+bibaux_file_p ()
+{
+ test -s "$1" || return 1
+ if (grep '^\\bibstyle[{]' "$1" \
+ && grep '^\\bibdata[{]' "$1" \
+ ## The following line is suspicious: fails when there
+ ## are citations in sub aux files. We need to be
+ ## smarter in this case.
+ ## && grep '^\\citation[{]' "$f"
+ ) >&6 2>&1;
+ then
+ return 0
+ fi
+ return 1
+}
+
+# index_file_p FILE
+# -----------------
+# Return with success with FILE is an index file.
+# When index.sty is used, there is a space before the brace.
+index_file_p ()
+{
+ test -f "$1" || return 1
+ case `sed '1q' "$1"` in
+ "\\entry{"*|"\\indexentry{"*|"\\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 ()
+{
+ test -f "$1" || return 1
+ # 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 $in_lang in
+ texinfo)
+ # texindex: texinfo.cp -> texinfo.cps
+ if index_file_p $file; then
+ echo ${file}s
+ fi
+ ;;
+ 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.
+ #
+ # With an input file name containing a space, this produces a
+ # "command not found" message (and filtering is ineffective).
+ # The situation with a newline is presumably even worse.
+ while read file; do
+ if $filter "$file"; then
+ echo $file
+ fi
+ done |
+ sort |
+ # Some files are opened several times, e.g., listings.sty's *.vrb.
+ uniq
+}
+
+
+# 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"
+ # The following line improves `cp $xref_files_orig "$work_bak"'
+ # by preserving the directory parts. Think of
+ # cp chap1/main.aux chap2/main.aux $work_bak.
+ tar cf - $xref_files_orig | (cd "$work_bak" && tar xf -)
+ fi
+}
+
+
+# xref_files_changed
+# ------------------
+# Whether the xref files were changed since the previous run.
+xref_files_changed ()
+{
+ # LaTeX (and the package changebar) report in the LOG file if it
+ # should be rerun. This is needed for files included from
+ # subdirs, since texi2dvi does not try to compare xref files in
+ # subdirs. Performing xref files test is still good since LaTeX
+ # does not report changes in xref files.
+ if grep "Rerun to get" "$in_noext.log" >&6 2>&1; then
+ return 0
+ fi
+
+ # 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"
+ if test "x$xref_files_orig" != "x$xref_files_new"; then
+ return 0
+ fi
+
+ # Compare each file until we find a difference.
+ for this_file in $xref_files_new; do
+ verbose "Comparing xref file `echo $this_file | sed 's|\./||g'` ..."
+ # cmp -s returns nonzero exit status if files differ.
+ if cmp -s "$this_file" "$work_bak/$this_file"; then :; else
+ verbose "xref file `echo $this_file | sed 's|\./||g'` differed ..."
+ if $debug; then
+ diff -u "$work_bak/$this_file" "$this_file"
+ fi
+ return 0
+ fi
+ done
+
+ # No change.
+ return 1
+}
+
+
+
+## ----------------------- ##
+## Running the TeX suite. ##
+## ----------------------- ##
+
+
+
+# run_tex ()
+# ----------
+# Run TeX as "$tex $in_input", taking care of errors and logs.
+run_tex ()
+{
+ case $in_lang:`out_lang_tex` in
+ latex:dvi) tex=${LATEX:-latex};;
+ latex:pdf) tex=${PDFLATEX:-pdflatex};;
+ 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;;
+ texinfo:pdf) tex=$PDFTEX;;
+
+ *) error 1 "$0: $out_lang not supported for $in_lang";;
+ esac
+
+ # Beware of aux files in subdirectories that require the
+ # subdirectory to exist.
+ case $in_lang:$tidy in
+ latex:true)
+ sed -n 's|^[ ]*\\include{\(.*\)/.*}.*|\1|p' "$in_input" |
+ sort -u |
+ while read d
+ do
+ ensure_dir "$work_build/$d"
+ done
+ ;;
+ esac
+
+ # Note that this will be used via an eval: quote properly.
+ local 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
+ if $no_line_error; then :; else
+ # The mk program and perhaps others want to parse TeX's
+ # original error messages.
+ case $line_error:$tex_help in
+ true:*file-line-error*) cmd="$cmd --file-line-error";;
+ esac
+ fi
+
+ # Tell TeX about TCX file, if specified.
+ test -n "$translate_file" && cmd="$cmd --translate-file=$translate_file"
+
+ # Tell TeX to make source specials (for backtracking from output to
+ # source, given a sufficiently smart editor), if specifed.
+ test -n "$src_specials" && cmd="$cmd $src_specials"
+
+ # Tell TeX to be batch if requested.
+ if $batch; then
+ # \batchmode does not show terminal output at all, so we don't
+ # want that. And even in batch mode, TeX insists on having input
+ # from the user. Close its stdin to make it impossible.
+ cmd="$cmd </dev/null '${escape}nonstopmode' '${escape}input'"
+ fi
+
+ # we'd like to handle arbitrary input file names, such as a~b.tex.
+ # This isn't a general way to do it :), though it does work, kind of.
+ # cmd="$cmd '${escape}catcode126=12 \input '"
+
+ # TeX's \input does not (easily or reliably) support whitespace
+ # characters or other special characters 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 to the filename in the current directory, in tidy mode
+ # only. Do not alter in_input.
+ #
+ # The filename is almost always tokenized using plain TeX conventions
+ # (the exception would be if the user made a texinfo.fmt file). Not
+ # all the plain TeX special characters cause trouble, but there's no
+ # harm in making the link.
+ #
+ case $tidy:`func_dirname "$in_input"` in
+ true:*["$space$tab$newline\"#\$%\\^_{}"]*)
+ _run_tex_file_name=`basename "$in_input"`
+ if test ! -f "$_run_tex_file_name"; then
+ verbose ln -s "$in_input"
+ rm -f "$_run_tex_file_name"
+ ln -s "$_run_tex_file_name"
+ fi
+ cmd="$cmd '$_run_tex_file_name'"
+ ;;
+
+ *)
+ cmd="$cmd '$in_input'"
+ ;;
+ esac
+
+ verbose "$0: Running $cmd ..."
+ if eval "$cmd" >&5; then
+ case $out_lang in
+ dvi | pdf ) move_to_dest "$in_noext.$out_lang";;
+ esac
+ else
+ error 1 "$tex exited with bad status, quitting."
+ fi
+}
+
+# run_bibtex ()
+# -------------
+# Run bibtex on current file.
+# - If its input (AUX) exists.
+# - If some citations are missing (LOG contains `Citation').
+# or the LOG complains of a missing .bbl
+#
+# 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.
+run_bibtex ()
+{
+ case $in_lang in
+ latex) bibtex=${BIBTEX:-bibtex};;
+ texinfo) return;;
+ esac
+
+ # "Citation undefined" is for LaTeX, "Undefined citation" for btxmac.tex.
+ # The no .aux && \bibdata test is also for btxmac, in case it was the
+ # first run of a bibtex-using document. Otherwise, it's possible that
+ # bibtex would never be run.
+ if test -r "$in_noext.aux" \
+ && test -r "$in_noext.log" \
+ && (grep 'Warning:.*Citation.*undefined' "$in_noext.log" \
+ || grep '.*Undefined citation' "$in_noext.log" \
+ || grep 'No file .*\.bbl\.' "$in_noext.log") \
+ || (grep 'No \.aux file' "$in_noext.log" \
+ && grep '^\\bibdata' "$in_noext.aux") \
+ >&6 2>&1; \
+ then
+ for f in `generated_files_get "$in_noext" bibaux_file_p`
+ do
+ run $bibtex "$f"
+ done
+ fi
+}
+
+# run_index ()
+# ------------
+# Run texindex (or makeindex) 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.
+run_index ()
+{
+ case $in_lang in
+ latex) texindex=${MAKEINDEX:-makeindex};;
+ texinfo) texindex=${TEXINDEX:-texindex};;
+ esac
+ index_files=`generated_files_get $in_noext index_file_p`
+ if test -n "$texindex" && test -n "$index_files"; then
+ run $texindex $index_files
+ fi
+}
+
+
+# run_thumbpdf ()
+# ---------------
+run_thumbpdf ()
+{
+ if test `out_lang_tex` = pdf \
+ && test -r "$in_noext.log" \
+ && grep 'thumbpdf\.sty' "$in_noext.log" >&6 2>&1; \
+ then
+ thumbpdf=${THUMBPDF:-thumbpdf}
+ verbose "Running $thumbpdf $in_noext ..."
+ if $thumbpdf "$in_noext" >&5; then
+ run_tex
+ else
+ report "$thumbpdf exited with bad status." \
+ "Ignoring its output."
+ fi
+ fi
+}
+
+
+# run_dvipdf FILE.dvi
+# -------------------
+# Convert FILE.dvi to FILE.pdf.
+run_dvipdf ()
+{
+ # Find which dvi->pdf program is available.
+ if test -z "$dvipdf"; then
+ for i in "$DVIPDF" dvipdfmx dvipdfm dvipdf dvi2pdf dvitopdf;
+ do
+ if findprog $i; then
+ dvipdf=$i
+ fi
+ done
+ fi
+ # These tools have varying interfaces, some 'input output', others
+ # 'input -o output'. They all seem to accept 'input' only,
+ # outputting using the expected file name.
+ run $dvipdf "$1"
+ if test ! -f `echo "$1" | sed -e 's/\.dvi$/.pdf/'`; then
+ error 1 "$0: cannot find output file"
+ fi
+}
+
+# run_tex_suite ()
+# ----------------
+# Run the TeX tools until a fix point is reached.
+run_tex_suite ()
+{
+ # Move to the working directory.
+ if $tidy; then
+ verbose "cd $work_build"
+ cd "$work_build" || exit 1
+ fi
+
+ # Count the number of cycles.
+ local cycle=0
+
+ while :; do
+ cycle=`expr $cycle + 1`
+ verbose "Cycle $cycle for $command_line_filename"
+
+ xref_files_save
+
+ # We run bibtex first, because I can see reasons for the indexes
+ # to change after bibtex is run, but I see no reason for the
+ # converse.
+ run_bibtex
+ run_index
+ run_core_conversion
+
+ xref_files_changed || break
+ done
+
+ # If we were using thumbpdf and producing PDF, then run thumbpdf
+ # and TeX one last time.
+ run_thumbpdf
+
+ # Install the result if we didn't already (i.e., if the output is
+ # dvipdf or ps).
+ case $out_lang in
+ dvipdf)
+ run_dvipdf "$in_noext.`out_lang_tex`"
+ move_to_dest "$in_noext.`out_lang_ext`"
+ ;;
+ ps)
+ dvips -o "$in_noext.`out_lang_ext`" "$in_noext.`out_lang_tex`"
+ move_to_dest "$in_noext.`out_lang_ext`"
+ ;;
+ esac
+
+ cd_orig
+}
+
+## -------------------------------- ##
+## TeX processing auxiliary tools. ##
+## -------------------------------- ##
+
+
+# A sed script that preprocesses Texinfo sources in order to keep the
+# iftex sections only. We want to remove non TeX sections, and comment
+# (with `@c texi2dvi') TeX sections so that makeinfo does not try to
+# parse them. Nevertheless, while commenting TeX sections, don't
+# comment @macro/@end macro so that makeinfo does propagate them.
+# Unfortunately makeinfo --iftex --no-ifinfo doesn't work well enough
+# (yet), makeinfo can't parse the TeX commands, so work around with sed.
+#
+comment_iftex=\
+'/^@tex/,/^@end tex/{
+ s/^/@c texi2dvi/
+}
+/^@iftex/,/^@end iftex/{
+ s/^/@c texi2dvi/
+ /^@c texi2dvi@macro/,/^@c texi2dvi@end macro/{
+ s/^@c texi2dvi//
+ }
+}
+/^@ifnottex/,/^@end ifnottex/{
+ s/^/@c (texi2dvi)/
+}
+/^@ifinfo/,/^@end ifinfo/{
+ /^@node/p
+ /^@menu/,/^@end menu/p
+ t
+ s/^/@c (texi2dvi)/
+}
+s/^@ifnotinfo/@c texi2dvi@ifnotinfo/
+s/^@end ifnotinfo/@c texi2dvi@end ifnotinfo/'
+
+# Uncommenting is simple: Remove any leading `@c texi2dvi'.
+uncomment_iftex='s/^@c texi2dvi//'
+
+
+# run_makeinfo ()
+# ---------------
+# Expand macro commands in the original source file using Makeinfo.
+# 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.
+run_makeinfo ()
+{
+ test $in_lang == texinfo ||
+ return 0
+
+ # Unless required by the user, makeinfo expansion is wanted only
+ # if texinfo.tex is too old.
+ if test "$expand" = t; then
+ makeinfo=${MAKEINFO:-makeinfo}
+ else
+ # Check if texinfo.tex performs macro expansion by looking for
+ # its version. The version is a date of the form YEAR-MO-DA.
+ # We don't need to use [0-9] to match the digits since anyway
+ # the comparison with $txiprereq, a number, will fail with non
+ # 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.
+ $TEX txiversion.tex </dev/null >txiversion.out 2>txiversion.err
+ )
+ if test $? != 0; then
+ cat "$version_test_dir/txiversion.out"
+ cat "$version_test_dir/txiversion.err" >&2
+ error 1 "texinfo.tex appears to be broken, quitting."
+ fi
+ eval `sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p' "$version_test_dir/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}
+ fi
+ # As long as we had to run TeX, offer the user this convenience:
+ if test "$txiformat" = Texinfo; then
+ escape=@
+ fi
+ fi
+
+ if test -n "$makeinfo"; then
+ # in_src: the file with macros expanded.
+ # Use the same basename to generate the same aux file names.
+ work_src=$workdir/src
+ ensure_dir "$work_src"
+ in_src=$work_src/$in_base
+ local miincludes
+ miincludes=`list_prefix includes -I`
+ verbose "Macro-expanding $command_line_filename to $in_src ..."
+ # eval $makeinfo because it might be defined as something complex
+ # (running missing) and then we end up with things like '"-I"',
+ # and "-I" (including the quotes) is not an option name. This
+ # happens with gettext 0.14.5, at least.
+ sed "$comment_iftex" "$command_line_filename" \
+ | eval $makeinfo --footnote-style=end -I "$in_dir" $miincludes \
+ -o /dev/null --macro-expand=- \
+ | sed "$uncomment_iftex" >"$in_src"
+ # Continue only if everything succeeded.
+ if test $? -ne 0 \
+ || test ! -r "$in_src"; then
+ verbose "Expansion failed, ignored...";
+ else
+ in_input=$in_src
+ fi
+ fi
+}
+
+# insert_commands ()
+# ------------------
+# Used most commonly for @finalout, @smallbook, etc.
+insert_commands ()
+{
+ local textra_cmd
+ case $in_lang in
+ latex) textra_cmd=1i;;
+ texinfo) textra_cmd='/^@setfilename/a';;
+ *) error 1 "internal error, unknown language: $in_lang";;
+ esac
+
+ if test -n "$textra"; then
+ # _xtr. The file with the user's extra commands.
+ work_xtr=$workdir/xtr
+ in_xtr=$work_xtr/$in_base
+ ensure_dir "$work_xtr"
+ verbose "Inserting extra commands: $textra"
+ sed "$textra_cmd\\
+$textra" "$in_input" >"$in_xtr"
+ in_input=$in_xtr
+ fi
+}
+
+# run_recode ()
+# -------------
+# If this is a Texinfo file with a specified input encoding, and
+# recode is available, then recode to plain 7 bit Texinfo.
+run_recode ()
+{
+ local from
+ local to
+
+ if test $in_lang = texinfo; then
+ pgm='s/^ *@documentencoding *\([^ ][^ ]*\) *$/\1/
+ t found
+ d
+ :found
+ q'
+ encoding=`sed -e "$pgm" "$in_input"`
+ if $recode && test -n "$encoding" && findprog recode; then
+ if test -n "$recode_from"; then
+ from=$recode_from
+ to=$encoding
+ else
+ from=$encoding
+ to=$texinfo
+ fi
+ verbose "Recoding from $from to $to."
+ # _rcd. The Texinfo file recoded in 7bit.
+ work_rcd=$workdir/recode
+ in_rcd=$work_rcd/$in_base
+ ensure_dir "$work_rcd"
+ if recode "$encoding..$to" <"$in_input" >"$in_rcd" \
+ && test -s "$in_rcd"; then
+ in_input=$in_rcd
+ else
+ verbose "Recoding failed, using original input."
+ fi
+ fi
+ fi
+}
+
+# compute_language FILENAME
+# -------------------------
+# Return the short string describing the language in which FILENAME
+# is written: `texinfo' or `latex'.
+compute_language ()
+{
+ # 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.
+ if test -n "$set_language"; then
+ echo $set_language
+ elif sed 1q "$1" | grep 'input texinfo' >&6; then
+ echo texinfo
+ else
+ # Get the type of the file (latex or texinfo) from the given language
+ # we just guessed, or from the file extension if not set yet.
+ case $1 in
+ *.ltx | *.tex | *.drv | *.dtx) echo latex;;
+ *) echo texinfo;;
+ esac
+ fi
+}
+
+
+# run_hevea (MODE)
+# ----------------
+# Convert to HTML/INFO/TEXT.
+#
+# Don't pass `-noiso' to hevea: it's useless in HTML since anyway the
+# charset is set to latin1, and troublesome in other modes since
+# accented characters loose their accents.
+#
+# Don't pass `-o DEST' to hevea because in that case it leaves all its
+# auxiliary files there too... Too bad, because it means we will need
+# to handle images some day.
+run_hevea ()
+{
+ local hevea="${HEVEA:-hevea}"
+ local run_hevea="$hevea"
+
+ case $1 in
+ html) ;;
+ text|info) run_hevea="$run_hevea -$1";;
+ *) error 1 "run_hevea: invalid argument: $1";;
+ esac
+
+ # Compiling to the tmp directory enables to preserve a previous
+ # successful compilation.
+ run_hevea="$run_hevea -fix -O -o '$out_base'"
+ run_hevea="$run_hevea `list_prefix includes -I` -I '$orig_pwd' "
+ run_hevea="$run_hevea '$in_input'"
+
+ if $debug; then
+ run_hevea="$run_hevea -v -v"
+ fi
+
+ verbose "running $run_hevea"
+ if eval "$run_hevea" >&5; then
+ # hevea leaves trailing white spaces, this is annoying.
+ case $1 in text|info)
+ perl -pi -e 's/[ \t]+$//g' "$out_base"*;;
+ esac
+ case $1 in
+ html|text) move_to_dest "$out_base";;
+ info) # There can be foo.info-1, foo.info-2 etc.
+ move_to_dest "$out_base"*;;
+ esac
+ else
+ error 1 "$hevea exited with bad status, quitting."
+ fi
+}
+
+
+# run_core_conversion ()
+# ----------------------
+# Run the TeX (or HeVeA).
+run_core_conversion ()
+{
+ case $in_lang:`out_lang_tex` in
+ *:dvi|*:pdf)
+ run_tex;;
+ latex:html|latex:text|latex:info)
+ run_hevea $out_lang;;
+ *)
+ error 1 "invalid input/output combination: $in_lang/$out_lang";;
+ esac
+}
+
+
+# compile ()
+# ----------
+# Run the full compilation chain, from pre-processing to installation
+# of the output at its expected location.
+compile ()
+{
+ # Source file might include additional sources.
+ # We want `.:$orig_pwd' before anything else. (We'll add `.:' later
+ # after all other directories have been turned into absolute paths.)
+ # `.' goes first to ensure that any old .aux, .cps,
+ # etc. files in ${directory} don't get used in preference to fresher
+ # files in `.'. Include orig_pwd in case we are in clean build mode, where
+ # we've cd'd to a temp directory.
+ txincludes=`list_infix includes $path_sep`
+ common="$orig_pwd$path_sep$in_dir$path_sep$txincludes$path_sep"
+ 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 build mode, or during the macro-support
+ # detection).
+ val=`absolute_filenames "$val"`
+ eval $var="\"$val\""
+ export $var
+ eval verbose \"$var=\'\$${var}\'\"
+ done
+
+ # --expand
+ run_makeinfo
+
+ # --command, --texinfo
+ insert_commands
+
+ # --recode
+ run_recode
+
+ # Run until a fix point is reached.
+ run_tex_suite
+}
+
+
+# remove FILES
+# ------------
+remove ()
+{
+ verbose "Removing" "$@"
+ rm -rf "$@"
+}
+
+
+# mostly_clean
+# ------------
+# Remove auxiliary files and directories. Changes the current directory.
+mostly_clean ()
+{
+ cd_orig
+ set X "$t2ddir"
+ shift
+ $tidy || {
+ local log="$work_build/$in_noext.log"
+ set X ${1+"$@"} "$log" `generated_files_get "$work_build/$in_noext"`
+ shift
+ }
+ remove ${1+"$@"}
+}
+
+
+# cleanup ()
+# ----------
+# Remove what should be removed according to options.
+# Called at the end of each compilation cycle, and at the end of
+# the script. Changes the current directory.
+cleanup ()
+{
+ case $build_mode in
+ local) cd_orig; remove "$t2ddir";;
+ clean) mostly_clean;;
+ tidy) ;;
+ esac
+}
+
+
+
+## ---------------------- ##
+## Command line parsing. ##
+## ---------------------- ##
+
# Push a token among the arguments that will be used to notice when we
# ended options/arguments parsing.
# Use "set dummy ...; shift" rather than 'set - ..." because on
@@ -209,41 +1428,53 @@ while test x"$1" != x"$arg_sep"; do
case "$1" in
-@ ) escape=@;;
# Silently and without documentation accept -b and --b[atch] as synonyms.
- -b | --b*) batch=true;;
- -c | --c*) clean=t;;
- -D | --d*) debug=t;;
- -e | -E | --e*) expand=t;;
- -h | --h*) echo "$usage"; exit 0;;
+ -b | --batch) batch=true;;
+ --build) shift; build_mode=$1;;
+ --build-dir) shift; build_dir=$1; build_mode=tidy;;
+ -c | --clean) build_mode=clean;;
+ -D | --debug) debug=true;;
+ --dvi) out_lang=dvi;;
+ --dvipdf) out_lang=dvipdf;;
+ -e | -E | --expand) expand=t;;
+ -h | --help) echo "$usage"; exit 0;;
+ --html) out_lang=html;;
-I | --I*)
shift
- miincludes="$miincludes -I $1"
- txincludes="$txincludes$1$path_sep"
+ # Use absolute dir names in the includes.
+ val=`absolute "$1"`
+ list_append includes "$val"
;;
- -l | --l*) shift; set_language=$1;;
- -o | --o*)
+ --info) out_lang=info;;
+ -l | --lang | --language) shift; set_language=$1;;
+ --mostly-clean) action=mostly-clean;;
+ --no-line-error) no_line_error=true;;
+ -o | --out | --output)
shift
- clean=t
- case "$1" in
- /* | ?:/*) oname=$1;;
- *) 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\\
+ # Make it absolute, just in case we also have --clean, or whatever.
+ oname=`absolute "$1"`;;
+ -p | --pdf) out_lang=pdf;;
+ --ps) out_lang=ps;;
+ -q | -s | --quiet | --silent) quiet=true; batch=true;;
+ -r | --recode) recode=true;;
+ --recode-from) shift; recode=true; recode_from="$1";;
+ --src-specials) src_specials=--src-specials;;
+ -t | --texinfo | --command ) shift; textra="$textra\\
"`echo "$1" | sed 's/\\\\/\\\\\\\\/g'`;;
+ --text) out_lang=text;;
+ --translate-file ) shift; translate_file="$1";;
+ --tidy) build_mode=tidy;;
-v | --vers*) echo "$version"; exit 0;;
- -V | --verb*) verb=echo;;
+ -V | --verb*) verb=true;;
--) # What remains are not options.
shift
while test x"$1" != x"$arg_sep"; do
- set dummy ${1+"$@"} "$1"; shift
- shift
+ set dummy ${1+"$@"} "$1"; shift
+ shift
done
break;;
-*)
- fatal 1 "Unknown or ambiguous option \`$1'." \
- "Try \`--help' for more information."
+ error 1 "Unknown or ambiguous option \`$1'." \
+ "Try \`--help' for more information."
;;
*) set dummy ${1+"$@"} "$1"; shift;;
esac
@@ -252,15 +1483,24 @@ done
# Pop the token
shift
+# $tidy: compile in a t2d directory.
+# $clean: remove all the aux files.
+case $build_mode in
+ local) clean=false; tidy=false;;
+ tidy) clean=false; tidy=true;;
+ clean) clean=true; tidy=true;;
+ *) error 1 "invalid build mode: $build_mode";;
+esac
+
# Interpret remaining command line args as filenames.
case $# in
0)
- fatal 2 "Missing file arguments." "Try \`--help' for more information."
+ error 2 "Missing file arguments." "Try \`--help' for more information."
;;
1) ;;
*)
if test -n "$oname"; then
- fatal 2 "Can't use option \`--output' with more than one argument."
+ error 2 "Can't use option \`--output' with more than one argument."
fi
;;
esac
@@ -298,151 +1538,6 @@ if test -z "$PDFTEX"; then
fi
-# Prepare the temporary directory. Remove it at exit, unless debugging.
-if test -z "$debug"; then
- trap "cd / && rm -rf $tmpdir" 0 1 2 15
-fi
-
-# Create the temporary directory with strict rights
-(umask 077 && mkdir $tmpdir) || exit 1
-
-# Prepare the tools we might need. This may be extra work in some
-# cases, but improves the readability of the script.
-utildir=$tmpdir/utils
-mkdir $utildir || exit 1
-
-# A sed script that preprocesses Texinfo sources in order to keep the
-# iftex sections only. We want to remove non TeX sections, and comment
-# (with `@c texi2dvi') TeX sections so that makeinfo does not try to
-# parse them. Nevertheless, while commenting TeX sections, don't
-# comment @macro/@end macro so that makeinfo does propagate them.
-# Unfortunately makeinfo --iftex --no-ifinfo doesn't work well enough
-# (yet), makeinfo can't parse the TeX commands, so work around with sed.
-#
-comment_iftex_sed=$utildir/comment.sed
-cat <<EOF >$comment_iftex_sed
-/^@tex/,/^@end tex/{
- s/^/@c texi2dvi/
-}
-/^@iftex/,/^@end iftex/{
- s/^/@c texi2dvi/
- /^@c texi2dvi@macro/,/^@c texi2dvi@end macro/{
- s/^@c texi2dvi//
- }
-}
-/^@ifnottex/,/^@end ifnottex/{
- s/^/@c (texi2dvi)/
-}
-/^@ifinfo/,/^@end ifinfo/{
- /^@node/p
- /^@menu/,/^@end menu/p
- t
- s/^/@c (texi2dvi)/
-}
-s/^@ifnotinfo/@c texi2dvi@ifnotinfo/
-s/^@end ifnotinfo/@c texi2dvi@end ifnotinfo/
-EOF
-# Uncommenting is simple: Remove any leading `@c texi2dvi'.
-uncomment_iftex_sed=$utildir/uncomment.sed
-cat <<EOF >$uncomment_iftex_sed
-s/^@c 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
- # 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.
- 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"
- fi
- done
- echo "$xref_files"
-}
-
-# Convert relative paths to absolute paths, so we can run in another
-# directory (e.g., in --clean mode, or during the macro-support detection.)
-#
-# Empty path components are meaningful to tex. We rewrite them
-# as `EMPTY' so they don't get lost when we split on $path_sep.
-# Hopefully no one will have an actual directory named EMPTY.
-absolute_filenames ()
-{
- replace_empty="-e 's/^$path_sep/EMPTY$path_sep/g' \
- -e 's/$path_sep\$/${path_sep}EMPTY/g' \
- -e 's/$path_sep$path_sep/${path_sep}EMPTY:/g'"
- _res=`echo "$1" | eval sed $replace_empty`
- save_IFS=$IFS
- IFS=$path_sep
- set x $_res; shift
- _res=.
- for dir
- do
- case $dir in
- EMPTY)
- _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
- echo "$_res"
-}
-
-
-# run_tex ()
-# ----------
-# Run TeX as "$tex $tex_args $filename_input", taking care of errors
-# and logs.
-run_tex ()
-{
- # Note that this will be used via an eval: quote properly.
- 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
-
- # Tell TeX to be batch if requested.
- if $batch; then
- # \batchmode does not show terminal output at all, so we don't
- # want that. And even in batch mode, TeX insists on having input
- # from the user. Close its stdin to make it impossible.
- cmd="$cmd </dev/null '${escape}nonstopmode' '${escape}input'"
- fi
-
- cmd="$cmd '$filename_input'"
-
- verbose "Running $cmd ..."
- if eval "$cmd" >&5; then :; else
- test "$clean" = t \
- && cp "$filename_noext.log" "$orig_pwd"
- fatal 1 "$tex exited with bad status, quitting." \
- "see $filename_noext.log for errors."
- fi
-}
-
# File descriptor usage:
# 0 standard input
# 1 standard output (--verbose messages)
@@ -452,15 +1547,24 @@ run_tex ()
# 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
+
+# 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
fi
-# Enable tracing
-if test "$debug" = t; then
+
+# 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 $debug; then
exec 6>&1
set -x
else
@@ -468,10 +1572,38 @@ else
fi
#
-# TeXify files.
-for command_line_filename in ${1+"$@"}; do
- verbose "Processing $command_line_filename ..."
+# input_file_name_decode
+# ----------------------
+# Decode COMMAND_LINE_FILENAME, and compute:
+# - COMMAND_LINE_FILENAME clean of TeX commands
+# - IN_DIR
+# The directory to the input file, possibly absolute if needed.
+# - IN_DIR_ABS
+# The absolute directory of the input file.
+# - IN_BASE
+# The input file base name (no directory part).
+# - IN_NOEXT
+# The input file name without extensions (nor directory part).
+# - IN_INPUT
+# Defaults to COMMAND_LINE_FILENAME, but might change if the
+# input is preprocessed (recode etc.). With directory, possibly absolute.
+input_file_name_decode ()
+{
+ # See if we are run from within AUC-Tex, in which case we are
+ # passed `\input{FOO.tex}' or even `\nonstopmode\input{FOO.tex}'.
+ case $command_line_filename in
+ *\\nonstopmode*)
+ batch=true;;
+ esac
+ case $command_line_filename in
+ *\\input{*}*)
+ # Let AUC-TeX error parser deal with line numbers.
+ line_error=false
+ command_line_filename=`\
+ expr X"$command_line_filename" : X'.*input{\([^}]*\)}'`
+ ;;
+ esac
# If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex),
# prepend `./' in order to avoid that the tools take it as an option.
@@ -482,354 +1614,102 @@ for command_line_filename in ${1+"$@"}; do
# 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 xref files and so forth.
- if test ! -r "$command_line_filename"; then
- report "Could not read $command_line_filename, skipping."
- continue
+ test -r "$command_line_filename" ||
+ error 1 "cannot read $command_line_filename, skipping."
+
+ # Get the name of the current directory.
+ in_dir=`func_dirname "$command_line_filename"`
+ in_dir_abs=`absolute "$in_dir"`
+ # In a clean build, we `cd', so get an absolute file name.
+ if $tidy; then
+ in_dir=$in_dir_abs
fi
- # Get the name of the current directory. We want the full path
- # 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"`
+ in_base=`basename "$command_line_filename"`
# Strip extension.
- filename_noext=`echo "$filename_ext" | sed 's/\.[^.]*$//'`
- ext=`echo "$filename_ext" | sed 's/^.*\.//'`
-
- # _src. Use same basename since we want to generate aux files with
- # the same basename as the manual. If --expand, then output the
- # macro-expanded file to here, else copy the original file.
- tmpdir_src=$tmpdir/src
- filename_src=$tmpdir_src/$filename_noext.$ext
-
- # _xtr. The file with the user's extra commands.
- tmpdir_xtr=$tmpdir/xtr
- filename_xtr=$tmpdir_xtr/$filename_noext.$ext
-
- # _rcd. The Texinfo file recoded in 7bit.
- tmpdir_rcd=$tmpdir/rcd
- filename_rcd=$tmpdir_rcd/$filename_noext.$ext
-
- # _bak. Copies of the previous xref files (another round is run if
- # they differ from the new one).
- tmpdir_bak=$tmpdir/bak
-
- # Make all those directories and give up if we can't succeed.
- mkdir $tmpdir_src $tmpdir_xtr $tmpdir_rcd $tmpdir_bak || exit 1
+ in_noext=`echo "$in_base" | sed 's/\.[^.]*$//'`
- # Source file might include additional sources.
- # We want `.:$orig_pwd' before anything else. (We'll add `.:' later
- # after all other directories have been turned into absolute paths.)
- # `.' goes first to ensure that any old .aux, .cps,
- # etc. files in ${directory} don't get used in preference to fresher
- # files in `.'. Include orig_pwd in case we are in clean mode, where
- # 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
+ # The normalized file name to compile. Must always point to the
+ # file to actually compile (in case of recoding, macro-expansion etc.).
+ in_input=$in_dir/$in_base
- # 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.
- if test -n "$set_language"; then
- language=$set_language
- elif sed 1q "$command_line_filename" | grep 'input texinfo' >&6; then
- language=texinfo
+ # Compute the output file name.
+ if test x"$oname" != x; then
+ out_name=$oname
else
- language=
- fi
-
- # Get the type of the file (latex or texinfo) from the given language
- # we just guessed, or from the file extension if not set yet.
- case ${language:-$filename_ext} in
- [lL]a[tT]e[xX] | *.ltx | *.tex)
- # 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
- thumbpdf=${THUMBPDF:-thumbpdf}
- ;;
-
- *)
- # Assume a Texinfo file. Texinfo files need makeinfo, texindex and tex.
- language=texinfo
- bibtex=
- texindex=${TEXINDEX:-texindex}
- textra_cmd='/^@setfilename/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$' >/dev/null; 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
- makeinfo=${MAKEINFO:-makeinfo}
- else
- # Check if texinfo.tex performs macro expansion by looking for
- # its version. The version is a date of the form YEAR-MO-DA.
- # We don't need to use [0-9] to match the digits since anyway
- # the comparison with $txiprereq, a number, will fail with non
- # digits.
- # Run in the tmpdir to avoid leaving files.
- (
- cd $tmpdir
- echo '\input texinfo.tex @bye' >txiversion.tex
- # Be sure that if tex wants to fail, it is not interactive:
- # close stdin.
- $tex txiversion.tex </dev/null
- ) >$tmpdir/txiversion.out 2>$tmpdir/txiversion.err
- if test $? != 0; then
- cat $tmpdir/txiversion.out
- cat $tmpdir/txiversion.err >&2
- fatal 1 "texinfo.tex appears to be broken, quitting."
- 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}
- fi
- # As long as we had to run TeX, offer the user this convenience:
- test "$txiformat" = Texinfo && escape=@
- fi
- thumbpdf=${THUMBPDF:-thumbpdf}
- ;;
- esac
-
- # 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
- # generates different output (arguably this is a bug in -E).
- # Discard main info output, the user asked to run TeX, not makeinfo.
- if test -n "$makeinfo"; then
- verbose "Macro-expanding $command_line_filename to $filename_src ..."
- sed -f $comment_iftex_sed "$command_line_filename" \
- | $makeinfo --footnote-style=end -I "$filename_dir" $miincludes \
- -o /dev/null --macro-expand=- \
- | sed -f $uncomment_iftex_sed >"$filename_src"
- filename_input=$filename_src
+ out_name=$in_noext.`out_lang_ext`
fi
+ out_dir=`func_dirname "$out_name"`
+ out_dir_abs=`absolute "$out_dir"`
+ out_base=`basename "$out_name"`
+ out_noext=`echo "$out_base" | sed 's/\.[^.]*$//'`
+}
- # If makeinfo failed (or was not even run), use the original file as input.
- if test $? -ne 0 \
- || test ! -r "$filename_src"; then
- verbose "Reverting to $command_line_filename ..."
- filename_input=$filename_dir/$filename_ext
- fi
- # Used most commonly for @finalout, @smallbook, etc.
- if test -n "$textra"; then
- verbose "Inserting extra commands: $textra"
- sed "$textra_cmd\\
-$textra" "$filename_input" >"$filename_xtr"
- filename_input=$filename_xtr
- fi
+## -------------- ##
+## TeXify files. ##
+## -------------- ##
- # If this is a Texinfo file with a specified input encoding, and
- # recode is available, then recode to plain 7 bit Texinfo.
- if test $language = texinfo; then
- pgm='s/^ *@documentencoding *\([^ ][^ ]*\) *$/\1/
- t found
- d
- :found
- q'
- encoding=`sed -e "$pgm" "$filename_input"`
- if $recode && test -n "$encoding" && findprog recode; then
- verbose "Recoding from $encoding to Texinfo."
- if recode "$encoding"..texinfo <"$filename_input" >"$filename_rcd" \
- && test -s "$filename_rcd"; then
- filename_input=$filename_rcd
- else
- verbose "Recoding failed, using original input."
- fi
- fi
- fi
+for command_line_filename
+do
+ verbose "Processing $command_line_filename ..."
- # If clean mode was specified, then move to the temporary directory.
- if test "$clean" = t; then
- verbose "cd $tmpdir_src"
- cd "$tmpdir_src" || exit 1
+ input_file_name_decode
+
+ # `texinfo' or `latex'?
+ in_lang=`compute_language "$command_line_filename"`
+
+ # An auxiliary directory used for all the auxiliary tasks involved
+ # in compiling this document.
+ case $build_dir in
+ '' | . ) t2ddir=$out_noext.t2d ;;
+ *) # Avoid collisions between multiple occurrences of the same
+ # file. The sed expression is fragile if the cwd has
+ # active characters.
+ t2ddir=$build_dir/`echo "$out_dir_abs/$out_noext.t2d" |
+ sed "s,^$orig_pwd/,," |
+ sed 's,/,!,g'`
+ esac
+ # Remove it at exit if clean mode.
+ trap "cleanup" 0 1 2 15
+
+ ensure_dir "$build_dir" "$t2ddir"
+
+ # We will change directory, better work with an absolute path...
+ t2ddir=`absolute "$t2ddir"`
+ # Sometimes there are incompatibilities between auxiliary files for
+ # DVI and PDF. The contents can also change whether we work on PDF
+ # and/or DVI. So keep separate spaces for each.
+ workdir=$t2ddir/`out_lang_tex`
+ ensure_dir "$workdir"
+
+ # _build. In a tidy build, where the auxiliary files are output.
+ if $tidy; then
+ work_build=$workdir/build
+ else
+ work_build=.
fi
- while :; do # will break out of loop below
- orig_xref_files=`get_xref_files "$filename_noext"`
-
- # Save copies of originals for later comparison.
- if test -n "$orig_xref_files"; then
- verbose "Backing up xref files: `echo $orig_xref_files | sed 's|\./||g'`"
- cp $orig_xref_files $tmpdir_bak
- fi
-
- # 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
- #
- # We run bibtex first, because I can see reasons for the indexes
- # 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.
- # Since we know index files are last, it is correct to remove everything
- # before .aux and .?o?. But don't really do <anything>o<anything>
- # -- don't match whitespace as <anything>.
- # Otherwise, if orig_xref_files contains something like
- # foo.xo foo.whatever
- # the space after the o will get matched.
- index_files=`echo "$orig_xref_files" \
- | sed "s!.*\.aux!!g;
- s!./$filename_noext\.[^ ]o[^ ]!!g;
- s/^[ ]*//;s/[ ]*$//"`
- # Run texindex (or makeindex) 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 "$texindex" && test -n "$index_files"; then
- verbose "Running $texindex $index_files ..."
- $texindex $index_files 2>&5 1>&2 ||
- fatal 1 "$texindex exited with bad status, quitting."
- fi
-
- # Finally, run TeX.
- run_tex
-
- # Decide if looping again is needed.
- finished=t
-
- # LaTeX (and the package changebar) report in the LOG file if it
- # should be rerun. This is needed for files included from
- # subdirs, since texi2dvi does not try to compare xref files in
- # subdirs. Performing xref files test is still good since LaTeX
- # does not report changes in xref files.
- if grep "Rerun to get" "$filename_noext.log" >&6 2>&1; then
- finished=
- fi
-
- # Check if xref files changed.
- new_xref_files=`get_xref_files "$filename_noext"`
- verbose "Original xref files = `echo $orig_xref_files | sed 's|\./||g'`"
- verbose "New xref files = `echo $new_xref_files | sed 's|\./||g'`"
-
- # If old and new lists don't at least have the same file list,
- # then one file or another has definitely changed.
- test "x$orig_xref_files" != "x$new_xref_files" && finished=
-
- # File list is the same. We must compare each file until we find
- # a difference.
- if test -n "$finished"; then
- for this_file in $new_xref_files; do
- verbose "Comparing xref file `echo $this_file | sed 's|\./||g'` ..."
- # cmp -s returns nonzero exit status if files differ.
- if cmp -s "$this_file" "$tmpdir_bak/$this_file"; then :; else
- # We only need to keep comparing until we find one that
- # differs, because we'll have to run texindex & tex again no
- # matter how many more there might be.
- finished=
- verbose "xref file `echo $this_file | sed 's|\./||g'` differed ..."
- test "$debug" = t && diff -c "$tmpdir_bak/$this_file" "$this_file"
- break
- fi
- done
- fi
-
- # If finished, exit the loop, else rerun the loop.
- test -n "$finished" && break
- done # while :;
-
- # If we were using thumbpdf and producing PDF, then run thumbpdf
- # and TeX one last time.
- if test $oformat = pdf \
- && test -r "$filename_noext.log" \
- && grep 'thumbpdf\.sty' "$filename_noext.log" >&6 2>&1; \
- then
- verbose "Running $thumbpdf $filename_noext ..."
- $thumbpdf "$filename_noext" >&5 ||
- fatal 1 "$thumbpdf exited with bad status, quitting."
- run_tex
- fi
+ # _bak. Copies of the previous auxiliary files (another round is
+ # run if they differ from the new ones).
+ work_bak=$workdir/bak
+ # Make those directories.
+ ensure_dir "$work_build" "$work_bak"
- # If we were in clean mode, compilation was in a tmp directory.
- # Copy the DVI (or PDF) file into the directory where the compilation
- # has been done. (The temp dir is about to get removed anyway.)
- # We also return to the original directory so that
- # - the next file is processed in correct conditions
- # - the temporary file can be removed
- if test -n "$clean"; then
- if test -n "$oname"; then
- dest=$oname
- else
- dest=$orig_pwd
- fi
- verbose "Copying $oformat file from `pwd` to $dest"
- cp -p "./$filename_noext.$oformat" "$dest"
- cd / # in case $orig_pwd is on a different drive (for DOS)
- cd $orig_pwd || exit 1
- fi
+ case $action in
+ compile)
+ # Compile the document.
+ compile
+ cleanup
+ ;;
- # Remove temporary files.
- if test "x$debug" = "x"; then
- verbose "Removing $tmpdir_src $tmpdir_xtr $tmpdir_bak ..."
- cd /
- rm -rf $tmpdir_src $tmpdir_xtr $tmpdir_bak
- fi
+ mostly-clean)
+ mostly_clean
+ ;;
+ esac
done
verbose "done."
diff --git a/Build/source/utils/texinfo/util/texi2dvi.test b/Build/source/utils/texinfo/util/texi2dvi.test
new file mode 100755
index 00000000000..9d2d99a1118
--- /dev/null
+++ b/Build/source/utils/texinfo/util/texi2dvi.test
@@ -0,0 +1,79 @@
+#! /bin/sh
+# Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Texinfo.
+#
+# GNU Texinfo 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 3 of the License,
+# or (at your option) any later version.
+#
+# GNU Texinfo 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, see <http://www.gnu.org/licenses/>.
+
+required='tex'
+
+. ./defs || exit 1
+
+set -e
+
+# one_run ARGS -- FILES
+# ---------------------
+# Run texi2dvi with ARGS, expect the FILES to be left. Remove them.
+one_run ()
+{
+ # Testing the local build mode.
+ create_input_texi </dev/null
+ TEXI2DVI_pass $(optionset_get 1 "$@") input.texi
+ # There should only be the expected FILES and the input file.
+ assert_and_remove_files $(optionset_get 2 "$@") input.texi
+}
+
+one_run --batch \
+ -- \
+ input.aux input.cp input.dvi input.fn input.ky input.log \
+ input.pg input.tp input.vr
+
+
+one_run --batch -o output.dvi \
+ -- \
+ input.aux input.cp input.fn input.ky input.log \
+ input.pg input.tp input.vr output.dvi
+
+
+# Testing the clean build mode.
+for mode in --clean --build=clean
+do
+ # There should only be the DVI and the TEXI file.
+ one_run $mode --batch -- input.dvi
+
+ # There should only be the DVI and the TEXI file.
+ one_run $mode --batch -o output.dvi -- output.dvi
+done
+
+
+# Testing the tidy build mode.
+one_run --build=tidy --batch -o output.dvi \
+ -- \
+ output.dvi output.t2d
+
+
+# mostly-clean should remove auxiliary files, but not the expected
+# output.
+touch output.dvi
+one_run --build=tidy --batch -o output.dvi --mostly-clean \
+ -- \
+ output.dvi
+
+
+# There should only be the DVI and the TEXI file.
+create_input_texi </dev/null
+cp input.texi input2.texi
+one_run --clean --batch input.texi input2.texi \
+ -- \
+ input2.dvi input2.texi input.dvi
diff --git a/Build/source/utils/texinfo/util/texi2pdf b/Build/source/utils/texinfo/util/texi2pdf
index 492128325db..a030a74ed9f 100755
--- a/Build/source/utils/texinfo/util/texi2pdf
+++ b/Build/source/utils/texinfo/util/texi2pdf
@@ -1,12 +1,12 @@
#!/bin/sh
-# $Id: texi2pdf,v 1.1 2004/07/11 01:02:35 karl Exp $
+# $Id: texi2pdf,v 1.2 2005/01/28 01:52:04 karl Exp $
# Written by Thomas Esser. Public domain.
# Execute texi2dvi --pdf.
-test -f /bin/sh5 && test -z "$RUNNING_SH5" \
+test -f /bin/ksh && test -z "$RUNNING_KSH" \
&& { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
- && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; }
-unset RUNNING_SH5
+ && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; }
+unset RUNNING_KSH
test -f /bin/bsh && test -z "$RUNNING_BSH" \
&& { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
diff --git a/Build/source/utils/texinfo/util/texindex.c b/Build/source/utils/texinfo/util/texindex.c
index 569f877be0d..431f27e8f1d 100644
--- a/Build/source/utils/texinfo/util/texindex.c
+++ b/Build/source/utils/texinfo/util/texindex.c
@@ -1,13 +1,13 @@
/* texindex -- sort TeX index dribble output into an actual index.
- $Id: texindex.c,v 1.11 2004/04/11 17:56:47 karl Exp $
+ $Id: texindex.c,v 1.24 2008/02/22 19:18:25 karl Exp $
Copyright (C) 1987, 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ 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.
+ the Free Software Foundation, either version 3 of the License, 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
@@ -15,13 +15,12 @@
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, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "system.h"
#include <getopt.h>
-static char *program_name = "texindex";
+char *program_name = "texindex";
#if defined (emacs)
# include "../src/config.h"
@@ -37,16 +36,12 @@ static char *program_name = "texindex";
#define memset(ptr, ignore, count) bzero (ptr, count)
#endif
-char *mktemp (char *);
-
#if !defined (SEEK_SET)
# define SEEK_SET 0
# define SEEK_CUR 1
# define SEEK_END 2
#endif /* !SEEK_SET */
-struct linebuffer;
-
/* When sorting in core, this structure describes one line
and the position and length of its first keyfield. */
struct lineinfo
@@ -96,16 +91,6 @@ char **linearray;
/* The allocated length of `linearray'. */
long nlines;
-/* Directory to use for temporary files. On Unix, it ends with a slash. */
-char *tempdir;
-
-/* Number of last temporary file. */
-int tempcount;
-
-/* Number of last temporary file already deleted.
- Temporary files are deleted by `flush_tempfiles' in order of creation. */
-int last_deleted_tempcount;
-
/* During in-core sort, this points to the base of the data block
which contains all the lines of data. */
char *text_base;
@@ -117,15 +102,9 @@ int need_initials;
determine whether we need initials in the sorted form. */
char first_initial;
-/* Additional command switches .*/
-
-/* Nonzero means do not delete tempfiles -- for debugging. */
-int keep_tempfiles;
-
/* Forward declarations of functions in this file. */
void decode_command (int argc, char **argv);
void sort_in_core (char *infile, int total, char *outfile);
-void sort_offline (char *infile, off_t total, char *outfile);
char **parsefile (char *filename, char **nextline, char *data, long int size);
char *find_field (struct keyfield *keyfield, char *str, long int *lengthptr);
char *find_pos (char *str, int words, int chars, int ignore_blanks);
@@ -137,26 +116,17 @@ int compare_field (struct keyfield *keyfield, char *start1,
long int length1, long int pos1, char *start2,
long int length2, long int pos2);
int compare_full (const void *, const void *);
-long readline (struct linebuffer *linebuffer, FILE *stream);
-int merge_files (char **infiles, int nfiles, char *outfile);
-int merge_direct (char **infiles, int nfiles, char *outfile);
void pfatal_with_name (const char *name);
void fatal (const char *format, const char *arg);
void error (const char *format, const char *arg);
void *xmalloc (), *xrealloc ();
-char *concat (char *s1, char *s2);
-void flush_tempfiles (int to_count);
+static char *concat3 (const char *, const char *, const char *);
-#define MAX_IN_CORE_SORT 500000
-
int
-main (int argc, char **argv)
+main (int argc, char *argv[])
{
int i;
- tempcount = 0;
- last_deleted_tempcount = 0;
-
#ifdef HAVE_SETLOCALE
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
@@ -220,19 +190,20 @@ main (int argc, char **argv)
outfile = outfiles[i];
if (!outfile)
- outfile = concat (infiles[i], "s");
+ outfile = concat3 (infiles[i], "s", "");
need_initials = 0;
first_initial = '\0';
- if (ptr < MAX_IN_CORE_SORT)
- /* Sort a small amount of data. */
- sort_in_core (infiles[i], (int)ptr, outfile);
- else
- sort_offline (infiles[i], ptr, outfile);
+ if (ptr != (int)ptr)
+ {
+ fprintf (stderr, "%s: %s: file too large\n", program_name,
+ infiles[i]);
+ xexit (1);
+ }
+ sort_in_core (infiles[i], (int)ptr, outfile);
}
- flush_tempfiles (tempcount);
xexit (0);
return 0; /* Avoid bogus warnings. */
}
@@ -250,10 +221,6 @@ typedef struct
TEXINDEX_OPTION texindex_options[] = {
{ "--help", "-h", (int *)NULL, 0, (char *)NULL,
N_("display this help and exit") },
- { "--keep", "-k", &keep_tempfiles, 1, (char *)NULL,
- N_("keep temporary files around after processing") },
- { "--no-keep", 0, &keep_tempfiles, 0, (char *)NULL,
- N_("do not keep temporary files around after processing (default)") },
{ "--output", "-o", (int *)NULL, 0, "FILE",
N_("send output to FILE") },
{ "--version", (char *)NULL, (int *)NULL, 0, (char *)NULL,
@@ -308,20 +275,6 @@ decode_command (int argc, char **argv)
char **ip;
char **op;
- /* Store default values into parameter variables. */
-
- tempdir = getenv ("TMPDIR");
- if (tempdir == NULL)
- tempdir = getenv ("TEMP");
- if (tempdir == NULL)
- tempdir = getenv ("TMP");
- if (tempdir == NULL)
- tempdir = DEFAULT_TMPDIR;
- else
- tempdir = concat (tempdir, "/");
-
- keep_tempfiles = 0;
-
/* Allocate ARGC input files, which must be enough. */
infiles = (char **) xmalloc (argc * sizeof (char *));
@@ -339,16 +292,17 @@ decode_command (int argc, char **argv)
{
printf ("texindex (GNU %s) %s\n", PACKAGE, VERSION);
puts ("");
- puts ("Copyright (C) 2004 Free Software Foundation, Inc.");
- printf (_("There is NO warranty. You may redistribute this software\n\
-under the terms of the GNU General Public License.\n\
-For more information about these matters, see the files named COPYING.\n"));
+ printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
+This is free software: you are free to change and redistribute it.\n\
+There is NO WARRANTY, to the extent permitted by law.\n"),
+ "2008");
xexit (0);
}
else if ((strcmp (arg, "--keep") == 0) ||
(strcmp (arg, "-k") == 0))
{
- keep_tempfiles = 1;
+ /* Ignore, for backward compatibility */
}
else if ((strcmp (arg, "--help") == 0) ||
(strcmp (arg, "-h") == 0))
@@ -384,41 +338,6 @@ For more information about these matters, see the files named COPYING.\n"));
usage (1);
}
-/* Return a name for temporary file COUNT. */
-
-static char *
-maketempname (int count)
-{
- static char *tempbase = NULL;
- char tempsuffix[10];
-
- if (!tempbase)
- {
- int fd;
- tempbase = concat (tempdir, "txidxXXXXXX");
-
- fd = mkstemp (tempbase);
- if (fd == -1)
- pfatal_with_name (tempbase);
- }
-
- sprintf (tempsuffix, ".%d", count);
- return concat (tempbase, tempsuffix);
-}
-
-
-/* Delete all temporary files up to TO_COUNT. */
-
-void
-flush_tempfiles (int to_count)
-{
- if (keep_tempfiles)
- return;
- while (last_deleted_tempcount < to_count)
- unlink (maketempname (++last_deleted_tempcount));
-}
-
-
/* Compare LINE1 and LINE2 according to the specified set of keyfields. */
int
@@ -801,150 +720,6 @@ compare_field (struct keyfield *keyfield, char *start1, long int length1,
}
}
-/* A `struct linebuffer' is a structure which holds a line of text.
- `readline' reads a line from a stream into a linebuffer
- and works regardless of the length of the line. */
-
-struct linebuffer
-{
- long size;
- char *buffer;
-};
-
-/* Initialize LINEBUFFER for use. */
-
-void
-initbuffer (struct linebuffer *linebuffer)
-{
- linebuffer->size = 200;
- linebuffer->buffer = (char *) xmalloc (200);
-}
-
-/* Read a line of text from STREAM into LINEBUFFER.
- Return the length of the line. */
-
-long
-readline (struct linebuffer *linebuffer, FILE *stream)
-{
- char *buffer = linebuffer->buffer;
- char *p = linebuffer->buffer;
- char *end = p + linebuffer->size;
-
- while (1)
- {
- int c = getc (stream);
- if (p == end)
- {
- buffer = (char *) xrealloc (buffer, linebuffer->size *= 2);
- p += buffer - linebuffer->buffer;
- end += buffer - linebuffer->buffer;
- linebuffer->buffer = buffer;
- }
- if (c < 0 || c == '\n')
- {
- *p = 0;
- break;
- }
- *p++ = c;
- }
-
- return p - buffer;
-}
-
-/* Sort an input file too big to sort in core. */
-
-void
-sort_offline (char *infile, off_t total, char *outfile)
-{
- /* More than enough. */
- int ntemps = 2 * (total + MAX_IN_CORE_SORT - 1) / MAX_IN_CORE_SORT;
- char **tempfiles = (char **) xmalloc (ntemps * sizeof (char *));
- FILE *istream = fopen (infile, "r");
- int i;
- struct linebuffer lb;
- long linelength;
- int failure = 0;
-
- initbuffer (&lb);
-
- /* Read in one line of input data. */
-
- linelength = readline (&lb, istream);
-
- if (lb.buffer[0] != '\\' && lb.buffer[0] != '@')
- {
- error (_("%s: not a texinfo index file"), infile);
- return;
- }
-
- /* Split up the input into `ntemps' temporary files, or maybe fewer,
- and put the new files' names into `tempfiles' */
-
- for (i = 0; i < ntemps; i++)
- {
- char *outname = maketempname (++tempcount);
- FILE *ostream = fopen (outname, "w");
- long tempsize = 0;
-
- if (!ostream)
- pfatal_with_name (outname);
- tempfiles[i] = outname;
-
- /* Copy lines into this temp file as long as it does not make file
- "too big" or until there are no more lines. */
-
- while (tempsize + linelength + 1 <= MAX_IN_CORE_SORT)
- {
- tempsize += linelength + 1;
- fputs (lb.buffer, ostream);
- putc ('\n', ostream);
-
- /* Read another line of input data. */
-
- linelength = readline (&lb, istream);
- if (!linelength && feof (istream))
- break;
-
- if (lb.buffer[0] != '\\' && lb.buffer[0] != '@')
- {
- error (_("%s: not a texinfo index file"), infile);
- failure = 1;
- goto fail;
- }
- }
- fclose (ostream);
- if (feof (istream))
- break;
- }
-
- free (lb.buffer);
-
-fail:
- /* Record number of temp files we actually needed. */
-
- ntemps = i;
-
- /* Sort each tempfile into another tempfile.
- Delete the first set of tempfiles and put the names of the second
- into `tempfiles'. */
-
- for (i = 0; i < ntemps; i++)
- {
- char *newtemp = maketempname (++tempcount);
- sort_in_core (tempfiles[i], MAX_IN_CORE_SORT, newtemp);
- if (!keep_tempfiles)
- unlink (tempfiles[i]);
- tempfiles[i] = newtemp;
- }
-
- if (failure)
- return;
-
- /* Merge the tempfiles together and indexify. */
-
- merge_files (tempfiles, ntemps, outfile);
-}
-
/* Sort INFILE, whose size is TOTAL,
assuming that is small enough to be done in-core,
then indexify it and send the output to OUTFILE (or to stdout). */
@@ -1348,8 +1123,7 @@ writelines (char **linearray, int nlines, FILE *ostream)
for (next_line = linearray; next_line != stop_line; next_line++)
{
- /* If -u was specified, output the line only if distinct from
- previous one. */
+ /* Output the line only if distinct from previous one. */
if (next_line == linearray
/* Compare previous line with this one, using only the
explicitly specd keyfields. */
@@ -1369,215 +1143,6 @@ writelines (char **linearray, int nlines, FILE *ostream)
finish_index (ostream);
}
-/* Assume (and optionally verify) that each input file is sorted;
- merge them and output the result.
- Returns nonzero if any input file fails to be sorted.
-
- This is the high-level interface that can handle an unlimited
- number of files. */
-
-#define MAX_DIRECT_MERGE 10
-
-int
-merge_files (char **infiles, int nfiles, char *outfile)
-{
- char **tempfiles;
- int ntemps;
- int i;
- int value = 0;
- int start_tempcount = tempcount;
-
- if (nfiles <= MAX_DIRECT_MERGE)
- return merge_direct (infiles, nfiles, outfile);
-
- /* Merge groups of MAX_DIRECT_MERGE input files at a time,
- making a temporary file to hold each group's result. */
-
- ntemps = (nfiles + MAX_DIRECT_MERGE - 1) / MAX_DIRECT_MERGE;
- tempfiles = (char **) xmalloc (ntemps * sizeof (char *));
- for (i = 0; i < ntemps; i++)
- {
- int nf = MAX_DIRECT_MERGE;
- if (i + 1 == ntemps)
- nf = nfiles - i * MAX_DIRECT_MERGE;
- tempfiles[i] = maketempname (++tempcount);
- value |= merge_direct (&infiles[i * MAX_DIRECT_MERGE], nf, tempfiles[i]);
- }
-
- /* All temporary files that existed before are no longer needed
- since their contents have been merged into our new tempfiles.
- So delete them. */
- flush_tempfiles (start_tempcount);
-
- /* Now merge the temporary files we created. */
-
- merge_files (tempfiles, ntemps, outfile);
-
- free (tempfiles);
-
- return value;
-}
-
-/* Assume (and optionally verify) that each input file is sorted;
- merge them and output the result.
- Returns nonzero if any input file fails to be sorted.
-
- This version of merging will not work if the number of
- input files gets too high. Higher level functions
- use it only with a bounded number of input files. */
-
-int
-merge_direct (char **infiles, int nfiles, char *outfile)
-{
- struct linebuffer *lb1, *lb2;
- struct linebuffer **thisline, **prevline;
- FILE **streams;
- int i;
- int nleft;
- int lossage = 0;
- int *file_lossage;
- struct linebuffer *prev_out = 0;
- FILE *ostream = stdout;
-
- if (outfile)
- {
- ostream = fopen (outfile, "w");
- }
- if (!ostream)
- pfatal_with_name (outfile);
-
- init_index ();
-
- if (nfiles == 0)
- {
- if (outfile)
- fclose (ostream);
- return 0;
- }
-
- /* For each file, make two line buffers. Also, for each file, there
- is an element of `thisline' which points at any time to one of the
- file's two buffers, and an element of `prevline' which points to
- the other buffer. `thisline' is supposed to point to the next
- available line from the file, while `prevline' holds the last file
- line used, which is remembered so that we can verify that the file
- is properly sorted. */
-
- /* lb1 and lb2 contain one buffer each per file. */
- lb1 = (struct linebuffer *) xmalloc (nfiles * sizeof (struct linebuffer));
- lb2 = (struct linebuffer *) xmalloc (nfiles * sizeof (struct linebuffer));
-
- /* thisline[i] points to the linebuffer holding the next available
- line in file i, or is zero if there are no lines left in that file. */
- thisline = (struct linebuffer **)
- xmalloc (nfiles * sizeof (struct linebuffer *));
- /* prevline[i] points to the linebuffer holding the last used line
- from file i. This is just for verifying that file i is properly
- sorted. */
- prevline = (struct linebuffer **)
- xmalloc (nfiles * sizeof (struct linebuffer *));
- /* streams[i] holds the input stream for file i. */
- streams = (FILE **) xmalloc (nfiles * sizeof (FILE *));
- /* file_lossage[i] is nonzero if we already know file i is not
- properly sorted. */
- file_lossage = (int *) xmalloc (nfiles * sizeof (int));
-
- /* Allocate and initialize all that storage. */
-
- for (i = 0; i < nfiles; i++)
- {
- initbuffer (&lb1[i]);
- initbuffer (&lb2[i]);
- thisline[i] = &lb1[i];
- prevline[i] = &lb2[i];
- file_lossage[i] = 0;
- streams[i] = fopen (infiles[i], "r");
- if (!streams[i])
- pfatal_with_name (infiles[i]);
-
- readline (thisline[i], streams[i]);
- }
-
- /* Keep count of number of files not at eof. */
- nleft = nfiles;
-
- while (nleft)
- {
- struct linebuffer *best = 0;
- struct linebuffer *exch;
- int bestfile = -1;
- int i;
-
- /* Look at the next avail line of each file; choose the least one. */
-
- for (i = 0; i < nfiles; i++)
- {
- if (thisline[i] &&
- (!best ||
- 0 < compare_general (best->buffer, thisline[i]->buffer,
- (long) bestfile, (long) i, num_keyfields)))
- {
- best = thisline[i];
- bestfile = i;
- }
- }
-
- /* Output that line, unless it matches the previous one and we
- don't want duplicates. */
-
- if (!(prev_out &&
- !compare_general (prev_out->buffer,
- best->buffer, 0L, 1L, num_keyfields - 1)))
- indexify (best->buffer, ostream);
- prev_out = best;
-
- /* Now make the line the previous of its file, and fetch a new
- line from that file. */
-
- exch = prevline[bestfile];
- prevline[bestfile] = thisline[bestfile];
- thisline[bestfile] = exch;
-
- while (1)
- {
- /* If the file has no more, mark it empty. */
-
- if (feof (streams[bestfile]))
- {
- thisline[bestfile] = 0;
- /* Update the number of files still not empty. */
- nleft--;
- break;
- }
- readline (thisline[bestfile], streams[bestfile]);
- if (thisline[bestfile]->buffer[0] || !feof (streams[bestfile]))
- break;
- }
- }
-
- finish_index (ostream);
-
- /* Free all storage and close all input streams. */
-
- for (i = 0; i < nfiles; i++)
- {
- fclose (streams[i]);
- free (lb1[i].buffer);
- free (lb2[i].buffer);
- }
- free (file_lossage);
- free (lb1);
- free (lb2);
- free (thisline);
- free (prevline);
- free (streams);
-
- if (outfile)
- fclose (ostream);
-
- return lossage;
-}
-
/* Print error message and exit. */
void
@@ -1612,17 +1177,18 @@ pfatal_with_name (const char *name)
}
-/* Return a newly-allocated string concatenating S1 and S2. */
+/* Return a newly-allocated string concatenating S1, S2, and S3. */
-char *
-concat (char *s1, char *s2)
+static char *
+concat3 (const char *s1, const char *s2, const char *s3)
{
- int len1 = strlen (s1), len2 = strlen (s2);
- char *result = (char *) xmalloc (len1 + len2 + 1);
+ int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
+ char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
strcpy (result, s1);
strcpy (result + len1, s2);
- *(result + len1 + len2) = 0;
+ strcpy (result + len1 + len2, s3);
+ *(result + len1 + len2 + len3) = 0;
return result;
}
diff --git a/Build/source/utils/texinfo/util/texinfo.dtd b/Build/source/utils/texinfo/util/texinfo.dtd
index 617992a59f6..d07fdf6ee6b 100644
--- a/Build/source/utils/texinfo/util/texinfo.dtd
+++ b/Build/source/utils/texinfo/util/texinfo.dtd
@@ -1,20 +1,22 @@
-<!-- $Id: texinfo.dtd,v 1.4 2004/12/19 15:08:55 karl Exp $
- Document Type Definition for Texinfo.
+<!-- $Id: texinfo.dtd,v 1.13 2008/01/31 18:33:27 karl Exp $
+ Document Type Definition for Texinfo XML output (the '-'-xml option).
- Author: Philippe Martin (feloy@free.fr)
- Contributors:
- Karl Eichwalder (keichwa@gmx.net)
- Alper Ersoy (dirt@gtk.org)
-
- Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
+ Author: Philippe Martin
+ Contributors:
+ Karl Eichwalder
+ Alper Ersoy
+ Karl Berry
+ Torsten Bronger
-->
-<!-- ENTITIES -->
+<!-- * ENTITIES * -->
<!-- Meta-information -->
<!ENTITY % metainformation "setfilename | settitle | dircategory
@@ -34,27 +36,23 @@
<!ENTITY % titlepage_cmds "author | booktitle | booksubtitle">
<!-- block -->
-<!-- ***** -->
<!ENTITY % block "menu | para | quotation | example | smallexample | lisp
| smalllisp | cartouche | copying
| format | smallformat | display
| smalldisplay | itemize | enumerate | sp | center | group
- | table | multitable | definition">
+ | table | multitable | definition | float | image">
<!-- API definitions -->
-<!-- *************** -->
<!ENTITY % definition.cmds "defcategory | deffunction | defvariable | defparam
| defdelimiter | deftype | defparamtype | defdatatype
| defclass | defclassvar | defoperation">
<!-- Headings -->
-<!-- ******** -->
<!ENTITY % headings "majorheading | chapheading | heading | subheading
| subsubheading">
<!-- Sectioning -->
-<!-- ********** -->
<!ENTITY % section.level1 "top | chapter | unnumbered | appendix">
<!ENTITY % section.level2 "section | unnumberedsec | appendixsec">
@@ -75,6 +73,7 @@
| verbatim | titlepage | %toc;
| %lang; | %variables;
| %headings;
+ | listoffloats
| printindex)*">
<!ENTITY % section.level2.content "(%block;
@@ -95,37 +94,37 @@
| %lang; | %variables;
| %headings;)*">
+<!-- Options (many missing) -->
+<!ENTITY % onoff "on|off">
+<!ENTITY % option.cmds "frenchspacing">
<!-- Inline -->
-<!-- ****** -->
<!ENTITY % Inline.emphasize "strong | emph">
-<!ENTITY % Inline.fonts "b | i | r | sansserif | slanted | titlefont | tt">
+<!ENTITY % Inline.fonts "b | i | r | sansserif | slanted | titlefont | tt
+ | sc">
<!ENTITY % Inline.footnote "footnote">
-<!ENTITY % Inline.markup "code | command | env | file | option | samp
+<!ENTITY % Inline.markup "code | command | env | file | option | samp | verb
| dfn | cite | key | kbd | var | acronym | url">
-<!ENTITY % Inline.math "math">
+<!ENTITY % Inline.math "math | dmn">
<!ENTITY % Inline.reference "xref | inforef | indexterm | email | uref">
-<!ENTITY % Inline.smallcaps "sc">
+<!ENTITY % Inline.misc "click | clicksequence | logo | punct">
<!ENTITY % Inline.phrase
- "%Inline.emphasize; | %Inline.smallcaps; | %Inline.fonts;
- | %Inline.markup; | %Inline.math; | %Inline.reference;
- | %Inline.footnote; ">
+ "%Inline.emphasize; | %Inline.misc; | %Inline.fonts;
+ | %Inline.markup; | %Inline.math; | %Inline.reference;
+ | %Inline.footnote; | %option.cmds; ">
-<!-- ************ -->
<!-- * ELEMENTS * -->
-<!-- ************ -->
<!-- TOP Level Element -->
-<!-- ***************** -->
-<!ELEMENT texinfo ((%metainformation; | titlepage | node | %block; | %toc;
+<!ELEMENT texinfo ((%metainformation; | titlepage | node | synindex | %block; | %toc;
| %variables; | %lang;)* )>
<!ATTLIST texinfo xml:lang (%languagecodes;) 'en'>
<!-- meta-information -->
<!ELEMENT setfilename (#PCDATA)>
-<!ELEMENT settitle (#PCDATA | %Inline.phrase; | footnote)*>
+<!ELEMENT settitle (#PCDATA | %Inline.phrase;)*>
<!ELEMENT dircategory (#PCDATA)>
<!ELEMENT setvalue (#PCDATA | %Inline.phrase;)*>
@@ -150,18 +149,16 @@
<!ELEMENT booksubtitle (#PCDATA | %Inline.phrase;)*>
<!-- NODES -->
-<!-- ***** -->
<!ELEMENT node (nodename, nodenext?, nodeprev?, nodeup?,
- (%section.all; | %block; | %toc; | %lang; | image)*) >
+ (%section.all; | %block; | %toc; | %lang;)*) >
<!ELEMENT nodename (#PCDATA)>
<!ELEMENT nodenext (#PCDATA)>
<!ELEMENT nodeprev (#PCDATA)>
<!ELEMENT nodeup (#PCDATA)>
-<!-- SECTIONING -->
-<!-- ********** -->
+<!-- SECTIONING -->
<!ELEMENT top (title?, (%section.level1.content;))>
<!ELEMENT chapter (title?, (%section.level1.content;))>
@@ -180,18 +177,18 @@
<!ELEMENT appendixsubsubsec (title?, (%section.level4.content;))>
<!-- Headings and titles -->
-<!ELEMENT majorheading (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT chapheading (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT heading (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT subheading (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT subsubheading (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT title (#PCDATA | %Inline.phrase; | footnote)*>
+<!ELEMENT majorheading (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT chapheading (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT heading (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT subheading (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT subsubheading (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT title (#PCDATA | %Inline.phrase;)*>
<!-- Negative Indentation in Blocks -->
<!ELEMENT exdent (#PCDATA | %Inline.phrase;)*>
+
<!-- BLOCK Elements -->
-<!-- ************** -->
<!ELEMENT quotation (%block; | %Inline.phrase; | exdent)*>
<!ELEMENT documentdescription (#PCDATA | %block; | %Inline.phrase;)*>
@@ -229,7 +226,7 @@
<!ELEMENT verbatim (#PCDATA)>
<!ATTLIST verbatim xml:space (preserve) #FIXED 'preserve'>
-<!ELEMENT para (#PCDATA | %Inline.phrase; | footnote | %lang;)*>
+<!ELEMENT para (#PCDATA | %Inline.phrase; | %lang;)*>
<!ATTLIST para
role CDATA #IMPLIED>
@@ -238,27 +235,28 @@
<!ELEMENT menuentry (menunode?, menutitle?, menucomment?)>
<!ELEMENT menunode (#PCDATA)>
<!ELEMENT menutitle (#PCDATA)>
-<!ELEMENT menucomment (#PCDATA | para)*>
+<!ELEMENT menucomment (#PCDATA | %Inline.phrase;)*>
<!-- Floating displays -->
-<!ELEMENT float (floattype, floatpos, (%block;)*, caption?)>
+<!ELEMENT float (floattype, floatpos, (%block;)*,
+ ((caption, shortcaption?) | (shortcaption, caption))?)>
<!ATTLIST float
name CDATA #IMPLIED>
<!ELEMENT floattype (#PCDATA)>
<!ELEMENT floatpos (#PCDATA)>
<!ELEMENT caption (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT shortcaption (#PCDATA | %Inline.phrase;)*>
<!ELEMENT listoffloats EMPTY>
<!ATTLIST listoffloats
type CDATA #IMPLIED>
<!-- Lists -->
<!ELEMENT itemize (itemfunction, (item | itemize | enumerate | indexterm)*)>
-<!ELEMENT enumerate (enumarg?, (item | itemize | enumerate)*)>
+<!ELEMENT enumerate (item | itemize | enumerate | indexterm)*>
<!ATTLIST enumerate
first CDATA #IMPLIED>
<!ELEMENT item (%block;)*>
-<!ELEMENT enumarg (#PCDATA)>
<!ELEMENT itemfunction (#PCDATA | %Inline.phrase;)*>
@@ -275,26 +273,29 @@
<!ELEMENT entry (#PCDATA | %Inline.phrase;)*>
<!-- API definitions -->
-<!ELEMENT definition (definitionterm | definitionitem)+>
+<!ELEMENT definition (definitionterm | definitionitem | indexterm)+>
<!ELEMENT definitionterm (%definition.cmds; | indexterm)+>
<!ELEMENT definitionitem (%block;)*>
-<!ELEMENT defcategory (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT deffunction (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT defvariable (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT defparam (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT defdelimiter (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT deftype (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT defparamtype (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT defdatatype (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT defclass (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT defclassvar (#PCDATA | %Inline.phrase; | footnote)*>
-<!ELEMENT defoperation (#PCDATA | %Inline.phrase; | footnote)*>
+<!ELEMENT defcategory (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT deffunction (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT defvariable (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT defparam (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT defdelimiter (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT deftype (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT defparamtype (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT defdatatype (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT defclass (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT defclassvar (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT defoperation (#PCDATA | %Inline.phrase;)*>
<!-- INLINE Elements -->
-<!-- *************** -->
-<!-- Emphasize -->
+<!-- options -->
+<!ELEMENT frenchspacing (#PCDATA)> <!-- must be on or off -->
+<!ATTLIST frenchspacing val (%onoff;) 'off'>
+
+<!-- emphasize -->
<!ELEMENT strong (#PCDATA | %Inline.phrase;)*>
<!ELEMENT emph (#PCDATA | %Inline.phrase;)*>
@@ -302,12 +303,13 @@
<!ELEMENT sc (#PCDATA | %Inline.phrase;)*>
<!-- fonts -->
-<!ELEMENT i (#PCDATA | %Inline.phrase;)*>
<!ELEMENT b (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT tt (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT i (#PCDATA | %Inline.phrase;)*>
<!ELEMENT r (#PCDATA | %Inline.phrase;)*>
-<!ELEMENT notfixedwidth (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT sansserif (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT slanted (#PCDATA | %Inline.phrase;)*>
<!ELEMENT titlefont (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT tt (#PCDATA | %Inline.phrase;)*>
<!-- markup -->
<!ELEMENT code (#PCDATA | %Inline.phrase;)*>
@@ -333,6 +335,7 @@
<!-- math -->
<!ELEMENT math (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT dmn (#PCDATA | %Inline.phrase;)*>
<!-- reference -->
<!ELEMENT anchor EMPTY>
@@ -352,6 +355,11 @@
<!ELEMENT inforefrefname (#PCDATA | %Inline.phrase;)*>
<!ELEMENT inforefinfoname (#PCDATA | %Inline.phrase;)*>
+<!ELEMENT synindex EMPTY>
+<!ATTLIST synindex
+ code (yes|no) 'no'
+ from NMTOKEN #REQUIRED
+ to NMTOKEN #REQUIRED>
<!ELEMENT indexterm (#PCDATA | %Inline.phrase;)*>
<!ATTLIST indexterm
index CDATA #IMPLIED>
@@ -368,10 +376,14 @@
<!ELEMENT footnote (para)>
-<!ELEMENT neos EMPTY>
+<!ELEMENT punct (#PCDATA)>
+<!ATTLIST punct
+ end-of-sentence (yes|no) #IMPLIED>
+<!ELEMENT logo (#PCDATA)>
+<!ELEMENT linebreak EMPTY>
-<!ENTITY tex "TeX"> <!-- Should become an element. -->
-<!ENTITY latex "LaTeX"> <!-- Should become an element. -->
+<!ENTITY tex "<logo>TeX</logo>">
+<!ENTITY latex "<logo>LaTeX</logo>">
<!ENTITY ellipsis "&#x2026;">
<!ENTITY lt "&#x3c;">
<!ENTITY gt "&#x3e;">
@@ -381,21 +393,29 @@
<!ENTITY euro "&#x20ac;">
<!ENTITY pounds "&#xa3;">
<!ENTITY minus "&#x2212;">
-<!ENTITY linebreak "&#xa;"> <!-- Should become an element. -->
+<!ENTITY linebreak "<linebreak/>">
<!ENTITY space " "> <!-- Should become an element. -->
-<!ENTITY dots "&#x2026;<neos/>">
-<!ENTITY enddots "&#x2026;">
+<!ENTITY dots "<punct end-of-sentence='no'>&#x2026;</punct>">
+<!ENTITY enddots "<punct end-of-sentence='yes'>&#x2026;</punct>">
<!ENTITY amp "&#x26;">
+<!ENTITY lsquo "&#x2018;">
+<!ENTITY rsquo "&#x2019;">
+<!ENTITY sbquo "&#x201a;">
<!ENTITY ldquo "&#x201c;">
<!ENTITY rdquo "&#x201d;">
+<!ENTITY bdquo "&#x201e;">
+<!ENTITY laquo "&#xab;">
+<!ENTITY raquo "&#xbb;">
+<!ENTITY lsaquo "&#x2039;">
+<!ENTITY rsaquo "&#x203a;">
<!ENTITY mdash "&#x2014;">
<!ENTITY ndash "&#x2013;">
-<!ENTITY period ".<neos/>">
-<!ENTITY eosperiod ".">
-<!ENTITY quest "?<neos/>">
-<!ENTITY eosquest "?">
-<!ENTITY excl "!<neos/>">
-<!ENTITY eosexcl "!">
+<!ENTITY period "<punct end-of-sentence='no'>.</punct>">
+<!ENTITY eosperiod "<punct end-of-sentence='yes'>.</punct>">
+<!ENTITY quest "<punct end-of-sentence='no'>?</punct>">
+<!ENTITY eosquest "<punct end-of-sentence='yes'>?</punct>">
+<!ENTITY excl "<punct end-of-sentence='no'>!</punct>">
+<!ENTITY eosexcl "<punct end-of-sentence='yes'>!</punct>">
<!ENTITY auml "&#xe4;">
<!ENTITY ouml "&#xf6;">
@@ -472,6 +492,9 @@
<!ENTITY aring "&#xe5;">
<!ENTITY szlig "&#xdf;">
+<!ENTITY rarr "&#x2192;">
+<!ENTITY rArr "&#x21d2;">
+
<!ENTITY macr "&#xaf;">
diff --git a/Build/source/utils/texinfo/util/txitextest b/Build/source/utils/texinfo/util/txitextest
index 4542bc23641..4a85b0134ef 100755
--- a/Build/source/utils/texinfo/util/txitextest
+++ b/Build/source/utils/texinfo/util/txitextest
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: txitextest,v 1.5 2004/04/11 17:56:47 karl Exp $
+# $Id: txitextest,v 1.8 2006/08/14 13:18:20 karl Exp $
# Test texinfo.tex changes by running various manuals through with an
# old version, saving the .ps result from dvips, doing the same with a
# new version, and comparing. Idea from Stepan Kasal.
@@ -7,15 +7,15 @@
# Another option is to run the manuals all the way through using
# texi2dvi, which tests in another way.
-tsrc=/u/texinfo/src
+tsrc=`dirname $0`/..
PATH=$tsrc/util:$PATH
tdoc=$tsrc/doc
default_manuals="$tdoc/texinfo.txi $tdoc/info.texi $tdoc/info-stnd.texi"
-olddir=$HOME/gnu/src/gnulib/config
+olddir=$tsrc/../gnulib/config
newdir=$tdoc
-tempdir=/u/texinfo/@tests/testdir
+tempdir=$tsrc/@tests/test
full=false
manuals=
@@ -48,7 +48,7 @@ for manual in $manuals; do
test $mandir = . && mandir=$initial_dir
manual_base=`basename "$manual" | sed 's/\.[^.]*$//'`
- rm -f $manual_base.* texinfo.tex
+ rm -rf $manual_base.* texinfo.tex
ln -s $newdir/texinfo.tex texinfo.tex
if $full; then
@@ -66,7 +66,7 @@ for manual in $manuals; do
mv $manual_base.ps new.$manual_base.ps
echo "$0: testing $manual_base... (old)"
- rm -f $manual_base.* texinfo.tex
+ rm -rf $manual_base.* texinfo.tex
ln -s $olddir/texinfo.tex texinfo.tex
run_tex
dvips $manual_base -o || exit 1