Commit 3db502be authored by Sergei Golovan's avatar Sergei Golovan Committed by Sergei Golovan

Merge tag 'upstream/5.45'

Upstream version 5.45
parents 89d48d46 6aa98389
2010-10-26 Andreas Kupries <andreask@activestate.com>
* expect.c: [Bug 3095935]: Convert #bytes information to #chars to
prevent later code to fail when copying strings around and
miscalculating how much to copy, for strings containing
non-ASCII utf chars.
2010-09-30 Andreas Kupries <andreask@activestate.com>
* example/autopasswd: Updated to use tclsh in PATH, and 'package
* example/chess.exp: require Expect'. Obsoletes fixline1.
* example/cryptdir:
* example/decryptdir:
* example/dislocate:
* example/dvorak:
* example/ftp-inband:
* example/ftp-rfc:
* example/gethostbyaddr:
* example/kibitz:
* example/lpunlock:
* example/mkpasswd:
* example/multixterm:
* example/passmass:
* example/read1char:
* example/rftp:
* example/rlogin-cwd:
* example/robohunt:
* example/rogue.exp:
* example/telnet-cwd:
* example/timed-read:
* example/timed-run:
* example/unbuffer:
* example/virterm:
* example/weather:
* example/xkibitz:
* example/xpstat:
* Makefile.in: Continued work on the 'make dist' target (config.{sub,guess})
* install.sh: Removed unused file.
* mkinstalldirs: Removed unused file.
* tclconfig/README.txt: Removed unused file.
* testsuite/config/: Removed contents of unused directory.
* test/.Sanitize: Removed unused file.
2010-09-17 Jeff Hobbs <jeffh@ActiveState.com>
* Makefile.in: improved make dist target to include the necessary
files, and remove old dist_orig.
Enable Makefile regen target
2010-09-16 Jeff Hobbs <jeffh@ActiveState.com>
* configure: regen with ac-2.59
* tclconfig/tcl.m4: update for correct LDFLAGS on HP-UX
* Makefile.in (expect): use TEA LDFLAGS instead of tclConfig.sh to
build expect executable
2010-09-01 Andreas Kupries <andreask@activestate.com>
* Makefile.in: [Bug 865278] Semi-applied Don Porter's patch adding
code which prevents the package from registering with Tcl
interpreters which cannot load it, i.e. below the version it was
compiled against. Semi because the pkgIndex.in in his patch is
not used, the pkgIndex.tcl is generated by the Makefile(.in).
* pkgIndex.in: Removed. File not used.
2010-08-31 Andreas Kupries <andreask@activestate.com>
* Various cleanups, local patches of ActiveState.
* exp_clib.c: Remove local copy of Tcl_ErrnoMsg().
* exp_inter.c: Hack access to TCL_REG_BOSONLY when not present,
became private with Tcl 8.5 and higher.
* expect.h: Remove the local fiddling with the memory allocation
and panic macros.
* Dbg.c: [Bug 2972727]: Applied the parts of Larry Virden's patch
which were still current. Most of it applied to the partially
ansified sources we had in trunk for a time and where errors in
that set of changes, thus out of date now.
* example/unbuffer: [Bug 2949748]: Applied patch by Vitezslav
Crhonek <vcrhonek@users.sourceforge.net> to prevent unbuffer
from eating the exit code of the command it ran (regular mode
only, not -p). Slightly modified, I removed the superfluous
'eval' used to invoke 'wait', invoking it directly.
2010-08-27 Jeff Hobbs <jeffh@ActiveState.com>
* retoglob.c: Fail if the generated glob contains more than
two asterisks. Fixes [Expect SF Bug 3010684] (cederqvist)
* exp_main_sub.c: add return to silence compiler warning.
Updated EXP_VERSION to 5.45.0
* config.guess, config.sub, expect.m4 (removed):
* configure, configure.in, tclconfig/tcl.m4: Update to TEA 3.9
* Makefile.in, aclocal.m4: Partial cleanup of the build system.
* testsuite/Makefile.in: Remove unused EXP_ from configure.in
* testsuite/aclocal.m4: and no longer use Tk.
* testsuite/configure: Update testsuite bits to use TEA info.
* testsuite/configure.in:
Update expect to version 5.45
* Dbg.c: account for removal of tcldbgcf.h
* DbgMkfl.in, Dbgconfig.in, Dbgconfigure, DbgpkgInd.in (removed):
* tcldbgcf.h.in (removed): removed Dbg debugger subcomponent as it
no longer built and debugger functionality is included in expect
library and binary
* pty_termios.c: add HAVE_STRING_H include string.h
* exp_trap.c: add HAVE_STRING_H include string.h
* expectk.man, exp_main_tk.c (removed): expectk no longer
built. Use tclsh with package require Tk and Expect instead.
* tests/all.tcl: add package require Expect
* example/archie, example/autoexpect: minor code cleanup
* example/tkpasswd, example/tknewsbiff, example/tkterm: use
package require statements in lieu of expectk
2009-11-03 Andreas Kupries <andreask@activestate.com>
* exp_command.c (Exp_SpawnObjCmd): [Expect SF Bug 2891422]. Fixed
......
......@@ -10,7 +10,10 @@ would appreciate credit if this program or parts of it are used.
#include <stdio.h>
#include "tcldbgcf.h"
#ifndef HAVE_STRCHR
#define strchr(s,c) index(s,c)
#endif /* HAVE_STRCHR */
#if 0
/* tclInt.h drags in stdlib. By claiming no-stdlib, force it to drag in */
/* Tcl's compat version. This avoids having to test for its presence */
......@@ -34,15 +37,15 @@ would appreciate credit if this program or parts of it are used.
#define FALSE 0
#endif
static int simple_interactor();
static int zero();
static int simple_interactor (Tcl_Interp *interp, ClientData data);
static int zero (Tcl_Interp *interp, char *string);
/* most of the static variables in this file may be */
/* moved into Tcl_Interp */
static Dbg_InterProc *interactor = simple_interactor;
static Dbg_InterProc *interactor = &simple_interactor;
static ClientData interdata = 0;
static Dbg_IgnoreFuncsProc *ignoreproc = zero;
static Dbg_IgnoreFuncsProc *ignoreproc = &zero;
static Dbg_OutputProc *printproc = 0;
static ClientData printdata = 0;
static int stdinmode;
......@@ -83,7 +86,7 @@ static int last_step_count = 1;
/* this acts as a strobe (while testing breakpoints). It is set to true */
/* every time a new debugger command is issued that is an action */
static debug_new_action;
static int debug_new_action;
#define NO_LINE -1 /* if break point is not set by line number */
......@@ -1246,9 +1249,8 @@ static struct cmd_list {
/* this may seem excessive, but this avoids the explicit test for non-zero */
/* in the caller, and chances are that that test will always be pointless */
/*ARGSUSED*/
static int zero(interp,string)
Tcl_Interp *interp;
char *string;
static int
zero (Tcl_Interp *interp, char *string)
{
return 0;
}
......@@ -1256,8 +1258,7 @@ char *string;
extern int expSetBlockModeProc _ANSI_ARGS_((int fd, int mode));
static int
simple_interactor(interp)
Tcl_Interp *interp;
simple_interactor(Tcl_Interp *interp, ClientData data)
{
int rc;
char *ccmd; /* pointer to complete command */
......
#
# Makefile for tcl debugger
#
VERSION_FULL = \"@DBG_VERSION_FULL@\"
VERSION = @DBG_VERSION@
# Compatible with Tcl version 7.5
# Compatible with Tk version 4.1
srcdir = @srcdir@
VPATH = @srcdir@
######################################################################
# The following lines are things you are likely to want to change
######################################################################
# Tcl include files. (If you haven't installed Tcl yet, read the README file).
# This must point to the directory that contains ALL of Tcl's include
# files, not just the public ones.
TCLHDIR = @TCLHDIRDASHI@
# flags to pass to cc
# You should be able to leave this just the way it is. However, here are some
# note if you run into problems:
#
# Avoid -O (optimize) unless you are convinced your optimizer is flawless
# (hint: not a chance). I have heard many reports of -O causing Expect to
# misbehave.
# I encourage you to use -g (debugging). While it is unlikely you will
# encounter an internal error in Expect, should this happen, I may just need
# the -g information and then you will need to recompile Expect. As an aside,
# Expect is not a space or time pig, so this won't affect the performance of
# your Expect scripts.
# Note: On Linux systems which only have dynamic X libraries, the -g prevents
# the linker from using them. So do not use -g on such systems.
CFLAGS = @DBG_CFLAGS@ @DBG_SHLIB_CFLAGS@
# Tcl libraries built with optimization switches have this additional extension
TCL_DBGX = @TCL_DBGX@
# which C compiler to use
CC = @CC@
# By default, `make install' will install the appropriate files in
# /usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
# an installation prefix other than /usr/local here:
prefix = @prefix@
# You can specify a separate installation prefix for architecture-specific
# files such as binaries and libraries.
exec_prefix = @exec_prefix@
# If you have ranlib but it should be avoided, change this from "ranlib" #
# to something innocuous like "echo". Known systems with this problem:
# older SCO boxes.
UNSHARED_RANLIB = @UNSHARED_RANLIB@
######################################################################
# End of things you are likely to want to change
######################################################################
tcl_libdir = @libdir@
libdir = @libdir@/tcldbg$(VERSION)
# datadir = $(prefix)/lib
mandir = @mandir@
man1dir = $(mandir)/man1
includedir = $(prefix)/include
# Where to store utility scripts. This corresponds to the variable
# "dbg_library".
# DBG_SCRIPTDIR = $(datadir)/tcldbg
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = ar
ARFLAGS = cr
# TCLHDIR includes "-I"
CPPFLAGS = -I. -I$(srcdir) $(TCLHDIR) \
-DDBG_VERSION=$(VERSION_FULL) \
-DDBG_SCRIPTDIR=\"$(DBG_SCRIPTDIR)\"
CFLAGS_INT = $(MH_CFLAGS) $(CPPFLAGS) $(CFLAGS)
.c.o:
$(CC) -c $(CFLAGS_INT) $(HDEFS) $<
CFILES = Dbg.c Dbg_cmd.c
OFILES = Dbg.o Dbg_cmd.o
# libraries (both .a and shared)
DBG_LIB_FILES = @DBG_LIB_FILES@
# default Dbg library (shared if possible, otherwise static)
DBG_LIB_FILE = @DBG_LIB_FILE@
# Dbg object library (.a)
DBG_UNSHARED_LIB_FILE = @DBG_UNSHARED_LIB_FILE@
# Dbg object library (shared, if possible)
DBG_SHARED_LIB_FILE = @DBG_SHARED_LIB_FILE@
all: $(DBG_LIB_FILES)
$(DBG_UNSHARED_LIB_FILE): $(OFILES)
-rm -f $(DBG_UNSHARED_LIB_FILE)
$(AR) $(ARFLAGS) $(DBG_UNSHARED_LIB_FILE) $(OFILES)
-$(UNSHARED_RANLIB) $(DBG_UNSHARED_LIB_FILE)
$(DBG_SHARED_LIB_FILE): $(OFILES)
-rm -f $(DBG_SHARED_LIB_FILE)
@TCL_SHLIB_LD@ -o $(DBG_SHARED_LIB_FILE) $(OFILES)
# Delete all the installed files that the `install' target creates
# (but not the noninstalled files such as `make all' creates)
uninstall:
-rm -f $(man1dir)/tcldbg.1 \
$(libdir)/$(DBG_SHARED_LIB_FILE) \
$(tcl_libdir)/$(DBG_SHARED_LIB_FILE) \
$(libdir)/$(DBG_UNSHARED_LIB_FILE) \
$(tcl_libdir)/$(DBG_UNSHARED_LIB_FILE) \
$(libdir)/pkgIndex.tcl \
$(includedir)/tcldbg.h
# Can't seem to embed shell comments in backslashed lines, so comments here:
# Local copy is pkgIndex rather than pkgIndex.tcl because pkgIndex.tcl.in
# is too long for some filesystems, sigh.
install: $(DBG_LIB_FILES)
${srcdir}/mkinstalldirs $(man1dir) $(libdir) $(includedir) $(DBG_SCRIPTDIR)
$(INSTALL_DATA) $(srcdir)/tcldbg.man $(man1dir)/tcldbg.1
if [ -s $(DBG_UNSHARED_LIB_FILE) ] ; then \
$(INSTALL_DATA) $(DBG_UNSHARED_LIB_FILE) $(libdir)/$(DBG_UNSHARED_LIB_FILE) ; \
$(UNSHARED_RANLIB) $(libdir)/$(DBG_UNSHARED_LIB_FILE) ; \
fi
if [ -s $(DBG_SHARED_LIB_FILE) ] ; then \
$(INSTALL_PROGRAM) $(DBG_SHARED_LIB_FILE) $(tcl_libdir)/$(DBG_SHARED_LIB_FILE) ; \
$(INSTALL_PROGRAM) pkgIndex $(libdir)/pkgIndex.tcl ; \
fi
$(INSTALL_DATA) $(srcdir)/tcldbg.h $(includedir)
# create utility-script directory
# $(INSTALL_DATA) $(srcdir)/tcldbglib.tcl $(DBG_SCRIPTDIR)
# $(INSTALL_DATA) $(srcdir)/tclIndex $(DBG_SCRIPTDIR)
###################################
# Targets for Makefile and configure
###################################
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) config.status
@echo "Rebuilding the Makefile..."
$(SHELL) config.status
configure: $(srcdir)/configure.in $(srcdir)/Makefile.in $(srcdir)/aclocal.m4
autoconf configure.in > configure
-@chmod a+x configure
-rm -f config.cache
config.status: $(srcdir)/configure
@echo "Rebuilding config.status..."
$(SHELL) ./config.status --recheck
################################################
# Various "clean" targets follow GNU conventions
################################################
clean:
-rm -f *~ *.o core \
$(DBG_UNSHARED_LIB_FILE) $(DBG_SHARED_LIB_FILE)
# like "clean", but also delete files created by "configure"
distclean: clean
-rm -f Makefile config.status config.cache config.log tcldbgcf.h
# like "clean", but doesn't delete test utilities or massaged scripts
# because most people don't have to worry about them
mostlyclean:
-rm -f *~ *.o core \
$(DBG_UNSHARED_LIB_FILE) $(DBG_SHARED_LIB_FILE)
# delete everything from current directory that can be reconstructed
# except for configure
realclean: distclean
#tclIndex: tcldbglib.tcl
# expect -c "auto_mkindex . *.tcl;exit"
LINTFLAGS = -h -q -x
lint:
lint $(LINTFLAGS) $(CPPFLAGS) $(CFILES) $(TCLLINTLIB) | tee debug.lint
##################################
# Targets for development at NIST
##################################
nist:
configure --verbose --prefix=/depot/tcl --exec-prefix=/depot/tcl/arch
# report globals that shouldn't be public but are
bad_globals:
nm $(DBG_UNSHARED_LIB_FILE) | egrep -v " [a-zU] | _Dbg"
# after copying source directory, restablish all links
symlink:
rm -f aclocal.m4
ln -s ../expect/aclocal.m4
######################################
# Targets for pushing out releases
######################################
FTPDIR = /proj/itl/www/div826/subject/expect/tcl-debug
# make a private tar file for myself
tar: tcl-debug-$(VERSION).tar
mv tcl-debug-$(VERSION).tar tcl-debug.tar
ftp: tcl-debug-$(VERSION).tar.Z tcl-debug-$(VERSION).tar.gz
cp tcl-debug-$(VERSION).tar.Z $(FTPDIR)/tcl-debug.tar.Z
cp tcl-debug-$(VERSION).tar.gz $(FTPDIR)/tcl-debug.tar.gz
cp HISTORY $(FTPDIR)
cp README $(FTPDIR)/README.distribution
rm tcl-debug-$(VERSION).tar*
ls -l $(FTPDIR)/tcl-debug.tar*
# make an alpha relase and install it on ftp server
alpha: tcl-debug-$(VERSION).tar.Z tcl-debug-$(VERSION).tar.gz
cp tcl-debug-$(VERSION).tar.Z $(FTPDIR)/tcl-debug-alpha.tar.Z
cp tcl-debug-$(VERSION).tar.gz $(FTPDIR)/tcl-debug-alpha.tar.gz
rm tcl-debug-$(VERSION).tar*
ls -l $(FTPDIR)/tcl-debug-alpha.tar*
tcl-debug-$(VERSION).tar:
rm -f ../tcl-debug-$(VERSION)
ln -s `pwd` ../tcl-debug-$(VERSION)
cd ..;tar cvfh $@ `pubfile tcl-debug-$(VERSION)`
mv ../$@ .
tcl-debug-$(VERSION).tar.Z: tcl-debug-$(VERSION).tar
compress -fc tcl-debug-$(VERSION).tar > $@
tcl-debug-$(VERSION).tar.gz: tcl-debug-$(VERSION).tar
gzip -fc tcl-debug-$(VERSION).tar > $@
Dbg.o: $(srcdir)/Dbg.c $(srcdir)/tcldbg.h
dnl Process this file with autoconf to produce a configure script.
AC_INIT(tcldbg.h)
DBG_MAJOR_VERSION=1
DBG_MINOR_VERSION=9
DBG_MICRO_VERSION=1
DBG_VERSION=$DBG_MAJOR_VERSION.$DBG_MINOR_VERSION
DBG_VERSION_FULL=$DBG_VERSION.$DBG_MICRO_VERSION
# Tcl's handling of shared_lib_suffix requires this symbol exist
VERSION=$DBG_MAJOR_VERSION.$DBG_MINOR_VERSION
AC_CONFIG_HEADER(tcldbgcf.h)
OLD_CFLAGS=$CFLAGS
AC_PROG_CC
CFLAGS=$OLD_CFLAGS
CY_AC_PATH_TCLCONFIG
CY_AC_LOAD_TCLCONFIG
CC=$TCL_CC
CY_AC_C_WORKS
# this'll use a BSD compatible install or our included install-sh
AC_PROG_INSTALL
# Tcl sets TCL_RANLIB appropriately for shared library if --enable-shared
AC_PROG_RANLIB
UNSHARED_RANLIB=$RANLIB
# This is for LynxOS, which needs a flag to force true POSIX when
# building. It's weirder than that, cause the flag varies depending
# how old the compiler is. So...
# -X is for the old "cc" and "gcc" (based on 1.42)
# -mposix is for the new gcc (at least 2.5.8)
# This modifies the value of $CC to have the POSIX flag added
# so it'll configure correctly
CY_AC_TCL_LYNX_POSIX
# we really only need the header files
CY_AC_PATH_TCLH
if test x"$no_tcl" = x"true" ; then
echo " ERROR: Can't find Tcl directory"
echo " See README for information on how to obtain Tcl."
echo " If Tcl is installed, see INSTALL on how to tell"
echo " configure where Tcl is installed."
exit 1
fi
# Use -g on all systems but Linux where it upsets the dynamic X libraries.
AC_MSG_CHECKING([if we are running Linux])
if test "x`(uname) 2>/dev/null`" = xLinux; then
AC_MSG_RESULT(yes)
linux=1
DBG_CFLAGS=
else
AC_MSG_RESULT(no)
linux=0
DBG_CFLAGS=-g
fi
#
# Look for functions that may be missing
#
AC_FUNC_CHECK(strchr, AC_DEFINE(HAVE_STRCHR))
#
# Look for various header files
#
AC_HEADER_CHECK(stdlib.h, ,AC_DEFINE(NO_STDLIB_H))
# consume these flags so that user can invoke tcl-debug's configure with
# the same command as Tcl's configure
AC_ARG_ENABLE(load,
[ --disable-load disallow dynamic loading],
[disable_dl=yes], [disable_dl=no])
AC_ARG_ENABLE(gcc,
[ --enable-gcc allow use of gcc if available],
[enable_gcc=yes], [enable_gcc=no])
DBG_UNSHARED_LIB_FILE=libtcldbg.a
AC_MSG_CHECKING([type of library to build])
AC_ARG_ENABLE(shared,
[ --enable-shared build libtcldbg as a shared library],
[enable_shared=yes], [enable_shared=no])
if test "$enable_shared" = "yes" -a "x${TCL_SHLIB_SUFFIX}" != "x" ; then
DBG_SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
# DBG_SHARED_LIB_FILE=libtcldbg$DBG_VERSION$TCL_SHLIB_SUFFIX
eval "DBG_SHARED_LIB_FILE=libtcldbg${TCL_SHARED_LIB_SUFFIX}"
DBG_LIB_FILE=$DBG_SHARED_LIB_FILE
DBG_LIB_FILES="$DBG_SHARED_LIB_FILE $DBG_UNSHARED_LIB_FILE"
AC_MSG_RESULT(both shared and unshared)
else
DBG_SHLIB_CFLAGS=
DBG_SHARED_LIB_FILE="reconfigure_Tcl_for_shared_library"
DBG_LIB_FILE=$DBG_UNSHARED_LIB_FILE
DBG_LIB_FILES="$DBG_UNSHARED_LIB_FILE"
AC_MSG_RESULT(unshared)
fi
#
# Set up makefile substitutions
#
AC_SUBST(DBG_MAJOR_VERSION)
AC_SUBST(DBG_MINOR_VERSION)
AC_SUBST(DBG_MICRO_VERSION)
AC_SUBST(DBG_VERSION_FULL)
AC_SUBST(DBG_VERSION)
AC_SUBST(CC)
AC_SUBST(DBG_SHARED_LIB_FILE)
AC_SUBST(DBG_UNSHARED_LIB_FILE)
AC_SUBST(DBG_SHLIB_CFLAGS)
AC_SUBST(DBG_LIB_FILE)
AC_SUBST(DBG_LIB_FILES)
AC_SUBST(DBG_CFLAGS)
AC_SUBST(UNSHARED_RANLIB)
AC_OUTPUT(Makefile pkgIndex)
This diff is collapsed.
# Tcl package index file, version 1.0
# This file is sourced either when an application starts up or
# by a "package unknown" script. It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands. When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.
package ifneeded Dbg @DBG_VERSION_FULL@ [list load [file join $dir .. @DBG_SHARED_LIB_FILE@]]
......@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: Makefile.in,v 5.45 2008/10/03 17:05:14 andreas_kupries Exp $
# RCS: @(#) $Id: Makefile.in,v 5.51 2010/09/30 17:14:07 andreas_kupries Exp $
#========================================================================
#========================================================================
......@@ -103,7 +103,7 @@ PKG_LIB_FILE = @PKG_LIB_FILE@
PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
lib_BINARIES = $(PKG_LIB_FILE)
bin_BINARIES = expect expectk
bin_BINARIES = expect
BINARIES = $(lib_BINARIES) $(bin_BINARIES)
SHELL = @SHELL@
......@@ -154,8 +154,6 @@ STLIB_LD = @STLIB_LD@
TCL_DEFS = @TCL_DEFS@
TCL_BIN_DIR = @TCL_BIN_DIR@
TCL_SRC_DIR = @TCL_SRC_DIR@
# This is necessary for packages that use private Tcl headers
TCL_TOP_DIR_NATIVE = @TCL_TOP_DIR_NATIVE@
# Not used, but retained for reference of what libs Tcl required
TCL_LIBS = @TCL_LIBS@
......@@ -175,7 +173,7 @@ TCLSH_PROG = @TCLSH_PROG@
TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)
SHARED_BUILD = @SHARED_BUILD@
INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@
INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@
PKG_CFLAGS = @PKG_CFLAGS@
......@@ -255,11 +253,9 @@ install-doc: doc
@mkdir -p $(DESTDIR)$(mandir)/man1
@mkdir -p $(DESTDIR)$(mandir)/man3
@echo "Installing documentation in $(DESTDIR)$(mandir)"
# install Expectk man page if present
$(INSTALL_DATA) $(srcdir)/expectk.man $(DESTDIR)$(mandir)/man1/expectk.1 ; \
# install Expect man page
$(INSTALL_DATA) $(srcdir)/expect.man $(DESTDIR)$(mandir)/man1/expect.1
# install man page for Expect and Expectk libraries
# install man page for Expect library
$(INSTALL_DATA) $(srcdir)/libexpect.man $(DESTDIR)$(mandir)/man3/libexpect.3
-for i in $(SCRIPT_MANPAGE_LIST) ; do \
if [ -f $(srcdir)/example/$$i.man ] ; then \
......@@ -273,6 +269,9 @@ test: binaries libraries
shell: binaries libraries
@$(TCLSH) $(SCRIPT)
expectshell: binaries libraries
@$(TCLSH_ENV) expect $(SCRIPT)
gdb:
$(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
......@@ -330,7 +329,8 @@ pkgIndex.tcl:
( echo pkg_mkIndex . $(PKG_LIB_FILE) \; exit; ) | $(TCLSH)
pkgIndex.tcl-hand:
(echo 'package ifneeded Expect $(PACKAGE_VERSION) \
(echo 'if {![package vsatisfies [package provide Tcl] @TCL_VERSION@]} {return}' ; \
echo 'package ifneeded Expect $(PACKAGE_VERSION) \
[list load [file join $$dir $(PKG_LIB_FILE)]]'\
) > pkgIndex.tcl
......@@ -339,8 +339,9 @@ pkgIndex.tcl-hand:
# You may need to tweak this target to make it work correctly.
#========================================================================
TAR = tar
#COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
COMPRESS = $(TAR) zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
DIST_ROOT = /tmp/dist
DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
......@@ -349,87 +350,58 @@ dist-clean:
dist: dist-clean doc
mkdir -p $(DIST_DIR)
cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \
cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \
$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
$(srcdir)/fixline1 \
$(DIST_DIR)/
chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
mkdir $(DIST_DIR)/tclconfig
cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
$(srcdir)/tclconfig/config.guess $(srcdir)/tclconfig/config.sub \
$(DIST_DIR)/tclconfig/
chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
chmod +x $(DIST_DIR)/tclconfig/install-sh
-list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \
for p in $$list; do \
if test -d $(srcdir)/$$p ; then \
mkdir -p $(DIST_DIR)/$$p; \
cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
fi; \
done
cp -p $(srcdir)/*.{c,h,man} $(srcdir)/vgrindefs $(srcdir)/NEWS \
$(srcdir)/INSTALL $(srcdir)/FAQ $(srcdir)/HISTORY \
$(DIST_DIR)/
chmod 664 $(DIST_DIR)/*.{c,h,man}
-list='doc'; \
-list='demos example generic library tests unix win tests testsuite'; \
for p in $$list; do \
if test -d $$p ; then \
if test -d $(srcdir)/$$p ; then \
mkdir -p $(DIST_DIR)/$$p; \
cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \
cp -p $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
fi; \
done
-mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art
rm -rf $(DIST_DIR)/htdocs
(cd $(DIST_ROOT); $(COMPRESS);)
dist_orig:
rm -rf $(PKG_DIR)*
ls -d $(srcdir)/* > __FILES
mkdir $(PKG_DIR)
cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR)
rm __FILES
find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \;
cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE
-tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz
-tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2
-zip -r $(PKG_DIR).zip $(PKG_DIR)
rm -rf $(PKG_DIR)
cp $(DIST_ROOT)/$(PKG_DIR).tar.gz $(top_builddir)
$(SCRIPTS):
$(TCLSH) $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@
## We cannot use @TCL_LIBS@ below (after TCL_LIB_SPEC) because its
## expansion references the contents of @LIBS@, which contains linker
## We cannot use TCL_LIBS below (after TCL_LIB_SPEC) because its
## expansion references the contents of LIBS, which contains linker
## options we cannot use here (and which is what we are replacing in
## the first place).
expect: exp_main_exp.o $(PKG_LIB_FILE)
$(CC) \
@CFLAGS@ \
@EXP_CFLAGS@ \
@EXP_SHLIB_CFLAGS@ \
@TCL_LD_FLAGS@ \
@LDFLAGS_DEFAULT@ \
-o expect exp_main_exp.o \
@EXP_BUILD_LIB_SPEC@ \
@TCL_LIB_SPEC@ \
@DL_LIBS@ @PKG_LIBS@ @MATH_LIBS@ \
@TCL_DL_LIBS@ @PKG_LIBS@ @MATH_LIBS@ \
@TCL_CC_SEARCH_FLAGS@ \
@EXP_CC_SEARCH_FLAGS@
$(SETUID) expect
expectk: exp_main_tk.o $(PKG_LIB_FILE)
$(CC) \
@CFLAGS@ \
@EXP_CFLAGS@ \
@EXP_SHLIB_CFLAGS@ \
@TCL_LD_FLAGS@ \
-o expectk exp_main_tk.o \
@EXP_BUILD_LIB_SPEC@ \
@TK_LIB_SPEC@ \
@TCL_LIB_SPEC@ \
@TK_LIBS@ \
@TCL_CC_SEARCH_FLAGS@ \
@EXP_CC_SEARCH_FLAGS@
$(SETUID) expectk
expectk:
@echo "expectk remove from distribution"
@echo "use tclsh with package require Tk and Expect"
#========================================================================
# Produce FAQ and homepage
......@@ -607,9 +579,9 @@ install-bin-binaries: