INSTALLATION INSTRUCTIONS

This file contains the instructions required to install and create the
appropriate version of dmake.


MAKING THE PROPER VERSION

In order to use dmake you must first make the correct version.  As shipped
there exist several versions that you can make:

	bsd43	   - Generic BSD 4.3 (eg, true BSD, apollo, sun OS4, SGI etc)
	bsd43uw	   - Generic BSD 4.3 at U of Waterloo
	bsd43vf	   - Generic BSD with no vfprintf in its library  (use this
		     target if you are missing vfprintf function in your
		     C library)
	sysvr3	   - Generic SysV R3 UNIX
	sysvr1	   - Generic SysV R1 UNIX
	386ix      - 386/ix (SysV R3), not tested
	dynix      - Sequent Symmetry dynix
	ultrix	   - Ultrix 3.0 system
	mips       - Any MIPS box
        tcc        - DOS with tcc 2.0"
        tccswp     - swapping DOS version with tcc 2.0"
        msc        - DOS with MSC 4.0 to 5.1"
        msc60      - DOS with MSC 6.0"
        mscswp     - swapping DOS version with MSC 4.0 to 5.1"
        msc60swp   - swapping DOS version with MSC 6.0"

The file 'makefile' understands these targets and runs the appropriate script
to create the correct version.

The source code is organized as follows:

			dmake 		[source for all common functions]
			  |
			  |
		     -----------
		     |	       |
		    unix     msdos	[source for OS specific functions]
		     |         |
  ----------------------     -------------
  |         |          |     |           |
386ix     bsd43    sysvr3  tccdos     mscdos	[source for OSRELEASE specific
	    |					 functions]
	--------
	|      |
       uw      vf


Each of the directories (eg. bsd43, mscdos, tccdos, and sysvr3) contain source
that is specific to that release of the OS (and possibly C-library)
To make the apropriate versions of dmake, simply type the command

	'make system'

where system is one of the supplied possibilities.  For a complete list
of the versions you can make, see the comments in the file 'makefile', or
type 'make'.

The bootstrapping of dmake is accomplished by running a shell script with the
appropriate compile commands hard coded.

(NOTE:  If you are using MSDOS then, you will actually be using the make.bat
	scriptfile to make the correct version of dmake for MSDOS.  If you
	are running a SHELL other than command.com, you may have to perform
	some extra work to invoke the batch file.
	
	Make sure you read the _readme.dos file before attempting to make the
	MSDOS version, as it contains important configuration and limitation
	information.)

The making of dmake, echoes the commands being executed, and should proceed
relatively error free.  Ignore any warnings that concern unused arguments
to functions, these are normal in some configurations (esp the MSDOS
configuration).


STARTUP FILE

dmake requires the loading of a startup file when it is first invoked.  The
path for the startup file is set in the file 'startup.h' found in the unix
and msdos directories.  You may override the value of the path variable
compiled-in by creating a file at the root source directory called startup.h
and inserting into that file a definition that is like the definition found
in the supplied startup.h files.


INSTALLATION

To install dmake you must copy the executable to where your system
locates executables, and you must place a copy of startup.mk (found in the
directory corresponding to the version you just made) into a location
corresponding to the value of the MAKESTARTUP macro or environment variable.
You are free to customize the contents of startup.mk.

To make dmake again, (using itself), you will have to set three environment
variables.  See the file makefile.mk for their names and their legal values.
Once set you can invoke dmake to make itself.


DOCUMENTATION

All documentation for dmake appears under the man directory.
The file dmake.tf included in this distribution contains the troff
source for the man page.  You must typeset it using the -man macros.
If you cannot typeset it, the file dmake.p is a version that has been
typeset for a normal dumb terminal.  The file dmake.p contains control
characters.  The file dmake.nc is a version of the man page that has
all of the control characters stripped.


CREATING A NEW VERSION

To create yet another version of dmake you should follow the following steps.

The sysvr3 version as sent is the base version, all dmake versions must provide
the equivalent of the functions defined in the sysvr3 directory, and MUST
provide the same semantics (MSDOS archive lib searches are an exception since
we cannot search libraries for timestamps in MSDOS, Actually the MKS version
of dmake does this, I don't have the time to add this code though).

1. Create a new directory for the version you will be making at the level
   that is appropriate.  If it is a new OS then add the dir at the top level,
   if it is a new version of UNIX then add it below the unix directory.

2. Copy the files from the unix and unix/sysvr3 directories to the new dir.
   (Or from any other directory sub-tree that is more appropriate)

3. Not all OS/OSRELEASE combinations are compatible so in order to make
   dmake on each, the particular directory may contain C-source for functions
   present in the SVID SysV R3 distribution which are used by dmake but are
   not supplied by the C-library in the target system.  For example the bsd43
   directory contains source for tempnam.c since it is not provided with
   the BSD C-library.  Before writing a new version of the source file
   check the other directories to see if one already exists.

4. Under some systems the standard include files may be missing or incorrect.
   eg. under BSD stdarg.h and string.h.  If this is the case
   you should create the proper .h file in the proper directory.
   This works as expected as the compile line includes the flag -Idir
   where dir is the configuration dir, (bsd43 for example) and any
   standard include files will be searched for in dir before the compiler
   looks in the normal places (if you have a sane compiler :-).

5. Modify dmake.sh to contain the appropriate C compiler flags and link command
   and to include any specific C files that you have had to add for this
   version of dmake, and run the result through the shell.
   (make the same changes to config.mk so that once you have a working copy of
   dmake you can use it to bring itself up to date)

6. Send me the changes :-) so that I can incorporate them into future
   distributions.

7. This should be all that you require to create a new version of dmake.
   If you have any questions send e-mail to dvadura@watdragon.uwaterloo.ca
