expect.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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. <sect1 id="ch-tools-expect" role="wrap">
  8. <?dbhtml filename="expect.html"?>
  9. <sect1info condition="script">
  10. <productname>expect</productname>
  11. <productnumber>&expect-version;</productnumber>
  12. <address>&expect-url;</address>
  13. </sect1info>
  14. <title>Expect-&expect-version;</title>
  15. <indexterm zone="ch-tools-expect">
  16. <primary sortas="a-Expect">Expect</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Expect package contains a program for carrying out scripted
  21. dialogues with other interactive programs.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&expect-ch5-sbu;</seg>
  27. <seg>&expect-ch5-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Expect</title>
  33. <para>First, fix a bug that can result in false failures during the GCC test
  34. suite run:</para>
  35. <screen><userinput remap="pre">patch -Np1 -i ../&expect-spawn-patch;</userinput></screen>
  36. <para>Next, fix a bug that is a result of recent Tcl changes:</para>
  37. <screen><userinput remap="pre">patch -Np1 -i ../&expect-tcl-patch;</userinput></screen>
  38. <para>Next, force Expect's configure script to use <filename>/bin/stty</filename>
  39. instead of a <filename>/usr/local/bin/stty</filename> it may find on the host system.
  40. This will ensure that our testsuite tools remain sane for the final builds of our
  41. toolchain:</para>
  42. <screen><userinput remap="pre">cp -v configure{,.orig}
  43. sed 's:/usr/local/bin:/bin:' configure.orig &gt; configure</userinput></screen>
  44. <para>Now prepare Expect for compilation:</para>
  45. <screen><userinput remap="configure">./configure --prefix=/tools --with-tcl=/tools/lib \
  46. --with-tclinclude=/tools/include --with-x=no</userinput></screen>
  47. <variablelist>
  48. <title>The meaning of the configure options:</title>
  49. <varlistentry>
  50. <term><parameter>--with-tcl=/tools/lib</parameter></term>
  51. <listitem>
  52. <para>This ensures that the configure script finds the Tcl
  53. installation in the temporary tools location instead of possibly
  54. locating an existing one on the host system.</para>
  55. </listitem>
  56. </varlistentry>
  57. <varlistentry>
  58. <term><parameter>--with-tclinclude=/tools/include</parameter></term>
  59. <listitem>
  60. <para>This explicitly tells Expect where to find Tcl's internal
  61. headers. Using this option avoids conditions where
  62. <command>configure</command> fails because it cannot automatically
  63. discover the location of Tcl's headers.</para>
  64. </listitem>
  65. </varlistentry>
  66. <varlistentry>
  67. <term><parameter>--with-x=no</parameter></term>
  68. <listitem>
  69. <para>This tells the configure script not to search for Tk (the
  70. Tcl GUI component) or the X Window System libraries, both of which
  71. may reside on the host system but will not exist in the temporary
  72. environment.</para>
  73. </listitem>
  74. </varlistentry>
  75. </variablelist>
  76. <para>Build the package:</para>
  77. <screen><userinput remap="make">make</userinput></screen>
  78. <para>Compilation is now complete. As discussed earlier, running the test
  79. suite is not mandatory for the temporary tools here in this chapter. To run
  80. the Expect test suite anyway, issue the following command:</para>
  81. <screen><userinput remap="test">make test</userinput></screen>
  82. <para>Note that the Expect test suite is known to experience failures under
  83. certain host conditions that are not within our control. Therefore,
  84. test suite failures here are not surprising and are not considered
  85. critical.</para>
  86. <para>Install the package:</para>
  87. <screen><userinput remap="install">make SCRIPTS="" install</userinput></screen>
  88. <variablelist>
  89. <title>The meaning of the make parameter:</title>
  90. <varlistentry>
  91. <term><parameter>SCRIPTS=""</parameter></term>
  92. <listitem>
  93. <para>This prevents installation of the supplementary Expect
  94. scripts, which are not needed.</para>
  95. </listitem>
  96. </varlistentry>
  97. </variablelist>
  98. </sect2>
  99. <sect2 id="contents-expect" role="content">
  100. <title>Contents of Expect</title>
  101. <segmentedlist>
  102. <segtitle>Installed program</segtitle>
  103. <segtitle>Installed library</segtitle>
  104. <seglistitem>
  105. <seg>expect</seg>
  106. <seg>libexpect-&expect-lib-version;.a</seg>
  107. </seglistitem>
  108. </segmentedlist>
  109. <variablelist>
  110. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  111. <?dbfo list-presentation="list"?>
  112. <?dbhtml list-presentation="table"?>
  113. <varlistentry id="expect">
  114. <term><command>expect</command></term>
  115. <listitem>
  116. <para>Communicates with other interactive programs according
  117. to a script</para>
  118. <indexterm zone="ch-tools-expect expect">
  119. <primary sortas="b-expect">expect</primary>
  120. </indexterm>
  121. </listitem>
  122. </varlistentry>
  123. <varlistentry id="libexpect">
  124. <term><filename class="libraryfile">libexpect-&expect-lib-version;.a</filename></term>
  125. <listitem>
  126. <para>Contains functions that allow Expect to be used as a Tcl
  127. extension or to be used directly from C or C++ (without Tcl)</para>
  128. <indexterm zone="ch-tools-expect libexpect">
  129. <primary sortas="c-libexpect-&expect-lib-version;">libexpect-&expect-lib-version;</primary>
  130. </indexterm>
  131. </listitem>
  132. </varlistentry>
  133. </variablelist>
  134. </sect2>
  135. </sect1>