Back to HOWTOs
Adding ns-2 to a CVS Repository
Background
The goal is to place an ns-2 source tree
(not executables, object files, etc.)
into a CVS repository. By excluding the non-source files, the branch
only uses about 28 MB of space in the repository.
This assumes TCL, Perl, and all other programs included in the ns
all-in-one distributions is already installed on the machine on
which the ns-2 source tree will be checked out.
Related Pages
HOWTO
- Setting Up the Repository
- Download an ns-2
source tree.
- We assume the source files are unzipped into the directory:
~/ns-src/
- Remove the tcl validation test files from the source tree (these
take up a lot of space and are not used outside of validating the
code):
cd ~/ns-src/tcl/;
rm -rf test;
- Import the remaining source files into the repository:
cd ~/ns-src/;
cvs import ns_proj ns_manufacturer initial;
- Checking Out and Compiling ns-2
- Checkout the source tree on your local machine (this may take a few
minutes with a high speed connection):
cvs co ns_proj
- Now, run the configure script and specify the location of you otcl
and tclcl installations (assume they are in /usr/local/):
cd ns_proj;
./configure --with-otcl=/usr/local/otcl-1.0a8 --with-tclcl=/usr/local/tclcl-1.0b12;
- If successful, a Makefile was generated, specific to your local
machine. Run make to compile ns-2:
make
- Now, when CVS commit is done, only files from the original source
tree, not executables and object files, will be updated in the
repository. If you delete the ns_proj directory
(either with rm or
the -d switch for the cvs release command),
you will have to
repeat Step 2 when checking the project out again. Otherwise, you
should be able to check the ns source distribution out without doing
the configure command again.
- Before importing the source tree, you may want to delete files
local to your machine. Specifically, the files created by
configure
(e.g., a few Makefile's) and the files in the gen/
directory since these are specific to your machine.