The Lattice Amiga Compiler Companion 
------------------------------------

Version 1.00

Installation
------------
The installation file, loadCC, has been generalized to allow for installation
of the Compiler Companion on a hard disk system.  To execute it, "cd" to the 
drive holding the CC disk, and invoke the following command:

                          execute loadCC

This will copy all the executables over to your Command Directory except lmk
which will go to SYS:system, grep.lib will go to the LIB: directory and
pat.h will go to the INCLUDE: directory.
    
Files on the distribution disk
------------------------------

	grep             /* executables */
	diff 
	wc 
	extract 
	build 
	splat 
	files 
        lmk
	touch
	cxref

	wc.c 		/* wc source */
	touch.doc 	/* documentation for touch */
  
	grep.lib 	/* grep library and associated demos */
	grepdemo 	/* executable for grepdemo */
	grepdemo.c 	/* source for grepdemo */
        grepdemo.doc    /* documentation for grep */
	pat.h 		/* header for grepdemo */
  
	lmk.info 	/* icon for running lmk under Workbench */
	lmk.def 	/* default rules configured for Lattice C */
	demo.c 		/* demo source file */
	lmkfile  	/* demo lmk file */
	files.lmk	/* sample .lmk file */
	grep.lmk 	/* sample .lmk file */

	read.me 	/* this file */
	loadCC	 	/* installation file */
	"on CC"		/* clickable version of read.me */
	"on CC.info"	/* icon for read.me file */


Running the grep demo
---------------------
The library, grep.lib, contains some useful pattern matching functions
which can be called from a C program.  To demonstrate the usage of these 
library functions, the sample file grepdemo.c has been provided.
Instructions for compiling and linking the file are included in the comment 
header of grepdemo.c.  The resultant executable (built with Lattice C) is 
also included on the disk.


Running lmk under Workbench
---------------------------
Lmk can be invoked from Workbench, rather than CLI, in the usual
manner of activating Workbench icons, which is to double click
the icon with the left mouse button.  Invoking lmk in this manner
has the same effect as invoking lmk from CLI without any parameter,

	lmk

Remember that lmk will assume that the file "lmkfile", or "lmkfile.lmk"
or "makefile" is present in the current directory when running from CLI. If
Lmk is invoked from Workbench, it will first try to locate LMK_files to be
used as the "current directory". If LMK_files is not found, the current 
directory will be used. If none of the default lmk files are present in the
active directory, lmk will terminate.  

When lmk terminates from a Workbench invocation, it will place a requester
on the screen and wait for the user to click on the "EXIT" box before it
quits.


Running the lmk demo
--------------------
A demonstration file has been provided on disk, "lmkfile".  To run the
demo, invoke the following command from lmk:

	lmk 

which will compile and link the file demo.c to produce the executable
"demo".  The demo can be executed by the command

	demo

which should display a visually intriguing copyright message.


If you wish to run the lmk demo from Workbench use the following procedure:

1. Put the files demo.c and lmkfile in your working directory, i.e. RAM:.
2. Use the ASSIGN coomand to set LMK_files to your working directory, i.e.

   ASSIGN LMK_files: RAM:

3. Click twice on the LMK icon.
4. In a CLI, type demo. You may need to include a path, i.e.

   RAM:demo


NOTE: For LMK to function properly, the files ASSIGN, RUN, NEWCLI, and
      ENDCLI should be in the C: directory.
      
Using lmk with Lattice C
------------------------
The following logical name assignments are used in the examples in the manual:

	assign LC: Lattice_C:c
	assign LINK: Lattice_C:c
	assign INCLUDE: Lattice_C:include
	assign LIB: Lattice_C:lib
	assign ASSEM: Assem1.0:c

If you are using the Lattice C development system, these assignments will
probably already be in your startup-sequence.  They are needed so the 
utilities (such as the compiler) know where to find their associated files.


AmigaDOS Specifics
------------------
Note that all of the utilities (except lmk) are designed to work under
the CLI (Command Line Interface) of AmigaDOS.  They will not run under
Workbench, hence there are no associted icons with any of the utilities.
All of the utilites are heavily dependent on the command line parameters
passed to them (there is no simple way of obtaining them under Workbench).

If you are accustomed to using the Text Management Utilities on another
system (the IBM PC or a compatible), there are subtle changes in the
way this package works under AmigaDOS that you should make note of.

The command-line interface to the operating system is somewhat different
on the Amiga under AmigaDOS than the PC running MS-DOS.  In particular,
file name wildcards are completely different.  While a '?' is matched
by any single character, a '#?' matches zero or more characters.  The
'#' character preceding either a single character or a parenthesized
(grouped) expression implies zero or more of the following.  Also, either
of the characters '#' or '?' may be used within a file name as a literal;
it should be escaped by a single quote '.  Note that embedded blanks are
also allowed within file names, they should always be referenced within
double quotes from the command-line.

See the AmigaDOS User's Manual, the entry under the LIST command, for a
more complete discussion.  The only features not yet implemented in 
handling file name patterns, Amiga-style, are the '|' character for or-ing
two expressions, and the '%' character (which matches the null string),
which is only meaningful in conjunction with '|' usage.

It should be noted that the usage of directory paths under AmigaDOS
differs somewhat from usage under MS-DOS.  Specifically, the root of
your file directory structure is referred to as ':', and directory
separators are a forward slash '/'.  AmigaDOS preserves the case in
which files are created, but does not distinguish between upper and
lower case.  For example, two files such as grep.h and Grep.h are
equivalent to AmigaDOS, and are not allowed in the same directory.

Assign logicals are recognized by all of the utilities as target 
directories.  

Special notes
-------------
It is important to remember to set the date and time when re-booting, so
that the date-dependent options of the files utility (-newer, -older,
-days) work properly.

Note that Lattice "files" is more powerful than the LIST command of 
AmigaDOS, as LIST does not recognize alternate drive-specifications as 
targets.  Files does. Also, files can handle more than one target directory 
specification.

The sample lmk files "files.lmk" and "grep.lmk" have been provided
on disk.  They are samples only, and will not work, as the source
files they expect to be present are not.  They should help you
in creating your own lmk files.

The file "lmk.def", if resident in the current directory, will force
lmk to use the .DEFAULT rule when it cannot find a dependency file.  If
this is not desired (i.e. and you want lmk to tell you when it cannot
find a file), then be sure that lmk.def does not reside in your current
directory (or else rename it).


**********End of READ.ME****************


