/*	@(#)README	2.1		*/
Lint consists of two programs:  lint1 and lint2.  Lint1 is based on the
machine independent front-end of PCC.  Lint1 processes each input file 
separately producing binary information about external symbols.  This
information, along with information from lint libraries, is collected
in a temporary file and processed by lint2.

MAKING LINT
Making lint means creating lint1, lint2, llib-lc.ln and llib-port.ln.
Lint-specific source files are in the same directory as this README file.
They are:
	lerror.c
	lerror2.c
	lint.c
	llib-lc
	llib-port
	lmanifest
	lpass2.c
	macdefs
	msgbuf.c
	msgbuf2.c
The machine independent files currently reside in /usr/src/cmd/lint/mip
[someday they should be placed in a common library to be shared with PCC].
They are:
	cgram.y
	comm1.c
	common
	manifest
	messages.c
	mfile1
	optim.c
	pftn.c
	scan.c
	trees.c
	xdefs.c

INSTALLING/RUNNING LINT
Lint is invoked via a shell script, lint.sh.  lint.sh is installed
as /usr/bin/lint.  In the shell script, the variable L (set to
/usr/lib ) is used to find lint1 and lint2 (e.g. $L/lint1 ).  The
variable LL (also set to /usr/lib) is used to find the lint libraries
llib-lc.ln and llib-port.ln.  The variables T and H are set to lint's
temporary files; these files are used by both passes of lint (temp files
used in only one pass are not set up by the shell script).

LINT LIBRARIES
Lint provides for the use of additional libraries with the -lname option.
The string "-lname.ln" is appended to the string "llib" to create the library
name.  As distributed, the system uses llib-lc.ln by default; the -p parameter
causes llib-port.ln to be used instead.  In order to add new lint libraries,
look at the source versions of the distributed lint libraries (llib-lc and
llib-port) to determine the structure of lint libraries, and look at
Makefile to learn about creating and installing libraries.
In this version of lint, the installed libraries are in a preprocessed
format, so this preprocessing does not have to be done each time lint is run
(as had happened in the pervious versions of lint).
The source (unpreprocessed) versions of the libraries are also kept in the
same directory as the preprocessed versions so that users can examine the
library if necessary.  This means that changing the source code is not
sufficient to change the actual library lint uses;  see Makefile to determine
installation procedures.

A LINT OVERVIEW
Lint is composed basically of two passes, lint1 and lint2.
These passes are "held together" by a shell script, which is the
program actually invoked when "lint" is executed.

	THE SHELL SCRIPT 
	files: lint.sh
	action: coordinates the parts of lint
	method: 
		1) process options and feed files, one at a time,
		  thru the C preprocessor and into lint1.
		  Redirect output to a temporary file.
		2) concatenate a lint library onto the temp file
		3) invoke lint2 on the temp file

	THE FIRST PASS (lint1)
	the first pass is logically broken into two parts: the front end
	of the portable C compiler and the lint routines

		THE FRONT END OF THE PORTABLE C COMPILER
		files: all files in the mip subdirectory
		action: parse input and build trees, symbol table, etc.
		method:
			The front end performs machine independent tasks, including
			lexical and syntactic analysis.  It communicates with the
			first pass of lint by subroutine call (the lint1 object module
			contains both the frond end of pcc and the first pass of lint).
			It issues various messages.

		THE LINT ROUTINES
		files: lint.c, lerror.c, msgbuf.c, and header files
		action: manipulate the representations produced by PCC
		method:
			The lint routines, called by the front end of PCC, do
			more thorough checking than the compiler.
			They issues various messages and write out information
			for use in the second pass (actually written to the standard
			output and redirected by the shell script).  Header file
			messages, instead of being issued directly, are written 
			to an intermediate file (passed as a parameter to lint1)
			and are later printed out by lint2.

	THE SECOND PASS (lint2)
	files: lpass2.c, lerror2.c, msgbuf2.c, and header files
	action: perform inter-file checking
	method:
		lint2 first unbuffers the header file messages, then
		takes the output from the previous pass(es) and does
		extensive cross-checking to ensure that pieces
		in different places are used correctly and consistently.
