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