1/*	$OpenBSD: README,v 1.7 2011/09/28 19:27:18 millert Exp $	*/
2/****************************************************************
3Copyright (C) Lucent Technologies 1997
4All Rights Reserved
5
6Permission to use, copy, modify, and distribute this software and
7its documentation for any purpose and without fee is hereby
8granted, provided that the above copyright notice appear in all
9copies and that both that the copyright notice and this
10permission notice and warranty disclaimer appear in supporting
11documentation, and that the name Lucent Technologies or any of
12its entities not be used in advertising or publicity pertaining
13to distribution of the software without specific, written prior
14permission.
15
16LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
18IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
19SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
21IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
22ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
23THIS SOFTWARE.
24****************************************************************/
25
26This is the version of awk described in "The AWK Programming Language",
27by Al Aho, Brian Kernighan, and Peter Weinberger
28(Addison-Wesley, 1988, ISBN 0-201-07981-X).
29
30Changes, mostly bug fixes and occasional enhancements, are listed
31in FIXES.  If you distribute this code further, please please please
32distribute FIXES with it.  If you find errors, please report them
33to bwk@cs.princeton.edu.  Thanks.
34
35The program itself is created by
36	make
37which should produce a sequence of messages roughly like this:
38
39	yacc -d awkgram.y
40
41conflicts: 43 shift/reduce, 85 reduce/reduce
42	mv y.tab.c ytab.c
43	mv y.tab.h ytab.h
44	cc -c ytab.c
45	cc -c b.c
46	cc -c main.c
47	cc -c parse.c
48	cc maketab.c -o maketab
49	./maketab >proctab.c
50	cc -c proctab.c
51	cc -c tran.c
52	cc -c lib.c
53	cc -c run.c
54	cc -c lex.c
55	cc ytab.o b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o -lm
56
57This produces an executable a.out; you will eventually want to
58move this to some place like /usr/bin/awk.
59
60If your system does not have yacc or bison (the GNU
61equivalent), you must compile the pieces manually.  We have
62included yacc output in ytab.c and ytab.h, and backup copies in
63case you overwrite them.  We have also included a copy of
64proctab.c so you do not need to run maketab.
65
66NOTE: This version uses ANSI C, as you should also.  We have
67compiled this without any changes using gcc -Wall and/or local C
68compilers on a variety of systems, but new systems or compilers
69may raise some new complaint; reports of difficulties are
70welcome.
71
72This also compiles with Visual C++ on all flavors of Windows,
73*if* you provide versions of popen and pclose.  The file
74missing95.c contains versions that can be used to get started
75with, though the underlying support has mysterious properties,
76the symptom of which can be truncated pipe output.  Beware.  The
77file makefile.win gives hints on how to proceed; if you run
78vcvars32.bat, it will set up necessary paths and parameters so
79you can subsequently run nmake -f makefile.win.  Beware also that
80when running on Windows under command.com, various quoting
81conventions are different from Unix systems: single quotes won't
82work around arguments, and various characters like % are
83interpreted within double quotes.
84
85This compiles without change on Macintosh OS X using gcc and
86the standard developer tools.
87
88This is also said to compile on Macintosh OS 9 systems, using the
89file "buildmac" provided by Dan Allen (danallen@microsoft.com),
90to whom many thanks.
91
92The version of malloc that comes with some systems is sometimes
93astonishly slow.  If awk seems slow, you might try fixing that.
94More generally, turning on optimization can significantly improve
95awk's speed, perhaps by 1/3 for highest levels.
96