2004-05-03 11:59:46 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-03-21 18:42:58 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-05-03 11:59:46 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2006-01-17 20:43:10 +00:00
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<sect1 id="ch-tools-expect" role="wrap">
|
2006-01-17 20:43:10 +00:00
|
|
|
<?dbhtml filename="expect.html"?>
|
|
|
|
|
2007-09-07 20:16:43 +01:00
|
|
|
<sect1info condition="script">
|
|
|
|
<productname>expect</productname>
|
|
|
|
<productnumber>&expect-version;</productnumber>
|
|
|
|
<address>&expect-url;</address>
|
|
|
|
</sect1info>
|
|
|
|
|
2006-01-17 20:43:10 +00:00
|
|
|
<title>Expect-&expect-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="ch-tools-expect">
|
|
|
|
<primary sortas="a-Expect">Expect</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title/>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2006-01-17 20:43:10 +00:00
|
|
|
<para>The Expect package contains a program for carrying out scripted
|
|
|
|
dialogues with other interactive programs.</para>
|
2003-05-02 19:20:20 +01:00
|
|
|
|
2006-01-17 20:43:10 +00:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
2004-01-12 23:23:50 +00:00
|
|
|
|
2006-01-17 20:43:10 +00:00
|
|
|
<seglistitem>
|
2006-05-14 21:16:56 +01:00
|
|
|
<seg>&expect-ch5-sbu;</seg>
|
|
|
|
<seg>&expect-ch5-du;</seg>
|
2006-01-17 20:43:10 +00:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-01-17 20:43:10 +00:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Expect</title>
|
|
|
|
|
2010-11-18 19:51:44 +00:00
|
|
|
<para>First, force Expect's configure script to use <filename>/bin/stty</filename>
|
2006-11-25 19:10:27 +00:00
|
|
|
instead of a <filename>/usr/local/bin/stty</filename> it may find on the host system.
|
2010-09-18 01:12:44 +01:00
|
|
|
This will ensure that our test suite tools remain sane for the final builds of our
|
2007-06-24 14:03:35 +01:00
|
|
|
toolchain:</para>
|
2006-11-25 19:10:27 +00:00
|
|
|
|
2008-10-07 02:09:21 +01:00
|
|
|
<screen><userinput remap="pre">cp -v configure{,.orig}
|
|
|
|
sed 's:/usr/local/bin:/bin:' configure.orig > configure</userinput></screen>
|
2006-11-25 19:10:27 +00:00
|
|
|
|
2006-01-17 20:43:10 +00:00
|
|
|
<para>Now prepare Expect for compilation:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="configure">./configure --prefix=/tools --with-tcl=/tools/lib \
|
2010-11-18 19:51:44 +00:00
|
|
|
--with-tclinclude=/tools/include</userinput></screen>
|
2006-01-17 20:43:10 +00:00
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<title>The meaning of the configure options:</title>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--with-tcl=/tools/lib</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This ensures that the configure script finds the Tcl
|
|
|
|
installation in the temporary tools location instead of possibly
|
|
|
|
locating an existing one on the host system.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--with-tclinclude=/tools/include</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This explicitly tells Expect where to find Tcl's internal
|
|
|
|
headers. Using this option avoids conditions where
|
|
|
|
<command>configure</command> fails because it cannot automatically
|
|
|
|
discover the location of Tcl's headers.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>Build the package:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="make">make</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2008-11-05 21:44:06 +00:00
|
|
|
<para>Compilation is now complete. As discussed earlier, running the test
|
|
|
|
suite is not mandatory for the temporary tools here in this chapter. To run
|
|
|
|
the Expect test suite anyway, issue the following command:</para>
|
2007-09-18 22:11:00 +01:00
|
|
|
|
|
|
|
<screen><userinput remap="test">make test</userinput></screen>
|
|
|
|
|
|
|
|
<para>Note that the Expect test suite is known to experience failures under
|
2006-01-17 20:43:10 +00:00
|
|
|
certain host conditions that are not within our control. Therefore,
|
|
|
|
test suite failures here are not surprising and are not considered
|
|
|
|
critical.</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-01-17 20:43:10 +00:00
|
|
|
<para>Install the package:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="install">make SCRIPTS="" install</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-01-17 20:43:10 +00:00
|
|
|
<variablelist>
|
|
|
|
<title>The meaning of the make parameter:</title>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>SCRIPTS=""</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This prevents installation of the supplementary Expect
|
|
|
|
scripts, which are not needed.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 id="contents-expect" role="content">
|
|
|
|
<title>Contents of Expect</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed program</segtitle>
|
|
|
|
<segtitle>Installed library</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>expect</seg>
|
|
|
|
<seg>libexpect-&expect-lib-version;.a</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="expect">
|
|
|
|
<term><command>expect</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Communicates with other interactive programs according
|
|
|
|
to a script</para>
|
|
|
|
<indexterm zone="ch-tools-expect expect">
|
|
|
|
<primary sortas="b-expect">expect</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="libexpect">
|
|
|
|
<term><filename class="libraryfile">libexpect-&expect-lib-version;.a</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Contains functions that allow Expect to be used as a Tcl
|
|
|
|
extension or to be used directly from C or C++ (without Tcl)</para>
|
|
|
|
<indexterm zone="ch-tools-expect libexpect">
|
|
|
|
<primary sortas="c-libexpect-&expect-lib-version;">libexpect-&expect-lib-version;</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
</sect1>
|