21.07.2015 Views

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

GAWK: Effective AWK Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

268 <strong>G<strong>AWK</strong></strong>: <strong>Effective</strong> <strong>AWK</strong> <strong>Programming</strong>‘unsupported/atari/*’Files needed for building gawk on an Atari ST (see Section B.4.1 [Installinggawk on the Atari ST], page 277, for details).‘unsupported/tandem/*’Files needed for building gawk on a Tandem (see Section B.4.3 [Installing gawkon a Tandem], page 279, for details).‘posix/*’‘pc/*’‘vms/*’‘test/*’Files needed for building gawk on POSIX-compliant systems.Files needed for building gawk under MS-DOS, MS Windows and OS/2 (seeSection B.3.1 [Installation on PC Operating Systems], page 270, for details).Files needed for building gawk under VMS (see Section B.3.2 [How to Compileand Install gawk on VMS], page 275, for details).A test suite for gawk. You can use ‘make check’ from the top-level gawk directoryto run your version of gawk against the test suite. If gawk successfullypasses ‘make check’, then you can be confident of a successful port.B.2 Compiling and Installing gawk on UnixUsually, you can compile and install gawk by typing only two commands. However, if youuse an unusual system, you may need to configure gawk for your system yourself.B.2.1 Compiling gawk for UnixAfter you have extracted the gawk distribution, cd to ‘gawk-3.1.8’. Like most GNU software,gawk is configured automatically for your Unix system by running the configureprogram. This program is a Bourne shell script that is generated automatically using GNUautoconf. (The autoconf software is described fully in Autoconf—Generating AutomaticConfiguration Scripts, which is available from the Free Software Foundation.)To configure gawk, simply run configure:sh ./configureThis produces a ‘Makefile’ and ‘config.h’ tailored to your system. The ‘config.h’file describes various facts about your system. You might want to edit the ‘Makefile’ tochange the CFLAGS variable, which controls the command-line options that are passed tothe C compiler (such as optimization levels or compiling for debugging).Alternatively, you can add your own values for most make variables on the commandline, such as CC and CFLAGS, when running configure:CC=cc CFLAGS=-g sh ./configureSee the file ‘INSTALL’ in the gawk distribution for all the details.After you have run configure and possibly edited the ‘Makefile’, type:makeShortly thereafter, you should have an executable version of gawk. That’s all there is to it!To verify that gawk is working properly, run ‘make check’. All of the tests should succeed. Ifthese steps do not work, or if any of the tests fail, check the files in the ‘README_d’ directoryto see if you’ve found a known problem. If the failure is not described there, please send ina bug report (see Section B.5 [Reporting Problems and Bugs], page 280.)

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

Saved successfully!

Ooh no, something went wrong!