|
Packit |
575503 |
This is the README for GNU awk 4 under Windows32, OS/2, and DOS.
|
|
Packit |
575503 |
|
|
Packit |
575503 |
Gawk has been compiled and tested under OS/2, DOS, and Windows32 using
|
|
Packit |
575503 |
the GNU development tools from DJ Delorie (DJGPP; DOS with special
|
|
Packit |
575503 |
support for long filenames on Windows), Eberhard Mattes (EMX; OS/2,
|
|
Packit |
575503 |
DOS, and Windows32 with rsxnt), and Jan-Jaap van der Heijden and Mumit Khan
|
|
Packit |
575503 |
(Mingw32; Windows32).
|
|
Packit |
575503 |
|
|
Packit |
575503 |
The Cygwin environment (http://cygwin.com) may also be used
|
|
Packit |
575503 |
to compile and run gawk under Windows. For Cygwin, building and
|
|
Packit |
575503 |
installation is the same as under Unix:
|
|
Packit |
575503 |
|
|
Packit |
575503 |
tar -xvpzf gawk-4.2.x.tar.gz
|
|
Packit |
575503 |
cd gawk-4.2.x
|
|
Packit |
575503 |
./configure && make
|
|
Packit |
575503 |
|
|
Packit |
575503 |
The `configure' step takes a long time, but works otherwise.
|
|
Packit |
575503 |
|
|
Packit |
575503 |
******************************** N O T E *******************************
|
|
Packit |
575503 |
* The `|&' operator only works when gawk is compiled for Cygwin or for *
|
|
Packit |
575503 |
* MinGW. Neither socket support nor two-way pipes work in any other *
|
|
Packit |
575503 |
* Windows environment! *
|
|
Packit |
575503 |
************************************************************************
|
|
Packit |
575503 |
|
|
Packit |
575503 |
Building gawk
|
|
Packit |
575503 |
-------------
|
|
Packit |
575503 |
|
|
Packit |
575503 |
Copy the files in the `pc' directory (EXCEPT for `ChangeLog') to the
|
|
Packit |
575503 |
directory with the rest of the gawk sources. (The subdirectories of
|
|
Packit |
575503 |
`pc' need not be copied.) The Makefile contains a configuration
|
|
Packit |
575503 |
section with comments, and may need to be edited in order to work
|
|
Packit |
575503 |
with your make utility. If you are building with MinGW, copy the
|
|
Packit |
575503 |
file Makefile.ext to extension/Makefile.
|
|
Packit |
575503 |
|
|
Packit |
575503 |
The "prefix" line in the Makefile is used during the install of gawk
|
|
Packit |
575503 |
(and in building igawk.bat and igawk.cmd). Since the libraries for
|
|
Packit |
575503 |
gawk will be installed under $(prefix)/lib/awk (e.g., /gnu/lib/awk),
|
|
Packit |
575503 |
it is convenient to have this directory in DEFPATH of config.h.
|
|
Packit |
575503 |
|
|
Packit |
575503 |
The makefile contains a number of targets for building various DOS and
|
|
Packit |
575503 |
OS/2 versions. A list of targets will be printed if the make command is
|
|
Packit |
575503 |
given without a target. As an example, to build gawk using the djgpp
|
|
Packit |
575503 |
tools, enter "make djgpp".
|
|
Packit |
575503 |
|
|
Packit |
575503 |
For the MinGW build, after you build in the top-level directory, chdir
|
|
Packit |
575503 |
to the extension subdirectory and say "make" there to build the
|
|
Packit |
575503 |
extensions. If you built gawk without libmpfr, say this instead to
|
|
Packit |
575503 |
build the extensions:
|
|
Packit |
575503 |
|
|
Packit |
575503 |
make MPFR= MPFR_LIBS=
|
|
Packit |
575503 |
|
|
Packit |
575503 |
|
|
Packit |
575503 |
Testing and installing gawk
|
|
Packit |
575503 |
---------------------------
|
|
Packit |
575503 |
|
|
Packit |
575503 |
The command "make test" (and possibly "make install") requires several
|
|
Packit |
575503 |
Unix-like tools, including an sh-like shell, sed, cp, and cmp. Only
|
|
Packit |
575503 |
dmake and GNU make are known to work on "make test".
|
|
Packit |
575503 |
|
|
Packit |
575503 |
There are two methods for the install: Method 1 uses a typical Unix-like
|
|
Packit |
575503 |
approach and requires cat, cp, mkdir, sed, and sh; method 2 uses gawk
|
|
Packit |
575503 |
and batch files. See the configuration section of the makefile.
|
|
Packit |
575503 |
|
|
Packit |
575503 |
The file test/Makefile will need some editing (especially for DOS). A
|
|
Packit |
575503 |
sample makefile with comments appears in pc/Makefile.tst, and can be
|
|
Packit |
575503 |
used to modify test/Makefile for your platform. For starters, just
|
|
Packit |
575503 |
copy pc/Makefile.tst to test/Makefile, then walk through the variables
|
|
Packit |
575503 |
defined at the beginning and change them as appropriate for your
|
|
Packit |
575503 |
setup. In addition, some files in the test directory may need to have
|
|
Packit |
575503 |
their end-of-line markers converted, as described in Makefile.tst.
|
|
Packit |
575503 |
|
|
Packit |
575503 |
As with building gawk, the OS, shell, and long filename issues come into
|
|
Packit |
575503 |
play when testing, too. If you are testing gawk on a LFN aware system with
|
|
Packit |
575503 |
some LFN aware tools, you may have problems if the shell that you specify in
|
|
Packit |
575503 |
test/Makefile is not LFN aware. This problem will apply whether or not
|
|
Packit |
575503 |
you are building a LFN aware gawk. See the comments in pc/Makefile.tst
|
|
Packit |
575503 |
for more information on this.
|
|
Packit |
575503 |
|
|
Packit |
575503 |
It is routine to install by hand, but note that the install target also
|
|
Packit |
575503 |
builds igawk.bat and igawk.cmd, which are used to add an include
|
|
Packit |
575503 |
facility to gawk (and which require sh).
|
|
Packit |
575503 |
|
|
Packit |
575503 |
|
|
Packit |
575503 |
Gawk thanks
|
|
Packit |
575503 |
-----------
|
|
Packit |
575503 |
|
|
Packit |
575503 |
The DOS maintainers wish to express their thanks to Eli Zaretskii
|
|
Packit |
575503 |
<eliz@gnu.org> for his work and for the many conversations concerning
|
|
Packit |
575503 |
gawk, make, and djgpp. His FAQ for djgpp is essential reading, and he
|
|
Packit |
575503 |
was always willing to answer our questions (even when we didn't read
|
|
Packit |
575503 |
the relevant portions of the FAQ :).
|
|
Packit |
575503 |
|
|
Packit |
575503 |
We are indebted to Juan Grigera <juan@biophnet.unlp.edu.ar> for
|
|
Packit |
575503 |
additional help on changes for Windows32.
|
|
Packit |
575503 |
|
|
Packit |
575503 |
|
|
Packit |
575503 |
----
|
|
Packit |
575503 |
If you have any problems with the DOS or OS/2 versions of Gawk,
|
|
Packit |
575503 |
please send bug reports (along with the version and compiler used) to
|
|
Packit |
575503 |
|
|
Packit |
575503 |
Juan Manuel Guerrero, juan.guerrero@gmx.de (DJGPP)
|
|
Packit |
575503 |
|
|
Packit |
575503 |
or
|
|
Packit |
575503 |
|
|
Packit |
575503 |
andreas.buening@nexgo.de (OS/2 version)
|
|
Packit |
575503 |
|
|
Packit |
575503 |
Support for Windows32 started in gawk-3.0.3.
|
|
Packit |
575503 |
|
|
Packit |
575503 |
----
|
|
Packit |
575503 |
From: Eric Pement <eric.pement@gmail.com>
|
|
Packit |
575503 |
Newsgroups: comp.lang.awk
|
|
Packit |
575503 |
Subject: djgpp Gawk ver. 4.0 available
|
|
Packit |
575503 |
Date: Tue, 26 Jul 2011 06:42:00 -0700 (PDT)
|
|
Packit |
575503 |
MS Windows users:
|
|
Packit |
575503 |
|
|
Packit |
575503 |
The DJGPP compilation of GNU awk v4.0.0 is now available here:
|
|
Packit |
575503 |
|
|
Packit |
575503 |
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/gwk400b.zip
|
|
Packit |
575503 |
|
|
Packit |
575503 |
For those who don't know the difference between the DGJPP compile and
|
|
Packit |
575503 |
other versions compiled for Windows, the most noticeable to me is that
|
|
Packit |
575503 |
it supports Unix-style use of 'single' and "double" quoting. Example:
|
|
Packit |
575503 |
|
|
Packit |
575503 |
[c:\tmp]> :: normal Windows awk requires complex quoting
|
|
Packit |
575503 |
[c:\tmp]> gawk "BEGIN{ print \"hello, world\" }"
|
|
Packit |
575503 |
hello, world
|
|
Packit |
575503 |
[c:\tmp]> :: DJGPP compile of awk permits Unix quoting in CMD
|
|
Packit |
575503 |
[c:\tmp]> djgawk 'BEGIN{ print "hello, world" }'
|
|
Packit |
575503 |
hello, world
|
|
Packit |
575503 |
|
|
Packit |
575503 |
Syntactic sugar? Sure. But it makes life easier in a Windows
|
|
Packit |
575503 |
environment, and without installing Cygwin ...
|
|
Packit |
575503 |
|
|
Packit |
575503 |
Eric P.
|