expect.xml 5.6 KB

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