gawk-inst.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <sect2>
  2. <title>Installation of Gawk</title>
  3. <para>Warning: do NOT run <userinput>make uninstall</userinput> on this
  4. package if you apply the <emphasis>sed</emphasis> fix to change the
  5. <filename class="directory">libexec</filename> directory definition. The
  6. <emphasis>uninstall</emphasis> rule in the <filename>Makefile</filename>
  7. file runs a command like <userinput>rm -rf
  8. &lt;libexecdir&gt;/*</userinput> Since we change the <filename
  9. class="directory">libexec</filename> directory to <filename
  10. class="directory">/usr/bin</filename> it'll run <userinput>rm -rf
  11. /usr/bin/*</userinput></para>
  12. <para>When installing Gawk using glibc-2.1.x on your base system,
  13. it may be necessary to use a fix to prevent a variable name conflict. The
  14. following commands can be used in this case. Note that these commands
  15. can also be used for other glibc versions so if you aren't sure, then
  16. use the first version.</para>
  17. <para><screen><userinput>cp awklib/Makefile.in awklib/Makefile.in.backup &amp;&amp;
  18. sed -e '/^datadir/s/awk/gawk/' \
  19. -e '/^libexecdir/s%/awk%%' awklib/Makefile.in.backup \
  20. &nbsp;&nbsp;&nbsp;&gt; awklib/Makefile.in &amp;&amp;
  21. export CPPFLAGS=-Dre_max_failures=re_max_failures2 &amp;&amp;
  22. ./configure --prefix=$LFS/usr --disable-nls \
  23. &nbsp;&nbsp;&nbsp;--libexecdir=$LFS/usr/bin &amp;&amp;
  24. unset CPPFLAGS &amp;&amp;
  25. make LDFLAGS=-static &amp;&amp;
  26. make install</userinput></screen></para>
  27. <para>If you are using a newer glibc version (2.2.x), you can use the
  28. following commands to install Gawk:</para>
  29. <para><screen><userinput>cp awklib/Makefile.in awklib/Makefile.in.backup &amp;&amp;
  30. sed -e '/^datadir/s/awk/gawk/' \
  31. -e '/^libexecdir/s%/awk%%' awklib/Makefile.in.backup \
  32. &nbsp;&nbsp;&nbsp;&gt; awklib/Makefile.in &amp;&amp;
  33. ./configure --prefix=$LFS/usr --disable-nls \
  34. &nbsp;&nbsp;&nbsp;--libexecdir=$LFS/usr/bin &amp;&amp;
  35. make LDFLAGS=-static &amp;&amp;
  36. make install</userinput></screen></para>
  37. </sect2>