next up previous
Next: Compiling Up: Hartebeesthoek 26m New Computer Previous: Editing

Source Code Organisation

Source code management refers to the standard procedure of organising source code files into different subdirectories according to type and purpose.

Code is normally organised into packets or units referred to as a project or a package. Once a project or package is identified it is given a software code name e.g. the control software for the NCCS can be grouped together under the code name nccs, another example is the plotting package from Caltech code named pgplot.

Every project must have it own directory structure and the same root directory. In this document we will refer to this as the ~project directory.

Source code should be organised in identical subdirectory tree structures with respect to the root directory. This facilitates the task of program developers and installers. A proposed subdirectory tree structure is :

                            ~project
                                |
                                |
  -----------------------------------------------------------
  |        |       |       |        |            |          |
  |        |       |       |        |            |          |
README    bin     doc   include    lib          src     subproject    
           |               |        |            |          |
           |               |        |            |          |
         --------         RCS   --------        RCS   -------------
         |      |               |      |              | | | | | | |
         |      |               |      |
       linux   sun4           linux   sun4

Where the different subdirectories refer to the following :

The project root directory should be stored on file server accessible by all member of the project. In the case of HartRAO this could be bootes:/usr/local/project. Alternatively for a very big project it might be worthwhile creating a dedicated project directory in the /home area e.g. for the NCCS project a root directory /home/nccs coould be created on bootes.

All members of a project must belong to a common group. For a medium to large project a special group should be created for the project (usually with the same name as the project). The root directory and all subdirectories must have read, write and execute permission for all members of the project group. Files must have read permission for the group.


next up previous
Next: Compiling Up: Hartebeesthoek 26m New Computer Previous: Editing
Mike Gaylard
1999-06-14