[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 |
|
---|
| 44 | <para>First, fix a bug that can result in false failures during the GCC test
|
---|
| 45 | suite run:</para>
|
---|
[3d36131c] | 46 |
|
---|
[0445a3d] | 47 | <screen><userinput remap="pre">patch -Np1 -i ../&expect-spawn-patch;</userinput></screen>
|
---|
[73aedd1d] | 48 |
|
---|
[9d4c6dc] | 49 | <para>Next, force Expect's configure script to use <filename>/bin/stty</filename>
|
---|
| 50 | instead of a <filename>/usr/local/bin/stty</filename> it may find on the host system.
|
---|
| 51 | This will ensure that our testsuite tools remain sane for the final builds of our
|
---|
[f19e766] | 52 | toolchain:</para>
|
---|
[9d4c6dc] | 53 |
|
---|
[0445a3d] | 54 | <screen><userinput remap="pre">cp configure{,.bak}
|
---|
[9d4c6dc] | 55 | sed 's:/usr/local/bin:/bin:' configure.bak > configure</userinput></screen>
|
---|
| 56 |
|
---|
[09fb7a09] | 57 | <para>Now prepare Expect for compilation:</para>
|
---|
[73aedd1d] | 58 |
|
---|
[0445a3d] | 59 | <screen><userinput remap="configure">./configure --prefix=/tools --with-tcl=/tools/lib \
|
---|
[09fb7a09] | 60 | --with-tclinclude=/tools/include --with-x=no</userinput></screen>
|
---|
| 61 |
|
---|
| 62 | <variablelist>
|
---|
| 63 | <title>The meaning of the configure options:</title>
|
---|
| 64 |
|
---|
| 65 | <varlistentry>
|
---|
| 66 | <term><parameter>--with-tcl=/tools/lib</parameter></term>
|
---|
| 67 | <listitem>
|
---|
| 68 | <para>This ensures that the configure script finds the Tcl
|
---|
| 69 | installation in the temporary tools location instead of possibly
|
---|
| 70 | locating an existing one on the host system.</para>
|
---|
| 71 | </listitem>
|
---|
| 72 | </varlistentry>
|
---|
| 73 |
|
---|
| 74 | <varlistentry>
|
---|
| 75 | <term><parameter>--with-tclinclude=/tools/include</parameter></term>
|
---|
| 76 | <listitem>
|
---|
| 77 | <para>This explicitly tells Expect where to find Tcl's internal
|
---|
| 78 | headers. Using this option avoids conditions where
|
---|
| 79 | <command>configure</command> fails because it cannot automatically
|
---|
| 80 | discover the location of Tcl's headers.</para>
|
---|
| 81 | </listitem>
|
---|
| 82 | </varlistentry>
|
---|
| 83 |
|
---|
| 84 | <varlistentry>
|
---|
| 85 | <term><parameter>--with-x=no</parameter></term>
|
---|
| 86 | <listitem>
|
---|
| 87 | <para>This tells the configure script not to search for Tk (the
|
---|
| 88 | Tcl GUI component) or the X Window System libraries, both of which
|
---|
| 89 | may reside on the host system but will not exist in the temporary
|
---|
| 90 | environment.</para>
|
---|
| 91 | </listitem>
|
---|
| 92 | </varlistentry>
|
---|
| 93 |
|
---|
| 94 | </variablelist>
|
---|
| 95 |
|
---|
| 96 | <para>Build the package:</para>
|
---|
[73aedd1d] | 97 |
|
---|
[0445a3d] | 98 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 99 |
|
---|
[0445a3d] | 100 | <para>To test the results, issue:</para>
|
---|
| 101 |
|
---|
| 102 | <screen><userinput remap="test">make test</userinput></screen>
|
---|
| 103 |
|
---|
| 104 | <para>Note that the Expect test suite is known to experience failures under
|
---|
[09fb7a09] | 105 | certain host conditions that are not within our control. Therefore,
|
---|
| 106 | test suite failures here are not surprising and are not considered
|
---|
| 107 | critical.</para>
|
---|
[73aedd1d] | 108 |
|
---|
[09fb7a09] | 109 | <para>Install the package:</para>
|
---|
[73aedd1d] | 110 |
|
---|
[0445a3d] | 111 | <screen><userinput remap="install">make SCRIPTS="" install</userinput></screen>
|
---|
[73aedd1d] | 112 |
|
---|
[09fb7a09] | 113 | <variablelist>
|
---|
| 114 | <title>The meaning of the make parameter:</title>
|
---|
| 115 |
|
---|
| 116 | <varlistentry>
|
---|
| 117 | <term><parameter>SCRIPTS=""</parameter></term>
|
---|
| 118 | <listitem>
|
---|
| 119 | <para>This prevents installation of the supplementary Expect
|
---|
| 120 | scripts, which are not needed.</para>
|
---|
| 121 | </listitem>
|
---|
| 122 | </varlistentry>
|
---|
| 123 |
|
---|
| 124 | </variablelist>
|
---|
| 125 |
|
---|
| 126 | </sect2>
|
---|
| 127 |
|
---|
| 128 | <sect2 id="contents-expect" role="content">
|
---|
| 129 | <title>Contents of Expect</title>
|
---|
| 130 |
|
---|
| 131 | <segmentedlist>
|
---|
| 132 | <segtitle>Installed program</segtitle>
|
---|
| 133 | <segtitle>Installed library</segtitle>
|
---|
| 134 |
|
---|
| 135 | <seglistitem>
|
---|
| 136 | <seg>expect</seg>
|
---|
| 137 | <seg>libexpect-&expect-lib-version;.a</seg>
|
---|
| 138 | </seglistitem>
|
---|
| 139 | </segmentedlist>
|
---|
| 140 |
|
---|
| 141 | <variablelist>
|
---|
| 142 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 143 | <?dbfo list-presentation="list"?>
|
---|
| 144 | <?dbhtml list-presentation="table"?>
|
---|
| 145 |
|
---|
| 146 | <varlistentry id="expect">
|
---|
| 147 | <term><command>expect</command></term>
|
---|
| 148 | <listitem>
|
---|
| 149 | <para>Communicates with other interactive programs according
|
---|
| 150 | to a script</para>
|
---|
| 151 | <indexterm zone="ch-tools-expect expect">
|
---|
| 152 | <primary sortas="b-expect">expect</primary>
|
---|
| 153 | </indexterm>
|
---|
| 154 | </listitem>
|
---|
| 155 | </varlistentry>
|
---|
| 156 |
|
---|
| 157 | <varlistentry id="libexpect">
|
---|
| 158 | <term><filename class="libraryfile">libexpect-&expect-lib-version;.a</filename></term>
|
---|
| 159 | <listitem>
|
---|
| 160 | <para>Contains functions that allow Expect to be used as a Tcl
|
---|
| 161 | extension or to be used directly from C or C++ (without Tcl)</para>
|
---|
| 162 | <indexterm zone="ch-tools-expect libexpect">
|
---|
| 163 | <primary sortas="c-libexpect-&expect-lib-version;">libexpect-&expect-lib-version;</primary>
|
---|
| 164 | </indexterm>
|
---|
| 165 | </listitem>
|
---|
| 166 | </varlistentry>
|
---|
| 167 |
|
---|
| 168 | </variablelist>
|
---|
| 169 |
|
---|
| 170 | </sect2>
|
---|
[673b0d8] | 171 |
|
---|
| 172 | </sect1>
|
---|