expect.xml 5.1 KB

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