aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/Makefile.in2
-rw-r--r--support/SYMLINKS1
-rwxr-xr-xsupport/config.guess21
-rwxr-xr-xsupport/config.sub35
-rwxr-xr-xsupport/missing188
-rw-r--r--support/mksignames.c6
-rwxr-xr-xsupport/rlvers.sh71
-rwxr-xr-xsupport/shobj-conf341
-rwxr-xr-xsupport/texi2dvi467
-rwxr-xr-xsupport/texi2html144
10 files changed, 1032 insertions, 244 deletions
diff --git a/support/Makefile.in b/support/Makefile.in
index 8daea28..6c9e9ab 100644
--- a/support/Makefile.in
+++ b/support/Makefile.in
@@ -18,7 +18,7 @@ VPATH = .:@srcdir@
BUILD_DIR = @BUILD_DIR@
RM = rm -f
-SHELL = /bin/sh
+SHELL = @MAKE_SHELL@
CC = @CC@
#
diff --git a/support/SYMLINKS b/support/SYMLINKS
index c69b77e..93bde6f 100644
--- a/support/SYMLINKS
+++ b/support/SYMLINKS
@@ -10,6 +10,7 @@ lib/readline/ansi_stdlib.h ../posixheaders/ansi_stdlib.h
lib/readline/posixdir.h ../posixheaders/posixdir.h
lib/readline/posixjmp.h ../posixheaders/posixjmp.h
lib/readline/posixstat.h ../posixheaders/posixstat.h
+lib/readline/rlstdc.h ../posixheaders/stdc.h
lib/readline/xmalloc.c ../malloc/xmalloc.c
#
#lib/tilde/memalloc.h ../posixheaders/memalloc.h
diff --git a/support/config.guess b/support/config.guess
index 2f152ff..66a2428 100755
--- a/support/config.guess
+++ b/support/config.guess
@@ -151,6 +151,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:QNX:*:42*)
echo i386-qssl-qnx`echo ${UNAME_VERSION}`
exit 0 ;;
+ BeBox:BeOS:*:*)
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*)
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*)
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
# end cases added for Bash
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
@@ -213,6 +225,9 @@ EOF
amiga:OpenBSD:*:*)
echo m68k-cbm-openbsd${UNAME_RELEASE}
exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -315,10 +330,10 @@ EOF
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
Power?Macintosh:Rhapsody:*:*)
- echo powerpc-apple-nextstep${UNAME_RELEASE}
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-unknown-nextstep${UNAME_RELEASE}
+ echo ${UNAME_MACHINE}-unknown-rhapsody${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
@@ -867,7 +882,7 @@ EOF
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
- exit 0 ;;
+ exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/support/config.sub b/support/config.sub
index 419d332..c1ec2df 100755
--- a/support/config.sub
+++ b/support/config.sub
@@ -94,7 +94,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple)
+ -apple )
os=
basic_machine=$1
;;
@@ -184,7 +184,7 @@ case $basic_machine in
| cadmus-* | ews*-nec | ibmrt-ibm* | masscomp-masscomp \
| tandem-* | symmetric-* | drs6000-icl | *-*ardent | gould-gould \
| concurrent-* | ksr1-* | esa-ibm | fxc-alliant | *370-amdahl \
- | *-convex)
+ | *-convex | sx4*-nec)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -209,7 +209,12 @@ case $basic_machine in
os=-sysv
;;
amiga | amiga-*)
- basic_machine=m68k-cbm
+# basic_machine=m68k-cbm
+ basic_machine=m68k-unknown
+ ;;
+ amigaos)
+ basic_machine=m68k-unknown
+ os=-amigaos
;;
amigados)
basic_machine=m68k-cbm
@@ -405,6 +410,14 @@ case $basic_machine in
miniframe)
basic_machine=m68000-convergent
;;
+ mipsel*-linux*)
+ basic_machine=mipsel-unknown
+ os=-linux
+ ;;
+ mips*-linux*)
+ basic_machine=mips-unknown
+ os=-linux
+ ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -639,7 +652,11 @@ case $basic_machine in
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
mips)
- basic_machine=mips-mips
+ if test "x$os" = "x-linux" ; then
+ basic_machine=mips-unknown
+ else
+ basic_machine=mips-mips
+ fi
;;
romp)
basic_machine=romp-ibm
@@ -719,7 +736,7 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
@@ -727,7 +744,8 @@ case $os in
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -linux-gnu* | -uxpv* | -qnx* | -powerux)
+ | -linux-gnu* | -uxpv* | -qnx* | -powerux* | -beos* | -rhapsody* \
+ | -superux* )
# Remember, each alternative MUST END IN *, to match a version number.
;;
-linux*)
@@ -843,6 +861,9 @@ case $basic_machine in
sparc-* | *-sun)
os=-sunos4.1.1
;;
+ *-be)
+ os=-beos
+ ;;
*-ibm)
os=-aix
;;
@@ -856,7 +877,7 @@ case $basic_machine in
os=-sysv
;;
*-cbm)
- os=-amigados
+ os=-amigaos
;;
*-dg)
os=-dgux
diff --git a/support/missing b/support/missing
new file mode 100755
index 0000000..cbe2b0e
--- /dev/null
+++ b/support/missing
@@ -0,0 +1,188 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing - GNU libit 0.0"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`configure.in'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`configure.in'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`configure.in'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
+ if test -z "$files"; then
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
+ test -z "$files" || files="$files.in"
+ else
+ files=`echo "$files" | sed -e 's/:/ /g'`
+ fi
+ test -z "$files" && files="config.h.in"
+ touch $files
+ ;;
+
+ automake)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print \
+ | sed 's/^\(.*\).am$/touch \1.in/' \
+ | sh
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/support/mksignames.c b/support/mksignames.c
index 19fd3f2..634263e 100644
--- a/support/mksignames.c
+++ b/support/mksignames.c
@@ -260,7 +260,7 @@ initialize_signames ()
#endif
/* 4.4 BSD */
-#if defined (SIGINFO) /* information request */
+#if defined (SIGINFO) && !defined (_SEQUENT_) /* information request */
signal_names[SIGINFO] = "SIGINFO";
#endif
@@ -272,6 +272,10 @@ initialize_signames ()
signal_names[SIGUSR2] = "SIGUSR2";
#endif
+#if defined (SIGKILLTHR) /* BeOS: Kill Thread */
+ signal_names[SIGKILLTHR] = "SIGKILLTHR";
+#endif
+
for (i = 0; i < NSIG; i++)
if (signal_names[i] == (char *)NULL)
{
diff --git a/support/rlvers.sh b/support/rlvers.sh
new file mode 100755
index 0000000..12abeda
--- /dev/null
+++ b/support/rlvers.sh
@@ -0,0 +1,71 @@
+#! /bin/sh
+#
+# rlvers.sh -- run a program that prints out the readline version number
+# using locally-installed readline libraries
+#
+
+PROGNAME=`basename $0`
+
+trap 'rm -f /tmp/rlvers /tmp/rlvers.?' 0 1 2 3 6 15
+
+# defaults
+CC=cc
+RL_LIBDIR=/usr/local/lib
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -C) shift ; CC="$1"; shift ;;
+ -L) shift ; RL_LIBDIR="$1" ; shift ;;
+ -v) shift ; verbose=y ;;
+ --) shift ; break ;;
+ *) echo "${PROGNAME}: usage: $PROGNAME [-C compiler] [-L libdir] [-v]" >&2 ; exit 2;;
+ esac
+done
+
+# if someone happened to install examples/rlversion, use it (it's not
+# installed by default)
+if test -f ${RL_LIBDIR}/rlversion ; then
+ if [ -n "$verbose" ]; then
+ echo "${PROGNAME}: using installed rlversion from ${RL_LIBDIR}/rlversion"
+ fi
+ v=`${RL_LIBDIR}/rlversion 2>/dev/null`
+ case "$v" in
+ unknown | "") echo 0 ;;
+ *) echo "$v" ;;
+ esac
+ exit 0
+fi
+
+if [ -n "$verbose" ]; then
+ echo "${PROGNAME}: using ${RL_LIBDIR} to find libreadline"
+ echo "${PROGNAME}: attempting program compilation"
+fi
+
+cat > /tmp/rlvers.c << EOF
+#include <stdio.h>
+extern char *rl_library_version;
+
+main()
+{
+ printf("%s\n", rl_library_version ? rl_library_version : "0");
+ exit(0);
+}
+EOF
+
+if eval ${CC} -L${RL_LIBDIR} -o /tmp/rlvers /tmp/rlvers.c -lreadline -ltermcap -lcurses;
+then
+ v=`/tmp/rlvers`
+else
+ if [ -n "$verbose" ] ; then
+ echo "${PROGNAME}: compilation failed: status $?"
+ echo "${PROGNAME}: using version 0"
+ fi
+ v=0
+fi
+
+case "$v" in
+unknown | "") echo 0 ;;
+*) echo "$v" ;;
+esac
+
+exit 0
diff --git a/support/shobj-conf b/support/shobj-conf
new file mode 100755
index 0000000..cbd3d1b
--- /dev/null
+++ b/support/shobj-conf
@@ -0,0 +1,341 @@
+#! /bin/sh
+#
+# shobj-conf -- output a series of variable assignments to be substituted
+# into a Makefile by configure which specify system-dependent
+# information for creating shared objects that may be loaded
+# into bash with `enable -f'
+#
+# usage: shobj-conf [-C compiler] -c host_cpu -o host_os -v host_vendor
+#
+# Chet Ramey
+# chet@po.cwru.edu
+
+#
+# defaults
+#
+SHOBJ_STATUS=supported
+SHLIB_STATUS=supported
+
+SHOBJ_CC=cc
+SHOBJ_CFLAGS=
+SHOBJ_LD=
+SHOBJ_LDFLAGS=
+SHOBJ_XLDFLAGS=
+SHOBJ_LIBS=
+
+SHLIB_XLDFLAGS=
+SHLIB_LIBS=
+SHLIB_LIBSUFF='so'
+
+SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)'
+
+PROGNAME=`basename $0`
+USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor"
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -C) shift; SHOBJ_CC="$1"; shift ;;
+ -c) shift; host_cpu="$1"; shift ;;
+ -o) shift; host_os="$1"; shift ;;
+ -v) shift; host_vendor="$1"; shift ;;
+ *) echo "$USAGE" >&2 ; exit 2;;
+ esac
+done
+
+case "${host_os}-${SHOBJ_CC}" in
+sunos4*-gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD=/usr/bin/ld
+ SHOBJ_LDFLAGS='-assert pure-text'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+sunos4*)
+ SHOBJ_CFLAGS=-pic
+ SHOBJ_LD=/usr/bin/ld
+ SHOBJ_LDFLAGS='-assert pure-text'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+sunos5*-gcc*|solaris2*-gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-i'
+
+ SHLIB_XLDFLAGS='-R $(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sunos5*|solaris2*)
+ SHOBJ_CFLAGS='-K pic'
+ SHOBJ_LD=/usr/ccs/bin/ld
+ SHOBJ_LDFLAGS='-G -dy -z text -i -h $@'
+
+ SHLIB_XLDFLAGS='-R $(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+freebsd2* | netbsd* | openbsd*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-x -Bshareable'
+
+ SHLIB_XLDFLAGS='-R$(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+freebsd3*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_XLDFLAGS='-R$(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+linux*)
+ SHOBJ_CFLAGS=-fPIC
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+
+ SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+bsdi2*)
+ SHOBJ_CC=shlicc2
+ SHOBJ_CFLAGS=
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS=-r
+ SHOBJ_LIBS=-lc_s.2.1.0
+
+ # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
+ # the ass -- they require changing {/usr/lib,etc}/shlib.map on
+ # each system, and the library creation process is byzantine
+ SHLIB_STATUS=unsupported
+ ;;
+
+bsdi3*)
+ SHOBJ_CC=shlicc2
+ SHOBJ_CFLAGS=
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS=-r
+ SHOBJ_LIBS=-lc_s.3.0.0
+
+ # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
+ # the ass -- they require changing {/usr/lib,etc}/shlib.map on
+ # each system, and the library creation process is byzantine
+ SHLIB_STATUS=unsupported
+ ;;
+
+bsdi4*)
+ # BSD/OS 4.x now supports ELF and SunOS-style dynamically-linked
+ # shared libraries. gcc 2.x is the standard compiler, and the
+ # `normal' gcc options should work as they do in Linux.
+
+ SHOBJ_CFLAGS=-fPIC
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+osf*)
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-shared -soname $@ -expect_unresolved "*"'
+
+ SHLIB_XLDFLAGS='-rpath $(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+aix4.[2-9]*-gcc*) # lightly tested by jik@cisco.com
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='ld'
+ SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
+ SHOBJ_XLDFLAGS='-G'
+
+ SHLIB_XLDFLAGS='-bM:SRE'
+ SHLIB_LIBS='-lcurses -lc'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+aix4.[2-9]*)
+ SHOBJ_CFLAGS=-K
+ SHOBJ_LD='ld'
+ SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
+ SHOBJ_XLDFLAGS='-G'
+
+ SHLIB_XLDFLAGS='-bM:SRE'
+ SHLIB_LIBS='-lcurses -lc'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+#
+# THE FOLLOWING ARE UNTESTED -- and some may not support the dlopen interface
+#
+irix[56]*-gcc*)
+ SHOBJ_CFLAGS='-fpic'
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+
+ SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+irix[56]*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-call_shared -hidden_symbol -no_unresolved -soname $@'
+
+ SHLIB_XLDFLAGS='-rpath $(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+hpux9*-gcc*)
+ # must use gcc; the bundled cc cannot compile PIC code
+ SHOBJ_CFLAGS='-fpic'
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s'
+
+ SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
+ SHLIB_LIBSUFF='sl'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+hpux9*)
+ SHOBJ_STATUS=unsupported
+ SHLIB_STATUS=unsupported
+ ;;
+
+hpux10*-gcc*)
+ # must use gcc; the bundled cc cannot compile PIC code
+ SHOBJ_CFLAGS='-fpic'
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s'
+
+ SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)'
+ SHLIB_LIBSUFF='sl'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+hpux10*)
+ SHOBJ_STATUS=unsupported
+ SHLIB_STATUS=unsupported
+ ;;
+
+hpux11*-gcc*)
+ # must use gcc; the bundled cc cannot compile PIC code
+ SHOBJ_CFLAGS='-fpic'
+ SHOBJ_LD='${CC}'
+# SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,-B,symbolic -Wl,+s -Wl,+std -Wl,+h,$@'
+ SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s -Wl,+h,$@'
+
+ SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
+ SHLIB_LIBSUFF='sl'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+hpux11*)
+ SHOBJ_STATUS=unsupported
+ SHLIB_STATUS=unsupported
+ ;;
+
+sysv4*-gcc*)
+ SHOBJ_CFLAGS=-shared
+ SHOBJ_LDFLAGS='-shared -h $@'
+ SHOBJ_LD='${CC}'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv4*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-dy -z text -G -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sco3.2v5*-gcc*)
+ SHOBJ_CFLAGS='-fpic' # DEFAULTS TO ELF
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sco3.2v5*)
+ SHOBJ_CFLAGS='-K pic -b elf'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -b elf -dy -z text -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5uw7*-gcc*)
+ SHOBJ_CFLAGS='-fpic'
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5uw7*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -dy -z text -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+dgux*-gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+dgux*)
+ SHOBJ_CFLAGS='-K pic'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -dy -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+#
+# Rely on correct gcc configuration for everything else
+#
+*-gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+*)
+ SHOBJ_STATUS=unsupported
+ SHLIB_STATUS=unsupported
+ ;;
+
+esac
+
+echo SHOBJ_CC=\'"$SHOBJ_CC"\'
+echo SHOBJ_CFLAGS=\'"$SHOBJ_CFLAGS"\'
+echo SHOBJ_LD=\'"$SHOBJ_LD"\'
+echo SHOBJ_LDFLAGS=\'"$SHOBJ_LDFLAGS"\'
+echo SHOBJ_XLDFLAGS=\'"$SHOBJ_XLDFLAGS"\'
+echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\'
+
+echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\'
+echo SHLIB_LIBS=\'"$SHLIB_LIBS"\'
+echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\'
+echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\'
+
+echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\'
+echo SHLIB_STATUS=\'"$SHLIB_STATUS"\'
+
+exit 0
diff --git a/support/texi2dvi b/support/texi2dvi
index 8fb2f90..43f652d 100755
--- a/support/texi2dvi
+++ b/support/texi2dvi
@@ -1,10 +1,9 @@
#! /bin/sh
# texi2dvi --- smartly produce DVI files from texinfo sources
-
-# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
-
-# $Id: texi2dvi,v 0.5 1995/06/20 02:21:36 friedman Exp $
-
+# $Id: texi2dvi,v 0.8 1998/02/26 21:13:13 karl Exp $
+#
+# Copyright (C) 1992, 93, 94, 95, 96, 97, 98 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)
@@ -19,65 +18,73 @@
# along with this program; if not, you can either send email to this
# program's maintainer or write to: The Free Software Foundation,
# Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
-
+#
# Commentary:
-
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-
-# Please send bug reports, etc. to bug-texinfo@prep.ai.mit.edu
+#
+# Author: Noah Friedman <friedman@gnu.org>
+#
+# Please send bug reports, etc. to bug-texinfo@gnu.org.
# If possible, please send a copy of the output of the script called with
# the `--debug' option when making a bug report.
-
+#
# In the interest of general portability, some common bourne shell
# constructs were avoided because they weren't guaranteed to be available
# in some earlier implementations. I've tried to make this program as
# portable as possible. Welcome to unix, where the lowest common
# denominator is rapidly diminishing.
#
-# Among the more interesting lossages I noticed with some bourne shells
-# are:
+# Among the more interesting lossages I noticed among Bourne shells:
# * No shell functions.
# * No `unset' builtin.
# * `shift' cannot take a numeric argument, and signals an error if
# there are no arguments to shift.
-
+#
# Code:
# Name by which this script was invoked.
progname=`echo "$0" | sed -e 's/[^\/]*\///g'`
# This string is expanded by rcs automatically when this file is checked out.
-rcs_revision='$Revision: 0.5 $'
+rcs_revision='$Revision: 0.8 $'
version=`set - $rcs_revision; echo $2`
# To prevent hairy quoting and escaping later.
bq='`'
eq="'"
-usage="Usage: $progname {options} [file1] {file2 {...}}
-(version $version)
+usage="Usage: $0 [OPTION]... FILE...
+Run a Texinfo document through TeX.
-Options are:
+Options:
+-b, --batch No interaction (\nonstopmode in TeX).
+-c, --clean Remove all auxiliary files.
-D, --debug Turn on shell debugging ($bq${bq}set -x$eq$eq).
--h, --help You're looking at it.
--v, --version Print version number.
+-t, --texinfo CMD Insert CMD after @setfilename before running TeX.
+--verbose Report on what is done.
+-h, --help Display this help and exit.
+-v, --version Display version information and exit.
-Arguments in brackets are required. Those in braces are optional.
-"
+The values of the TEX, TEXINDEX, and MAKEINFO environment variables are
+used to run those commands, if they are set.
+
+Email bug reports to bug-texinfo@gnu.org."
# Initialize variables.
# Don't use `unset' since old bourne shells don't have this command.
# Instead, assign them an empty value.
-# Some of these, like TEX and TEXINDEX, may be inherited from the environment
-backup_extension=.bak
+# Some of these, like TEX and TEXINDEX, may be inherited from the environment.
+backup_extension=.bak # these files get deleted if all goes well.
+batch=
+clean=
debug=
orig_pwd="`pwd`"
-verbose=
+textra=
+verbose=false
+makeinfo="${MAKEINFO-makeinfo}"
texindex="${TEXINDEX-texindex}"
tex="${TEX-tex}"
-# Save this so we can construct a new TEXINPUTS path for each file to be
-# processed.
+# Save this so we can construct a new TEXINPUTS path for each file.
TEXINPUTS_orig="$TEXINPUTS"
export TEXINPUTS
@@ -86,190 +93,270 @@ export TEXINPUTS
# It's a good idea to document the full long option name in each case.
# Long options which take arguments will need a `*' appended to the
# canonical name to match the value appended after the `=' character.
-while : ; do
- case $# in 0) break ;; esac
+while :; do
+ test $# -eq 0 && break
+
case "$1" in
- -D | --debug | --d* )
- debug=t
- shift
- ;;
- -h | --help | --h* )
- echo "$usage" 1>&2
- exit 0
- ;;
- -v | --version | --v* )
- echo "texi2dvi version $version" 1>&2
- exit 0
- ;;
+ -b | --batch | --b* ) batch=t; shift ;;
+ -c | --clean | --c* ) clean=t; shift ;;
+ -D | --debug | --d* ) debug=t; shift ;;
+ -h | --help | --h* ) echo "$usage"; exit 0 ;;
+ # OK, we should do real option parsing here, but be lazy for now.
+ -t | --texinfo | --t*) shift; textra="$textra $1"; shift ;;
+ -v | --vers* )
+ echo "$progname (GNU Texinfo 3.12) $version"
+ echo "Copyright (C) 1998 Free Software Foundation, Inc.
+There is NO warranty. You may redistribute this software
+under the terms of the GNU General Public License.
+For more information about these matters, see the files named COPYING."
+ exit 0 ;;
+ --verb* ) verbose=echo; shift ;;
-- ) # Stop option processing
shift
- break
- ;;
+ break ;;
-* )
case "$1" in
--*=* ) arg=`echo "$1" | sed -e 's/=.*//'` ;;
* ) arg="$1" ;;
esac
exec 1>&2
- echo "$progname: unknown or ambiguous option $bq$arg$eq"
- echo "$progname: Use $bq--help$eq for a list of options."
- exit 1
- ;;
- * )
- break
- ;;
+ echo "$progname: Unknown or ambiguous option $bq$arg$eq."
+ echo "$progname: Try $bq--help$eq for more information."
+ exit 1 ;;
+ * ) break ;;
esac
done
# See if there are any command line args left (which will be interpreted as
-# filename arguments)
-case $# in
- 0 )
- exec 1>&2
- echo "$progname: at least one file name is required as an argument."
- echo "$progname: Use $bq--help$eq for a description of command syntax."
- exit 2
- ;;
-esac
-
-case "$debug" in t ) set -x ;; esac
+# filename arguments).
+if test $# -eq 0; then
+ exec 1>&2
+ echo "$progname: At least one file name is required as an argument."
+ echo "$progname: Try $bq--help$eq for more information."
+ exit 2
+fi
+
+test "$debug" = t && set -x
# Texify files
-for command_line_filename in ${1+"$@"} ; do
- # Roughly equivalent to `dirname ...`, but more portable
- directory="`echo ${command_line_filename} | sed 's/\/[^\/]*$//'`"
- filename_texi="`basename ${command_line_filename}`"
- # Strip off the last extension part (probably .texinfo or .texi)
- filename_noext="`echo ${filename_texi} | sed 's/\.[^.]*$//'`"
-
- # If directory and file are the same, then it's probably because there's
- # no pathname component. Set dirname to `.', the current directory.
- if test "z${directory}" = "z${command_line_filename}" ; then
- directory="."
- fi
-
- # Source file might @include additional texinfo sources. Put `.' and
- # directory where source file(s) reside in TEXINPUTS before anything
- # else. `.' goes first to ensure that any old .aux, .cps, etc. files in
- # ${directory} don't get used in preference to fresher files in `.'.
- TEXINPUTS=".:${directory}:${TEXINPUTS_orig}"
-
- # "Unset" variables that might have values from previous iterations and
- # which won't be completely reset later.
- definite_index_files=""
-
- # See if file exists here. If it doesn't we're in trouble since, even
- # though the user may be able to reenter a valid filename at the tex
- # prompt (assuming they're attending the terminal), this script won't be
- # able to find the right index files and so forth.
- if test ! -r "${command_line_filename}" ; then
- echo "${progname}: ${command_line_filename}: No such file or permission denied." 1>&2
- continue;
- fi
-
- # Find all files having root filename with a two-letter extension,
- # determine whether they're really index files, and save them. Foo.aux
- # is actually the cross-references file, but we need to keep track of
- # that too.
- possible_index_files="`eval echo ${filename_noext}.?? ${filename_noext}.aux`"
- for this_file in ${possible_index_files} ; do
+for command_line_filename in ${1+"$@"}; do
+ $verbose "Processing $command_line_filename ..."
+
+ # See if file exists. If it doesn't we're in trouble since, even
+ # though the user may be able to reenter a valid filename at the tex
+ # prompt (assuming they're attending the terminal), this script won't
+ # be able to find the right index files and so forth.
+ if test ! -r "${command_line_filename}"; then
+ echo "$0: Could not read ${command_line_filename}." >&2
+ continue
+ fi
+
+ # Roughly equivalent to `dirname ...`, but more portable
+ directory="`echo ${command_line_filename} | sed 's/\/[^\/]*$//'`"
+ filename_texi="`basename ${command_line_filename}`"
+ # Strip off the last extension part (probably .texinfo or .texi)
+ filename_noext="`echo ${filename_texi} | sed 's/\.[^.]*$//'`"
+
+ # Use same basename since we want to generate aux files with the same
+ # basename as the manual. Use extension .texi for the temp file so
+ # that TeX will ignore it. Thus, we must use a subdirectory.
+ #
+ # Output the macro-expanded file to here. The vastly abbreviated
+ # temporary directory name is so we don't have collisions on 8.3 or
+ # 14-character filesystems.
+ tmp_dir=${TMPDIR-/tmp}/txi2d.$$
+ filename_tmp=$tmp_dir/$filename_noext.texi
+ # Output the file with the user's extra commands to here.
+ tmp_dir2=${tmp_dir}.2
+ filename_tmp2=$tmp_dir2/$filename_noext.texi
+ mkdir $tmp_dir $tmp_dir2
+ # Always remove the temporary directories.
+ trap "rm -rf $tmp_dir $tmp_dir2" 1 2 15
+
+ # If directory and file are the same, then it's probably because there's
+ # no pathname component. Set dirname to `.', the current directory.
+ if test "z${directory}" = "z${command_line_filename}"; then
+ directory=.
+ fi
+
+ # Source file might @include additional texinfo sources. Put `.' and
+ # directory where source file(s) reside in TEXINPUTS before anything
+ # else. `.' goes first to ensure that any old .aux, .cps, etc. files in
+ # ${directory} don't get used in preference to fresher files in `.'.
+ TEXINPUTS=".:${directory}:${TEXINPUTS_orig}"
+
+ # Expand macro commands in the original source file using Makeinfo;
+ # the macro syntax bfox implemented is impossible to implement in TeX.
+ # Always use `end' footnote style, since the `separate' style
+ # generates different output (arguably this is a bug in -E).
+ # Discard main info output, the user asked to run TeX, not makeinfo.
+ # Redirect output to /dev/null to throw away `Making info file...' msg.
+ $verbose "Macro-expanding $command_line_filename to $filename_tmp ..."
+ $makeinfo --footnote-style=end -E $filename_tmp -o /dev/null \
+ $command_line_filename >/dev/null
+
+ # But if there were no macros, or makeinfo failed for some reason,
+ # just use the original file. (It shouldn't make any difference, but
+ # let's be safe.)
+ if test $? -ne 0 || cmp -s $filename_tmp $command_line_filename; then
+ $verbose "Reverting to $command_line_filename ..."
+ cp -p $command_line_filename $filename_tmp
+ fi
+ filename_input=$filename_tmp
+ dirname_input=$tmp_dir
+
+ # Used most commonly for @finalout, @smallbook, etc.
+ if test -n "$textra"; then
+ $verbose "Inserting extra commands: $textra."
+ sed '/^@setfilename/a\
+'"$textra" $filename_input >$filename_tmp2
+ filename_input=$filename_tmp2
+ dirname_input=$tmp_dir2
+ fi
+
+ # If clean mode was specified, then move to the temporary directory.
+ if test "$clean" = t; then
+ $verbose "cd $dirname_input"
+ cd $dirname_input || exit 1
+ filename_input=`basename $filename_input`
+ fi
+
+ while true; do # will break out of loop below
+ # "Unset" variables that might have values from previous iterations and
+ # which won't be completely reset later.
+ definite_index_files=
+
+ # Find all files having root filename with a two-letter extension,
+ # determine whether they're really index files, and save them. Foo.aux
+ # is actually the cross-references file, but we need to keep track of
+ # that too.
+ possible_index_files="`eval echo ${filename_noext}.?? ${filename_noext}.aux`"
+ for this_file in ${possible_index_files}; do
# If file is empty, forget it.
- if test ! -s "${this_file}" ; then
- continue;
- fi
+ test -s "${this_file}" || continue
- # Examine first character of file. If it's not a backslash or
- # single quote, then it's definitely not an index or xref file.
+ # Examine first character of file. If it's not suitable to be an
+ # index or xref file, don't process it.
first_character="`sed -n '1s/^\(.\).*$/\1/p;q' ${this_file}`"
- if test "${first_character}" = "\\" -o "${first_character}" = "'" ; then
- definite_index_files="${definite_index_files} ${this_file}"
+ if test "x${first_character}" = "x\\" \
+ || test "x${first_character}" = "x'"; then
+ definite_index_files="${definite_index_files} ${this_file}"
fi
- done
- orig_index_files="${definite_index_files}"
- orig_index_files_sans_aux="`echo ${definite_index_files} \
- | sed 's/'${filename_noext}'\.aux//;
- s/^[ ]*//;s/[ ]*$//;'`"
-
- # Now save copies of original index files so we have some means of
- # comparison later.
- for index_file_to_save in ${orig_index_files} ; do
- cp "${index_file_to_save}" "${index_file_to_save}${backup_extension}"
- done
-
- # Run texindex on current index files. If they already exist, and
- # after running TeX a first time the index files don't change, then
- # there's no reason to run TeX again. But we won't know that if the
- # index files are out of date or nonexistent.
- if test "${orig_index_files_sans_aux}" ; then
+ done
+ orig_index_files="${definite_index_files}"
+ orig_index_files_sans_aux="`echo ${definite_index_files} \
+ | sed 's/'${filename_noext}'\.aux//;
+ s/^[ ]*//;s/[ ]*$//;'`"
+
+ # Now save copies of original index files so we have some means of
+ # comparison later.
+ $verbose "Backing up current index files: $orig_index_files ..."
+ for index_file_to_save in ${orig_index_files}; do
+ cp "${index_file_to_save}" "${index_file_to_save}${backup_extension}"
+ done
+
+ # Run texindex on current index files. If they already exist, and
+ # after running TeX a first time the index files don't change, then
+ # there's no reason to run TeX again. But we won't know that if the
+ # index files are out of date or nonexistent.
+ if test -n "${orig_index_files_sans_aux}"; then
+ $verbose "Running $texindex $orig_index_files_sans_aux ..."
${texindex} ${orig_index_files_sans_aux}
- fi
-
- if ${tex} ${command_line_filename} ; then # TeX run first time
- definite_index_files=""
- # Get list of new index files
- possible_index_files="`eval echo ${filename_noext}.?? ${filename_noext}.aux`"
- for this_file in ${possible_index_files} ; do
- # If file is empty, forget it.
- if test ! -s ${this_file} ; then
- continue;
- fi
-
- # Examine first character of file. If it's not a backslash or
- # single quote, then it's definitely not an index or xref file.
- first_character="`sed -n '1s/^\(.\).*$/\1/p;q' ${this_file}`"
- if test "${first_character}" = "\\" -o "${first_character}" = "'" ; then
- definite_index_files="${definite_index_files} ${this_file}"
- fi
+ fi
+
+ # Finally, run TeX.
+ if test "$batch" = t; then
+ tex_mode='\nonstopmode'
+ else
+ tex_mode=
+ fi
+ $verbose "Running $tex $filename_input ..."
+ cmd="$tex $tex_mode \\input $filename_input"
+ $cmd
+
+ # Check if index files changed.
+ #
+ definite_index_files=
+ # Get list of new index files.
+ possible_index_files="`eval echo ${filename_noext}.?? ${filename_noext}.aux`"
+ for this_file in ${possible_index_files}; do
+ # If file is empty, forget it.
+ test -s "${this_file}" || continue
+
+ # Examine first character of file. If it's not a backslash or
+ # single quote, then it's definitely not an index or xref file.
+ # (Will have to check for @ when we switch to Texinfo syntax in
+ # all these files...)
+ first_character="`sed -n '1s/^\(.\).*$/\1/p;q' ${this_file}`"
+ if test "x${first_character}" = "x\\" \
+ || test "x${first_character}" = "x'"; then
+ definite_index_files="${definite_index_files} ${this_file}"
+ fi
+ done
+ new_index_files="${definite_index_files}"
+ new_index_files_sans_aux="`echo ${definite_index_files} \
+ | sed 's/'${filename_noext}'\.aux//;
+ s/^[ ]*//;s/[ ]*$//;'`"
+
+ # If old and new list don't at least have the same file list, then one
+ # file or another has definitely changed.
+ $verbose "Original index files =$orig_index_files"
+ $verbose "New index files =$new_index_files"
+ if test "z${orig_index_files}" != "z${new_index_files}"; then
+ index_files_changed_p=t
+ else
+ # File list is the same. We must compare each file until we find a
+ # difference.
+ index_files_changed_p=
+ for this_file in ${new_index_files}; do
+ $verbose "Comparing index file $this_file ..."
+ # cmp -s will return nonzero exit status if files differ.
+ cmp -s "${this_file}" "${this_file}${backup_extension}"
+ if test $? -ne 0; then
+ # We only need to keep comparing until we find *one* that
+ # differs, because we'll have to run texindex & tex no
+ # matter what.
+ index_files_changed_p=t
+ $verbose "Index file $this_file differed:"
+ test $verbose = echo \
+ && diff -c "${this_file}${backup_extension}" "${this_file}"
+ break
+ fi
done
- new_index_files="${definite_index_files}"
- new_index_files_sans_aux="`echo ${definite_index_files} \
- | sed 's/'${filename_noext}'\.aux//;
- s/^[ ]*//;s/[ ]*$//;'`"
-
- # If old and new list don't at least have the same file list, then one
- # file or another has definitely changed.
- if test "${orig_index_files}" != "${new_index_files}" ; then
- index_files_changed_p=t
- else
- # File list is the same. We must compare each file until we find a
- # difference.
- index_files_changed_p=""
- for this_file in ${new_index_files} ; do
- # cmp -s will return nonzero exit status if files differ.
- cmp -s "${this_file}" "${this_file}${backup_extension}"
- if test $? -ne 0 ; then
- # We only need to keep comparing until we find *one* that
- # differs, because we'll have to run texindex & tex no
- # matter what.
- index_files_changed_p=t
- break
- fi
- done
- fi
+ fi
- # If index files have changed since TeX has been run, or if the aux
- # file wasn't present originally, run texindex and TeX again.
- if test "${index_files_changed_p}" ; then
- retval=0
- if test "${new_index_files_sans_aux}" ; then
- ${texindex} ${new_index_files_sans_aux}
- retval=$?
- fi
- if test ${retval} -eq 0 ; then
- ${tex} "${command_line_filename}"
- fi
- fi
- fi
-
- # Generate list of files to delete, then call rm once with the entire
- # list. This is significantly faster than multiple executions of rm.
- file_list=""
- for file in ${orig_index_files} ; do
- file_list="${file_list} ${file}${backup_extension}"
- done
- if test "${file_list}" ; then
- rm -f ${file_list}
- fi
+ # If index files have changed since TeX has been run, or if the aux
+ # file wasn't present originally, run texindex and TeX again.
+ if test "${index_files_changed_p}"; then :; else
+ # Nothing changed. We're done with TeX.
+ break
+ fi
+ done
+
+ # If we were in clean mode, compilation was in a tmp directory.
+ # Copy the DVI 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
+ $verbose "Copying DVI file from `pwd` to $orig_pwd"
+ cp -p $filename_noext.dvi $orig_pwd
+ cd $orig_pwd || exit 1
+ fi
+
+ # Generate list of files to delete, then call rm once with the entire
+ # list. This is significantly faster than multiple executions of rm.
+ file_list=
+ for file in ${orig_index_files}; do
+ file_list="${file_list} ${file}${backup_extension}"
+ done
+ if test -n "${file_list}"; then
+ $verbose "Removing $file_list $tmp_dir $tmp_dir2 ..."
+ rm -f ${file_list}
+ rm -rf $tmp_dir $tmp_dir2
+ fi
done
-# texi2dvi ends here
+$verbose "$0 done."
+true # exit successfully.
diff --git a/support/texi2html b/support/texi2html
index cc75178..4beec01 100755
--- a/support/texi2html
+++ b/support/texi2html
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/local/bin/perl
'di ';
'ig 00 ';
#+##############################################################################
@@ -9,7 +9,7 @@
# #
#-##############################################################################
-# @(#)texi2html 1.51 09/10/96 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch
+# @(#)texi2html 1.52 01/05/98 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch
# The man page for this program is included at the end of this file and can be
# viewed using the command 'nroff -man texi2html'.
@@ -29,7 +29,7 @@ $DEBUG_DEF = 16;
$DEBUG_HTML = 32;
$DEBUG_USER = 64;
-$BIBRE = '\[[\w\/]+\]'; # RE for a bibliography reference
+$BIBRE = '\[[\w\/-]+\]'; # RE for a bibliography reference
$FILERE = '[\/\w.+-]+'; # RE for a file name
$VARRE = '[^\s\{\}]+'; # RE for a variable name
$NODERE = '[^@{}:\'`",]+'; # RE for a node name
@@ -37,8 +37,8 @@ $NODESRE = '[^@{}:\'`"]+'; # RE for a list of node names
$XREFRE = '[^@{}]+'; # RE for a xref (should use NODERE)
$ERROR = "***"; # prefix for errors and warnings
-$THISPROG = "texi2html 1.51"; # program name and version
-$HOMEPAGE = "http://wwwcn.cern.ch/dci/texi2html/"; # program home page
+$THISPROG = "texi2html 1.52"; # program name and version
+$HOMEPAGE = "http://wwwinfo.cern.ch/dis/texi2html/"; # program home page
$TODAY = &pretty_date; # like "20 September 1993"
$SPLITTAG = "<!-- SPLIT HERE -->\n"; # tag to know where to split
$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections
@@ -129,6 +129,7 @@ $html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//E
"!", "!",
"?", "?",
".", ".",
+ "-", "",
);
#
@@ -159,19 +160,23 @@ $html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//E
'cite', 'CITE',
'code', 'CODE',
'ctrl', '&do_ctrl', # special case
- 'dfn', 'STRONG', # DFN tag is illegal in the standard
+ 'dfn', 'EM', # DFN tag is illegal in the standard
'dmn', '', # useless
+ 'email', '&do_email', # insert a clickable email address
'emph', 'EM',
'file', '"TT', # will put quotes, cf. &apply_style
'i', 'I',
'kbd', 'KBD',
'key', 'KBD',
+ 'math', 'EM',
'r', '', # unsupported
'samp', '"SAMP', # will put quotes, cf. &apply_style
'sc', '&do_sc', # special case
'strong', 'STRONG',
't', 'TT',
'titlefont', '', # useless
+ 'uref', '&do_uref', # insert a clickable URL
+ 'url', '&do_url', # insert a clickable URL
'var', 'VAR',
'w', '', # unsupported
);
@@ -270,6 +275,7 @@ $html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//E
'smallbook', 1,
'vskip', 1,
'filbreak', 1,
+ 'paragraphindent', 1,
# unsupported formats
'cartouche', 1,
'end cartouche', 1,
@@ -283,6 +289,8 @@ $html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//E
# #
#---############################################################################
+%value = (); # hold texinfo variables, see also -D
+
$use_bibliography = 1;
$use_acc = 0;
$debug = 0;
@@ -306,6 +314,7 @@ To convert a Texinfo file to HMTL: $0 [options] file
-expandinfo : use \@ifinfo sections, not \@iftex
-glossary : handle a glossary
-invisible name: use 'name' as an invisible anchor
+ -Dname : define name like with \@set
-I dir : search also for files in 'dir'
-menu : handle menus
-monolithic : output only one file including ToC
@@ -317,7 +326,7 @@ To convert a Texinfo file to HMTL: $0 [options] file
To check converted files: $0 -check [-verbose] files
EOT
-while ($#ARGV >= 0 && $ARGV[0] =~ /^-/) {
+while (@ARGV && $ARGV[0] =~ /^-/) {
$_ = shift(@ARGV);
if (/^-acc$/) { $use_acc = 1; next; }
if (/^-d(ebug)?(\d+)?$/) { $debug = $2 || shift(@ARGV); next; }
@@ -327,6 +336,7 @@ while ($#ARGV >= 0 && $ARGV[0] =~ /^-/) {
if (/^-g(lossary)?$/) { $use_glossary = 1; next; }
if (/^-i(nvisible)?$/) { $invisible_mark = shift(@ARGV); next; }
if (/^-iso$/) { $use_iso = 1; next; }
+ if (/^-D(.+)?$/) { $value{$1 || shift(@ARGV)} = 1; next; }
if (/^-I(.+)?$/) { push(@include_dirs, $1 || shift(@ARGV)); next; }
if (/^-m(enu)?$/) { $show_menu = 1; next; }
if (/^-mono(lithic)?$/) { $monolithic = 1; next; }
@@ -383,9 +393,8 @@ if ($monolithic) {
#
# variables
#
-%value = (); # hold texinfo variables
$value{'html'} = 1; # predefine html (the output format)
-$value{'texi2html'} = '1.51'; # predefine texi2html (the translator)
+$value{'texi2html'} = '1.52'; # predefine texi2html (the translator)
# _foo: internal to track @foo
foreach ('_author', '_title', '_subtitle',
'_settitle', '_setfilename') {
@@ -453,7 +462,7 @@ $toplevel = 0; # top level seen in hierarchy
$curlevel = 0; # current level in TOC
$node = ''; # current node name
$in_table = 0; # am I inside a table
-$table_type = ''; # type of table ('', 'f', 'v')
+$table_type = ''; # type of table ('', 'f', 'v', 'multi')
@tables = (); # nested table support
$in_bibliography = 0; # am I inside a bibliography
$in_glossary = 0; # am I inside a glossary
@@ -554,9 +563,11 @@ while ($_ = &next_line) {
#
s/((^|[^\@])(\@\@)*)\@c(omment)? .*/$1/;
# non-@ substitutions cf. texinfmt.el
- s/``/\"/g;
- s/''/\"/g;
- s/([\w ])---([\w ])/$1--$2/g;
+ unless ($in_pre) {
+ s/``/\"/g;
+ s/''/\"/g;
+ s/([\w ])---([\w ])/$1--$2/g;
+ }
#
# analyze the tag
#
@@ -570,14 +581,9 @@ while ($_ = &next_line) {
}
&skip_until($tag), next if $tag eq 'tex';
# handle special tables
- if ($tag eq 'table') {
- $table_type = '';
- } elsif ($tag eq 'ftable') {
+ if ($tag =~ /^(|f|v|multi)table$/) {
+ $table_type = $1;
$tag = 'table';
- $table_type = 'f';
- } elsif ($tag eq 'vtable') {
- $tag = 'table';
- $table_type = 'v';
}
# special cases
if ($tag eq 'top' || ($tag eq 'node' && /^\@node\s+top\s*,/i)) {
@@ -647,11 +653,16 @@ while ($_ = &next_line) {
push(@lines, &debug("<$format_map{$tag}>\n", __LINE__));
next;
} elsif ($tag eq 'table') {
- if (/^\@[fv]?table\s+\@(\w+)\s*$/) {
- $in_table = $1;
+ if (/^\@(|f|v|multi)table\s+\@(\w+)/) {
+ $in_table = $2;
unshift(@tables, join($;, $table_type, $in_table));
- push(@lines, &debug("<DL COMPACT>\n", __LINE__));
- &html_push_if('DL');
+ if ($table_type eq "multi") {
+ push(@lines, &debug("<TABLE BORDER>\n", __LINE__));
+ &html_push_if('TABLE');
+ } else {
+ push(@lines, &debug("<DL COMPACT>\n", __LINE__));
+ &html_push_if('DL');
+ }
push(@lines, &html_debug("\n", __LINE__));
} else {
warn "$ERROR Bad table line: $_";
@@ -776,18 +787,29 @@ while ($_ = &next_line) {
&html_pop_if();
push(@lines, &debug("</$format_map{$end_tag}>\n", __LINE__));
push(@lines, &html_debug("\n", __LINE__));
- } elsif ($end_tag eq 'table' ||
- $end_tag eq 'ftable' ||
- $end_tag eq 'vtable') {
- shift(@tables);
+ } elsif ($end_tag =~ /^(|f|v|multi)table$/) {
+ unless (@tables) {
+ warn "$ERROR \@end $end_tag without \@*table\n";
+ next;
+ }
+ ($table_type, $in_table) = split($;, shift(@tables));
+ unless ($1 eq $table_type) {
+ warn "$ERROR \@end $end_tag without matching \@$end_tag\n";
+ next;
+ }
+ if ($table_type eq "multi") {
+ push(@lines, "</TR></TABLE>\n");
+ &html_pop_if('TR');
+ } else {
+ push(@lines, "</DL>\n");
+ &html_pop_if('DD');
+ }
+ &html_pop_if();
if (@tables) {
($table_type, $in_table) = split($;, $tables[0]);
} else {
$in_table = 0;
}
- push(@lines, "</DL>\n");
- &html_pop_if('DD');
- &html_pop_if();
} elsif (defined($def_map{$end_tag})) {
push(@lines, &debug("</DL>\n", __LINE__));
} elsif ($end_tag eq 'menu') {
@@ -986,6 +1008,12 @@ EOC
if ($table_type) { # add also an index
unshift(@input_spool, "\@${table_type}index $what\n");
}
+ } elsif ($html_element eq 'TABLE') {
+ push(@lines, &debug("<TR><TD>$what</TD>\n", __LINE__));
+ &html_push('TR');
+ } elsif ($html_element eq 'TR') {
+ push(@lines, &debug("</TR>\n", __LINE__));
+ push(@lines, &debug("<TR><TD>$what</TD>\n", __LINE__));
} else {
push(@lines, &debug("<LI>$what\n", __LINE__));
&html_push('LI') unless $html_element eq 'LI';
@@ -996,6 +1024,9 @@ EOC
$deferred_ref = '';
}
next;
+ } elsif (/^\@tab\s+(.*)$/) {
+ push(@lines, "<TD>$1</TD>\n");
+ next;
}
}
}
@@ -1088,13 +1119,25 @@ while (@lines) {
print "# index $key sorted as $_\n"
if $key ne $_ && $debug & $DEBUG_INDEX;
}
+ push(@lines2, "Jump to:\n");
+ $last_letter = undef;
+ foreach $key (sort byalpha @keys) {
+ $letter = substr($key2alpha{$key}, 0, 1);
+ $letter = substr($key2alpha{$key}, 0, 2) if $letter eq $;;
+ if (!defined($last_letter) || $letter ne $last_letter) {
+ push(@lines2, "-\n") if defined($last_letter);
+ push(@lines2, "<A HREF=\"#$index\_$letter\">" . &protect_html($letter) . "</A>\n");
+ $last_letter = $letter;
+ }
+ }
+ push(@lines2, "<P>\n");
$last_letter = undef;
foreach $key (sort byalpha @keys) {
$letter = substr($key2alpha{$key}, 0, 1);
$letter = substr($key2alpha{$key}, 0, 2) if $letter eq $;;
if (!defined($last_letter) || $letter ne $last_letter) {
push(@lines2, "</DIR>\n") if defined($last_letter);
- push(@lines2, "<H2>" . &protect_html($letter) . "</H2>\n");
+ push(@lines2, "<H2><A NAME=\"$index\_$letter\">" . &protect_html($letter) . "</A></H2>\n");
push(@lines2, "<DIR>\n");
$last_letter = $letter;
}
@@ -1657,8 +1700,24 @@ sub menu_entry {
sub do_ctrl { "^$_[0]" }
+sub do_email {
+ local($addr, $text) = split(/,\s*/, $_[0]);
+
+ $text = $addr unless $text;
+ &anchor('', "mailto:$addr", $text);
+}
+
sub do_sc { "\U$_[0]\E" }
+sub do_uref {
+ local($url, $text) = split(/,\s*/, $_[0]);
+
+ $text = $url unless $text;
+ &anchor('', $url, $text);
+}
+
+sub do_url { &anchor('', $_[0], $_[0]) }
+
sub apply_style {
local($texi_style, $text) = @_;
local($style);
@@ -1822,7 +1881,7 @@ sub print_toplevel_footer {
print FILE <<EOT;
This document was generated on $TODAY using the
<A HREF=\"$HOMEPAGE\">texi2html</A>
-translator version 1.51.</P>
+translator version 1.52.</P>
EOT
&print_footer;
}
@@ -1879,7 +1938,7 @@ sub byalpha {
.nr nl 0-1 \" fake up transition to first page again
.nr % 0 \" start at page 1
'; __END__ ############# From here on it's a standard manual page ############
-.TH TEXI2HTML 1 "09/10/96"
+.TH TEXI2HTML 1 "01/05/98"
.AT 3
.SH NAME
texi2html \- a Texinfo to HTML converter
@@ -1924,8 +1983,9 @@ Use the section named 'Glossary' to build a list of terms and put links in the H
document from each term toward its definition.
.TP
.B \-invisible \fIname\fP
-Use \fIname\fP to create invisible destination anchors for index links. This is a workaround
-for a known bug of many WWW browsers, including xmosaic.
+Use \fIname\fP to create invisible destination anchors for index links
+(you can for instance use the invisible.xbm file shipped with this program).
+This is a workaround for a known bug of many WWW browsers, including netscape.
.TP
.B \-I \fIdir\fP
Look also in \fIdir\fP to find included files.
@@ -1985,21 +2045,21 @@ option, it creates only one file:
predefines the following variables: \fBhtml\fP, \fBtexi2html\fP.
.SH ADDITIONAL COMMANDS
.I texi2html
-implements the following non-Texinfo commands:
+implements the following non-Texinfo commands (maybe they are in Texinfo now...):
.TP 16
.B @ifhtml
This indicates the start of an HTML section, this section will passed through
-without any modofication.
+without any modification.
.TP
.B @end ifhtml
-This indcates the end of an HTML section.
+This indicates the end of an HTML section.
.SH VERSION
-This is \fItexi2html\fP version 1.51, 09/10/96.
+This is \fItexi2html\fP version 1.52, 01/05/98.
.PP
The latest version of \fItexi2html\fP can be found in WWW, cf. URL
-http://wwwcn.cern.ch/dci/texi2html/
+http://wwwinfo.cern.ch/dis/texi2html/
.SH AUTHOR
-The main author is Lionel Cons, CERN CN/DCI/UWS, Lionel.Cons@cern.ch.
+The main author is Lionel Cons, CERN IT/DIS/OSE, Lionel.Cons@cern.ch.
Many other people around the net contributed to this program.
.SH COPYRIGHT
This program is the intellectual property of the European