21.07.2015 Views

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix B: Installing gawk 275B.3.1.5 Using gawk In The Cygwin Environmentgawk can be used “out of the box” under Windows if you are using the Cygwin environment.This environment provides an excellent simulation of Unix, using the GNU tools, such asbash, the GNU Compiler Collection (GCC), GNU Make, and other GNU tools. Compilationand installation for Cygwin is the same as for a Unix system:tar -xvpzf gawk-3.1.8.tar.gzcd gawk-3.1.8./configuremakeWhen compared to GNU/Linux on the same system, the ‘configure’ step on Cygwintakes considerably longer. However, it does finish, and then the ‘make’ proceeds as usual.NOTE: The ‘|&’ operator and TCP/IP networking (see Section 10.3 [Usinggawk for Network <strong>Programming</strong>], page 172) are fully supported in the Cygwinenvironment. This is not true for any other environment for MS-DOS or MS-Windows.B.3.1.6 Using gawk In The MSYS EnvironmentIn the MSYS environment under Windows, gawk automatically uses binary mode for readingand writing files. Thus there is no need to use the BINMODE variable.This can cause problems with other Unix-like components that have been ported toWindows that expect gawk to do automatic translation of "\r\n", since it won’t. CaveatEmptor!B.3.2 How to Compile and Install gawk on VMSThis subsection describes how to compile and install gawk under VMS.B.3.2.1 Compiling gawk on VMSTo compile gawk under VMS, there is a DCL command procedure that issues all the necessaryCC and LINK commands. There is also a ‘Makefile’ for use with the MMS utility. From thesource directory, use either:or:$ @[.VMS]VMSBUILD.COM$ MMS/DESCRIPTION=[.VMS]DESCRIP.MMS <strong>G<strong>AWK</strong></strong>Depending upon which C compiler you are using, follow one of the sets of instructionsin this table:VAX C V3.xUse either ‘vmsbuild.com’ or ‘descrip.mms’ as is. These useCC/OPTIMIZE=NOLINE, which is essential for Version 3.0.VAX C V2.xYou must have Version 2.3 or 2.4; older ones won’t work. Edit either‘vmsbuild.com’ or ‘descrip.mms’ according to the comments in them. For‘vmsbuild.com’, this just entails removing two ‘!’ delimiters. Also edit‘config.h’ (which is a copy of file ‘[.config]vms-conf.h’) and comment out

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!