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