[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[09fb7a09] | 7 |
|
---|
[81fd230] | 8 | <sect1 id="ch-tools-expect" role="wrap">
|
---|
[09fb7a09] | 9 | <?dbhtml filename="expect.html"?>
|
---|
| 10 |
|
---|
[e747759] | 11 | <sect1info condition="script">
|
---|
| 12 | <productname>expect</productname>
|
---|
| 13 | <productnumber>&expect-version;</productnumber>
|
---|
| 14 | <address>&expect-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
[09fb7a09] | 17 | <title>Expect-&expect-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="ch-tools-expect">
|
---|
| 20 | <primary sortas="a-Expect">Expect</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
[673b0d8] | 25 |
|
---|
[09fb7a09] | 26 | <para>The Expect package contains a program for carrying out scripted
|
---|
| 27 | dialogues with other interactive programs.</para>
|
---|
[bc82645e] | 28 |
|
---|
[09fb7a09] | 29 | <segmentedlist>
|
---|
| 30 | <segtitle>&buildtime;</segtitle>
|
---|
| 31 | <segtitle>&diskspace;</segtitle>
|
---|
[5888299] | 32 |
|
---|
[09fb7a09] | 33 | <seglistitem>
|
---|
[e4a5635] | 34 | <seg>&expect-ch5-sbu;</seg>
|
---|
| 35 | <seg>&expect-ch5-du;</seg>
|
---|
[09fb7a09] | 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
[73aedd1d] | 38 |
|
---|
[09fb7a09] | 39 | </sect2>
|
---|
| 40 |
|
---|
| 41 | <sect2 role="installation">
|
---|
| 42 | <title>Installation of Expect</title>
|
---|
| 43 |
|
---|
[bd488ac] | 44 | <para>First, force Expect's configure script to use <filename>/bin/stty</filename>
|
---|
[9d4c6dc] | 45 | instead of a <filename>/usr/local/bin/stty</filename> it may find on the host system.
|
---|
[0ebe029b] | 46 | This will ensure that our test suite tools remain sane for the final builds of our
|
---|
[f19e766] | 47 | toolchain:</para>
|
---|
[9d4c6dc] | 48 |
|
---|
[a877994] | 49 | <screen><userinput remap="pre">cp -v configure{,.orig}
|
---|
| 50 | sed 's:/usr/local/bin:/bin:' configure.orig > configure</userinput></screen>
|
---|
[9d4c6dc] | 51 |
|
---|
[09fb7a09] | 52 | <para>Now prepare Expect for compilation:</para>
|
---|
[73aedd1d] | 53 |
|
---|
[0445a3d] | 54 | <screen><userinput remap="configure">./configure --prefix=/tools --with-tcl=/tools/lib \
|
---|
[bd488ac] | 55 | --with-tclinclude=/tools/include</userinput></screen>
|
---|
[09fb7a09] | 56 |
|
---|
| 57 | <variablelist>
|
---|
| 58 | <title>The meaning of the configure options:</title>
|
---|
| 59 |
|
---|
| 60 | <varlistentry>
|
---|
| 61 | <term><parameter>--with-tcl=/tools/lib</parameter></term>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>This ensures that the configure script finds the Tcl
|
---|
| 64 | installation in the temporary tools location instead of possibly
|
---|
| 65 | locating an existing one on the host system.</para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </varlistentry>
|
---|
| 68 |
|
---|
| 69 | <varlistentry>
|
---|
| 70 | <term><parameter>--with-tclinclude=/tools/include</parameter></term>
|
---|
| 71 | <listitem>
|
---|
| 72 | <para>This explicitly tells Expect where to find Tcl's internal
|
---|
| 73 | headers. Using this option avoids conditions where
|
---|
| 74 | <command>configure</command> fails because it cannot automatically
|
---|
| 75 | discover the location of Tcl's headers.</para>
|
---|
| 76 | </listitem>
|
---|
| 77 | </varlistentry>
|
---|
| 78 |
|
---|
| 79 | </variablelist>
|
---|
| 80 |
|
---|
| 81 | <para>Build the package:</para>
|
---|
[73aedd1d] | 82 |
|
---|
[0445a3d] | 83 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 84 |
|
---|
[1fa0f19] | 85 | <para>Compilation is now complete. As discussed earlier, running the test
|
---|
| 86 | suite is not mandatory for the temporary tools here in this chapter. To run
|
---|
| 87 | the Expect test suite anyway, issue the following command:</para>
|
---|
[0445a3d] | 88 |
|
---|
| 89 | <screen><userinput remap="test">make test</userinput></screen>
|
---|
| 90 |
|
---|
| 91 | <para>Note that the Expect test suite is known to experience failures under
|
---|
[09fb7a09] | 92 | certain host conditions that are not within our control. Therefore,
|
---|
| 93 | test suite failures here are not surprising and are not considered
|
---|
| 94 | critical.</para>
|
---|
[73aedd1d] | 95 |
|
---|
[09fb7a09] | 96 | <para>Install the package:</para>
|
---|
[73aedd1d] | 97 |
|
---|
[0445a3d] | 98 | <screen><userinput remap="install">make SCRIPTS="" install</userinput></screen>
|
---|
[73aedd1d] | 99 |
|
---|
[09fb7a09] | 100 | <variablelist>
|
---|
| 101 | <title>The meaning of the make parameter:</title>
|
---|
| 102 |
|
---|
| 103 | <varlistentry>
|
---|
| 104 | <term><parameter>SCRIPTS=""</parameter></term>
|
---|
| 105 | <listitem>
|
---|
| 106 | <para>This prevents installation of the supplementary Expect
|
---|
| 107 | scripts, which are not needed.</para>
|
---|
| 108 | </listitem>
|
---|
| 109 | </varlistentry>
|
---|
| 110 |
|
---|
| 111 | </variablelist>
|
---|
| 112 |
|
---|
| 113 | </sect2>
|
---|
| 114 |
|
---|
| 115 | <sect2 id="contents-expect" role="content">
|
---|
| 116 | <title>Contents of Expect</title>
|
---|
| 117 |
|
---|
| 118 | <segmentedlist>
|
---|
| 119 | <segtitle>Installed program</segtitle>
|
---|
| 120 | <segtitle>Installed library</segtitle>
|
---|
| 121 |
|
---|
| 122 | <seglistitem>
|
---|
| 123 | <seg>expect</seg>
|
---|
| 124 | <seg>libexpect-&expect-lib-version;.a</seg>
|
---|
| 125 | </seglistitem>
|
---|
| 126 | </segmentedlist>
|
---|
| 127 |
|
---|
| 128 | <variablelist>
|
---|
| 129 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 130 | <?dbfo list-presentation="list"?>
|
---|
| 131 | <?dbhtml list-presentation="table"?>
|
---|
| 132 |
|
---|
| 133 | <varlistentry id="expect">
|
---|
| 134 | <term><command>expect</command></term>
|
---|
| 135 | <listitem>
|
---|
| 136 | <para>Communicates with other interactive programs according
|
---|
| 137 | to a script</para>
|
---|
| 138 | <indexterm zone="ch-tools-expect expect">
|
---|
| 139 | <primary sortas="b-expect">expect</primary>
|
---|
| 140 | </indexterm>
|
---|
| 141 | </listitem>
|
---|
| 142 | </varlistentry>
|
---|
| 143 |
|
---|
| 144 | <varlistentry id="libexpect">
|
---|
| 145 | <term><filename class="libraryfile">libexpect-&expect-lib-version;.a</filename></term>
|
---|
| 146 | <listitem>
|
---|
| 147 | <para>Contains functions that allow Expect to be used as a Tcl
|
---|
| 148 | extension or to be used directly from C or C++ (without Tcl)</para>
|
---|
| 149 | <indexterm zone="ch-tools-expect libexpect">
|
---|
| 150 | <primary sortas="c-libexpect-&expect-lib-version;">libexpect-&expect-lib-version;</primary>
|
---|
| 151 | </indexterm>
|
---|
| 152 | </listitem>
|
---|
| 153 | </varlistentry>
|
---|
| 154 |
|
---|
| 155 | </variablelist>
|
---|
| 156 |
|
---|
| 157 | </sect2>
|
---|
[673b0d8] | 158 |
|
---|
| 159 | </sect1>
|
---|