Next: Updating checked out code
Up: The PSI3Source Code
Previous: Checking in altered PSI3
  Contents
Adding entirely new code to the main PSI3 repository
If the programmer is adding a new executable module or library to the
PSI3 repository, a number of important conventions should be followed:
- The directory containing the new code should be given a name
which matches the name of the installed code (e.g. if the code
will be installed as newcode, the directory containing
the code should be named newcode). New executable modules
must be placed in $PSI3/src/bin and libraries in
$PSI3/src/lib of the user's working copy.
- The Makefile should be converted to an input file for the configure
script (Makefile.in -- see any of the current PSI3 binaries
for an example) and should follow the conventions set up in all of the
current PSI3 Makefiles. This includes use of MakeVars
and MakeRules.
- New binaries should be added to the list contained in
$PSI3/src/bin/Makefile.in so that they will be compiled
automatically when a full compilation of the PSI3 distribution
occurs. This step is included in the sequence below.
- A documentation page should be included with the new code (see
section 8 for more information). As a general rule,
if the code is not ready to have a documentation page, it is not ready
to be installed in PSI3.
- The configure.in file must be altered so that users may check
out copies of the new code and so that the configure script will
know to create the Makefile for the new code. These steps are included in
the sequence below.
Assume the new code is an executable module and is named
great_code. The directory containing the new code must contain
only those files which are to be checked in to the repository! Then the
following steps will check in a new piece of code to the main repository:
- cd $PSI3/src/bin
- cvs add great_code
- Answer ``y'' when CVS asks if you wish to create the new directory in
the repository.
- cd great_code
- cvs add *
- cvs ci
- Edit the comments file that CVS provides.
- cd $PSI3
- Edit configure.in and add great_code to the list.
- cvs ci
- Edit the comments file that CVS provides.
- autoconf
- cd $PSI3/src/bin
- Edit Makefile.in and add great_code to the list.
- cvs ci
- Edit the comments file that CVS provides.
At this point, all of the code has been properly checked in. However, you must
test to make sure that the code can be checked out by other programmers, and
that it will compile correctly. The following steps
will store your personal version of the code, check out the new code, and
test-compile it:
- cd $PSI3/src/bin
- mv great_code great_code.bak
- cd $PSI3/..
- cvs co $PSI3/src/bin/great_code
- cd $objdir
- $PSI3/configure -prefix=$prefix -verbose
- cd src/bin/great_code
- make install
(Note that $prefix and $objdir to the installation and compilation
directories defined in the PSI3 installation instructions.)
Your original version of the code remains under great_code.bak,
but should be no longer necessary if the above steps work. Note that it is
necessary to re-run configure explicitly, instead of just running
config.status, because the latter contains no information about
the new code.
Next: Updating checked out code
Up: The PSI3Source Code
Previous: Checking in altered PSI3
  Contents
psi
2003-01-07