Add a new project

From VrlWiki
Jump to navigation Jump to search

Write and Build Project Code

Projects can be added to CVS under either the common/ directory (shared code) or the project/ directory (project specific code). Your code should be in a subdirectory of these in your sandbox. The following command examples are for Linux.

> mkdir -p  /map/gfx0/users/$USER/project/<my_project>


Each directory in your project will need it's own Makefile. If your project has several directories it is a convention to create a top level Makefile to build all of them. The G Build system is invoked from your make files to provide a common simple build mechanism. Sample make files and instructions on how to use the G Build system are here:


If you want to inspect the build files they are in:
common/build/make

These examples show how to Build a Trivial Program and Build a Trivial Library.

You should also include some simple tests. See Create and automate software tests for details.


Check In the Project

Once you are ready you can check in your project. You will probably have files in your directory that do not belong in CVS. Only the source code, make files, and files essential for building and running the project should be checked in.

Some essential CVS commands for checking new code into the repository are:

> cvs add    -m "<comment>" <directory>     # Create a new directory.
> cvs add    -m "<comment>" <file>  ...     # Add new files.
> cvs commit -m "<comment>" <file>  ...


The repository is primarily for source code, but in some cases binary files need to be checked in. These should be reasonably small. Large datasets are stored in /map/gfx0/data/ directory.

> cvs add -kb  -m "<comment>" <file>  ...   # Add new binary files.
> cvs commit   -m "<comment>" <file>  ...