expect.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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, force Expect's configure script to use <filename>/bin/stty</filename>
  37. instead of a <filename>/usr/local/bin/stty</filename> it may find on the host system.
  38. This will ensure that our testsuite tools remain sane for the final builds of our
  39. toolchain:</para>
  40. <screen><userinput remap="pre">cp configure{,.bak}
  41. sed 's:/usr/local/bin:/bin:' configure.bak &gt; configure</userinput></screen>
  42. <para>Now prepare Expect for compilation:</para>
  43. <screen><userinput remap="configure">./configure --prefix=/tools --with-tcl=/tools/lib \
  44. --with-tclinclude=/tools/include --with-x=no</userinput></screen>
  45. <variablelist>
  46. <title>The meaning of the configure options:</title>
  47. <varlistentry>
  48. <term><parameter>--with-tcl=/tools/lib</parameter></term>
  49. <listitem>
  50. <para>This ensures that the configure script finds the Tcl
  51. installation in the temporary tools location instead of possibly
  52. locating an existing one on the host system.</para>
  53. </listitem>
  54. </varlistentry>
  55. <varlistentry>
  56. <term><parameter>--with-tclinclude=/tools/include</parameter></term>
  57. <listitem>
  58. <para>This explicitly tells Expect where to find Tcl's internal
  59. headers. Using this option avoids conditions where
  60. <command>configure</command> fails because it cannot automatically
  61. discover the location of Tcl's headers.</para>
  62. </listitem>
  63. </varlistentry>
  64. <varlistentry>
  65. <term><parameter>--with-x=no</parameter></term>
  66. <listitem>
  67. <para>This tells the configure script not to search for Tk (the
  68. Tcl GUI component) or the X Window System libraries, both of which
  69. may reside on the host system but will not exist in the temporary
  70. environment.</para>
  71. </listitem>
  72. </varlistentry>
  73. </variablelist>
  74. <para>Build the package:</para>
  75. <screen><userinput remap="make">make</userinput></screen>
  76. <para>To test the results, issue:</para>
  77. <screen><userinput remap="test">make test</userinput></screen>
  78. <para>Note that the Expect test suite is known to experience failures under
  79. certain host conditions that are not within our control. Therefore,
  80. test suite failures here are not surprising and are not considered
  81. critical.</para>
  82. <para>Install the package:</para>
  83. <screen><userinput remap="install">make SCRIPTS="" install</userinput></screen>
  84. <variablelist>
  85. <title>The meaning of the make parameter:</title>
  86. <varlistentry>
  87. <term><parameter>SCRIPTS=""</parameter></term>
  88. <listitem>
  89. <para>This prevents installation of the supplementary Expect
  90. scripts, which are not needed.</para>
  91. </listitem>
  92. </varlistentry>
  93. </variablelist>
  94. </sect2>
  95. <sect2 id="contents-expect" role="content">
  96. <title>Contents of Expect</title>
  97. <segmentedlist>
  98. <segtitle>Installed program</segtitle>
  99. <segtitle>Installed library</segtitle>
  100. <seglistitem>
  101. <seg>expect</seg>
  102. <seg>libexpect-&expect-lib-version;.a</seg>
  103. </seglistitem>
  104. </segmentedlist>
  105. <variablelist>
  106. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  107. <?dbfo list-presentation="list"?>
  108. <?dbhtml list-presentation="table"?>
  109. <varlistentry id="expect">
  110. <term><command>expect</command></term>
  111. <listitem>
  112. <para>Communicates with other interactive programs according
  113. to a script</para>
  114. <indexterm zone="ch-tools-expect expect">
  115. <primary sortas="b-expect">expect</primary>
  116. </indexterm>
  117. </listitem>
  118. </varlistentry>
  119. <varlistentry id="libexpect">
  120. <term><filename class="libraryfile">libexpect-&expect-lib-version;.a</filename></term>
  121. <listitem>
  122. <para>Contains functions that allow Expect to be used as a Tcl
  123. extension or to be used directly from C or C++ (without Tcl)</para>
  124. <indexterm zone="ch-tools-expect libexpect">
  125. <primary sortas="c-libexpect-&expect-lib-version;">libexpect-&expect-lib-version;</primary>
  126. </indexterm>
  127. </listitem>
  128. </varlistentry>
  129. </variablelist>
  130. </sect2>
  131. </sect1>