These are the quick setup instructions -- see doc/postgres-setup.cat
for more detail concerning this release.

Also, note that this distribution comes with a compiled and ready
to run installed system -- so unless your sure you want to recompile
the world, you might want to read the README first.

------

Building this version of POSTGRES requires a new version of make which
is distributed within this package.  By default, this make is installed
as the command "bmake" so that it does not conflict with the normal "make"
on your system.  The default location it is installed is
/usr/local/bin with supporting files in /usr/local/lib.  If you prefer
to have it installed elsewhere you can change it, as long as you 
make sure the target directory is in your shell PATH.  After "bmake" 
is installed and the other setup steps are finished, rebuilding the 
system (whole or in part) is simple and requires little more than 
typing "bmake install" where ever you are.  What follows is a step by 
step list to get this release up and running.


----------------

1)	Cd into the src/ directory and edit the file "Makefile.global".
	By default the PORTNAME is "ultrix4".  Change this to "sparc"
	if you are running on the sparcstation.  Also, if you do not
	want "bmake" installed into /usr/local/bin and /usr/local/lib,
	change the values of TOOLSBINDIR and TOOLSLIBDIR and make sure
	these directories exist.  Also, note it is not possible to move
	the bmake(1) library files after the bmake(1) executable is built
	since the pathname to the lib/ directory is hardcoded into the
	executable.  If you wish to move the library files elsewhere, you
	have to change TOOLSLIBDIR in the source and goto step 2) which
	makes and installs bmake(1).

	At this point you can also change where the postgres executable
	files are installed and where it looks for the database
	directory.

2)	Cd into src/tools/bmake and type

		make -f Makefile.boot

	You may get warning messages during this bootstapping process
	about "illegal combination of pointer and integer" -- just ignore them.
	This should compile and install the "bmake" program and
	its supporting files, including the postgres related
	makefile templates.  If all went well you will now be able
	to use the new make program by typing "bmake", assuming you
	have /usr/local/bin in your shell path.  You may have to
	type "rehash" if you run csh(1), since it's too stupid to
	know new executables have been placed in its path.

3)	Cd back to the src/ directory (i.e. cd ../..) and type

		bmake install

	This builds and installs the entire system.  The Makefiles
	contain directives for running all the underlying Makefiles
	in all the directories, so the whole thing should unfold and
	compile beautifully and install to the target directory.  Should 
	this not be the case, it would be a good idea to save the results 
	of the compile in a file.  If you run csh(1), you could type
		
		bmake install >& mk.log

	and if you run ksh(1) or sh(1), type

		bmake install > mk.log 2>&1

	This will save the results in the file "mk.log" so you
	can inspect it later.  This would be an ideal opportunity to get 
	some donuts and coffee.  

4)	If all went well in step 3, at this point you have successfully
	built an installed the postgres system. Congratulations.  Make 
	sure you add the directory where the postgres executables were installed 
	to your shell PATH variable.  By default it installs into
	/usr/local/postgres/bin.  The last step is to initialize
	the database directory (/usr/local/postgres/data) by typing

		initdb

-----------------------------------------------------------------------

And that's it.  Now you can start up the postmaster by typing
	postmaster &
and try typing "createdb foobar" to make sure postgres can create 
databases for you.  If you have problems with not being allowed to
create databases, then it's time to start reading the user manual
and reference manual...

This outlines the steps necessary to initially build and install postgres.
Now that this is done, if you change a source file and wish to rebuild
and install the system, all you need to do is 

	bmake install

in the corresponding directory and bmake will rebuild and install just
that part of the system.  Be aware that if you make substantive changes
that might change the system database cataloges, then you may have to
recreate your database directory by deleting the existing one and
reinstalling the entire system ("bmake install" in the src/ directory)
and doing "initdb" again.  Also, if you are a postgres developer, you
should make dependencies by running "bmake depend" at the top of the
src/ directory.

