source: BOOK/testsuite-tools/common/expect.xml @ 9f5a80a

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 9f5a80a was 9f5a80a, checked in by Chris Staub <chris@…>, 15 years ago

Text updates

  • Property mode set to 100644
File size: 4.9 KB
Line 
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-testsuite-tools-expect" role="wrap">
9  <?dbhtml filename="expect.html"?>
10
11  <title>Expect-&expect-version;</title>
12
13  <indexterm zone="ch-testsuite-tools-expect">
14    <primary sortas="a-Expect">Expect</primary>
15  </indexterm>
16
17  <sect2 role="package">
18    <title/>
19
20    <para>The Expect package contains a program for carrying out scripted
21    dialogues with other interactive programs.</para>
22
23  </sect2>
24
25  <sect2 role="installation">
26    <title>Installation of Expect</title>
27
28    <para os="s1">The following sed tells <command>configure</command> to look
29    for libraries in ${libdir}, not just in /tools/lib:</para>
30
31<screen os="s2"><userinput>sed -i '/EXP_LIB_SPEC=/s@${exec_prefix}/lib@${libdir}@' configure</userinput></screen>
32
33    <para os="t1">The following sed adds a missing include to
34    <filename>Dbg.c</filename>:</para>
35
36<screen os="t2"><userinput>sed -i '1i\#include &lt;expect_cf.h&gt;' Dbg.c</userinput></screen>
37
38    <para os="t3">The following sed causes one of the source files to include
39    the correct header</para>
40
41<screen os="t4"><userinput>sed -i "s/tcl.h/tclInt.h/" exp_inter.c</userinput></screen>
42
43    <para os="p1">The following patch prevents Expect from using functions
44    that are internal to TCL and are no longer available for Expect to
45    link against:</para>
46
47<screen os="p2"><userinput>patch -Np1 -i ../&expect-avoid_tcl_internals-patch;</userinput></screen>
48
49    <para os="a">Fix a bug that can result in false failures during the GCC
50    test suite run:</para>
51
52<screen os="b"><userinput>patch -Np1 -i ../&expect-spawn-patch;</userinput></screen>
53
54    <para os="c">Now prepare Expect for compilation:</para>
55
56<screen os="d"><userinput>./configure --prefix=/tools --with-tcl=/tools/lib \
57    --with-tclinclude=/tools/include</userinput></screen>
58
59    <variablelist os="e">
60      <title>The meaning of the configure options:</title>
61
62      <varlistentry os="e1">
63        <term><parameter>--with-tcl=/tools/lib</parameter></term>
64        <listitem>
65          <para>This ensures that the configure script finds the Tcl
66          installation in the temporary testsuite-tools location.</para>
67        </listitem>
68      </varlistentry>
69
70      <varlistentry os="e2">
71        <term><parameter>--with-tclinclude=/tools/include</parameter></term>
72        <listitem>
73          <para>This explicitly tells Expect where to find Tcl's internal headers.
74           Using this option avoids conditions
75          where <command>configure</command> fails because it cannot
76          automatically discover the location of the Tcl source directory.</para>
77        </listitem>
78      </varlistentry>
79
80    </variablelist>
81
82    <para os="f">Build the package:</para>
83
84<screen os="g"><userinput>make</userinput></screen>
85
86    <para os="i">Install the package:</para>
87
88<screen os="j"><userinput>make SCRIPTS="" install</userinput></screen>
89
90    <variablelist os="k">
91      <title>The meaning of the make parameter:</title>
92
93      <varlistentry>
94        <term><parameter>SCRIPTS=""</parameter></term>
95        <listitem>
96          <para>This prevents installation of the supplementary expect
97          scripts, which are not needed.</para>
98        </listitem>
99      </varlistentry>
100
101    </variablelist>
102
103  </sect2>
104
105  <sect2 id="contents-expect" role="content">
106    <title>Contents of Expect</title>
107
108    <segmentedlist>
109      <segtitle>Installed program</segtitle>
110      <segtitle>Installed library</segtitle>
111
112      <seglistitem>
113        <seg>expect</seg>
114        <seg>libexpect-&expect-lib-version;.a</seg>
115      </seglistitem>
116    </segmentedlist>
117
118    <variablelist>
119      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
120      <?dbfo list-presentation="list"?>
121      <?dbhtml list-presentation="table"?>
122
123      <varlistentry id="expect">
124        <term><command>expect</command></term>
125        <listitem>
126          <para>Communicates with other interactive programs according
127          to a script</para>
128          <indexterm zone="ch-testsuite-tools-expect expect">
129            <primary sortas="b-expect">expect</primary>
130          </indexterm>
131        </listitem>
132      </varlistentry>
133
134      <varlistentry id="libexpect">
135        <term><filename class="libraryfile">libexpect-&expect-lib-version;.a</filename></term>
136        <listitem>
137          <para>Contains functions that allow Expect to be used as a Tcl
138          extension or to be used directly from C or C++ (without Tcl)</para>
139          <indexterm zone="ch-testsuite-tools-expect libexpect">
140            <primary sortas="c-libexpect-&expect-lib-version;">libexpect-&expect-lib-version;</primary>
141          </indexterm>
142        </listitem>
143      </varlistentry>
144
145    </variablelist>
146
147  </sect2>
148
149</sect1>
Note: See TracBrowser for help on using the repository browser.