Begin
File:           mklib.tgz
Description:    A small set of utilities for painlessly maintaining C libraries
Keywords:       mklib library libraries
Version:        1.0 for QNX 4.x
Entered Date:   97-03-14
Author:         Jeff Page of Qenesis Inc.
Ported By:
Original Site:
Copying Policy: See below
Supplimental:

MKLIB 1.0

This collection of utilities make maintaining a libraries of C functions quite
painless.

The general problem is that makefiles are difficult to maintain for this
purpose, since each source file needs to be compiled once for each memory
model.


INSTALL THE UTILITIES
Restore the archive: gzip -cd mklib.tgz | pax -rv
This will create a sub-directory mklib, in your current directory.
Move the utilities mklib and eo to somewhere in your $PATH.

SET UP A SOURCE DIRECTORY FOR YOUR LIBRARY FILES
Create a sub-directory for the source files for your libraries.  Copy Makefile
and Updated there.  Edit the script Updated, to add the root name of your
library to variable LIBROOT, near the top of the file.

RUN MKLIB
Edit some .c files.  More than one function may be included in each one if
desired.  Type make.  If all goes well, the libraries will be created and
copied to /usr/lib.  By default, the warning level is full and any warnings will
abort.  Fix the problems and type make again.  You can modify the parameters
passed to CC by editing the script Updated and modifying the variable OPTIMIZE
near the top of the file.

LICENSE POLICY
You may use or copy this software for personal or commercial use without charge,
but you may not resell it for profit.  This readme must be included in any
copies you distribute.  I retain all rights and title to this software and
permit its use without any warranty whatsoever.  By using it, you agree to waive
any right of claim against me.


HOW IT WORKS
The mklib utility creates a list of files, containing all the .c files which
are newer than the previous list.  It then runs the script Updated.
The parameter -u can be added to force every .c to be compiled.
The -v parameter will list the timestamps of each file, if desired.

The Updated script is repetitive, for each memory model.  If there are memory
models you will never use, you can comment out or delete out those lines.  The
script uses the eo utiltity to compile each .c file in the list.  CC options
you want can be added to the variable OPTIMIZE at the top of the script.  The
.o files are then updated or added to the library as needed.  This is repeated
for each  memory model.  At the end, the new libraries are copied to /usr/lib.
If there are any errors, the script aborts.

The eo utility use by Updated, runs a command once for each line in a file.  If
an error occurs, it will abort.  The parameter -v will display each command
before it is executed.  To test, but not execute, use the -t parameter.  If you
want to continue with the remaining lines of the list file, in spite of errors,
use the -e parameter.  The last parameter, enclosed in quotations is the command
to be executed.  The character '@' will be replaced with the contents of the
line from the list file and may occur more than once in the command.  The
character '@' may be escaped \@ for a literal @ character.

The provided Makefile merely causes mklib to be run when you type "make".

End
