| 1 |
This is the README for GNU awk 5 under Windows32. |
| 2 |
|
| 3 |
Gawk has been compiled and tested on MS-Windows using |
| 4 |
the MinGW ports of the GNU development tools. |
| 5 |
|
| 6 |
The Cygwin environment (http://cygwin.com) may also be used |
| 7 |
to compile and run gawk under Windows. For Cygwin, building and |
| 8 |
installation is the same as under Unix: |
| 9 |
|
| 10 |
tar -xvpzf gawk-5.3.x.tar.gz |
| 11 |
cd gawk-5.3.x |
| 12 |
./configure && make |
| 13 |
|
| 14 |
The `configure' step takes a long time, but works otherwise. |
| 15 |
|
| 16 |
Building gawk |
| 17 |
------------- |
| 18 |
|
| 19 |
Copy the files in the `pc' directory (EXCEPT for `ChangeLog') to the |
| 20 |
directory with the rest of the gawk sources. (The subdirectories of |
| 21 |
`pc' need not be copied.) The Makefile contains a configuration |
| 22 |
section with comments, and may need to be edited in order to work |
| 23 |
with your make utility. Also, copy the file Makefile.ext to |
| 24 |
extension/Makefile. |
| 25 |
|
| 26 |
The "prefix" line in the Makefile is used during the install of gawk |
| 27 |
(and in building igawk.bat and igawk.cmd). Since the libraries for |
| 28 |
gawk will be installed under $(prefix)/lib/awk (e.g., /gnu/lib/awk), |
| 29 |
it is convenient to have this directory in DEFPATH of config.h. |
| 30 |
|
| 31 |
The makefile contains a number of targets for building the MS-Windows |
| 32 |
version. A list of targets will be printed if the make command is |
| 33 |
given without a target. As an example, to build gawk using the MinGW |
| 34 |
tools, enter "make mingw32". |
| 35 |
|
| 36 |
After you build in the top-level directory, chdir to the extension |
| 37 |
subdirectory and say "make" there to build the extensions. If you |
| 38 |
built gawk without libmpfr, say this instead to build the extensions: |
| 39 |
|
| 40 |
make MPFR= MPFR_LIBS= |
| 41 |
|
| 42 |
|
| 43 |
Testing and installing gawk |
| 44 |
--------------------------- |
| 45 |
|
| 46 |
The command "make test" (and possibly "make install") requires several |
| 47 |
Unix-like tools, including an sh-like shell, sed, cp, and cmp. Only |
| 48 |
GNU make is known to work on "make test". |
| 49 |
|
| 50 |
There are two methods for the install: Method 1 uses a typical Unix-like |
| 51 |
approach and requires cat, cp, mkdir, sed, and sh; method 2 uses gawk |
| 52 |
and batch files. See the configuration section of the makefile. |
| 53 |
|
| 54 |
The file test/Makefile may need some editing. A sample makefile with |
| 55 |
comments appears in pc/Makefile.tst, and can be used to modify |
| 56 |
test/Makefile for your platform. For starters, just copy |
| 57 |
pc/Makefile.tst to test/Makefile, then walk through the variables |
| 58 |
defined at the beginning and change them as appropriate for your |
| 59 |
setup. In addition, some files in the test directory may need to have |
| 60 |
their end-of-line markers converted, as described in Makefile.tst. |
| 61 |
One change you will have to make for testing the MinGW port using the |
| 62 |
MSYS Bash is to set SLASH to //. |
| 63 |
|
| 64 |
Testing Gawk built with MPFR support should report 30 tests failed, and |
| 65 |
if your ls.exe doesn't produce inode numbers consistent with the readdir |
| 66 |
extension, you should see 31 failures. If you see more failures, you |
| 67 |
should investigate the reasons. |
| 68 |
|
| 69 |
It is routine to install by hand, but note that the install target also |
| 70 |
builds igawk.bat and igawk.cmd, which are used to add an include |
| 71 |
facility to gawk (and which require sh). |
| 72 |
|
| 73 |
|
| 74 |
Gawk thanks |
| 75 |
----------- |
| 76 |
|
| 77 |
We are indebted to Juan Grigera <[email protected]> for |
| 78 |
additional help on changes for MS-Windows. |
| 79 |
|
| 80 |
Support for MS-Windows started in gawk-3.0.3. |