Make sure all your developers have the CVSROOT environment variable set to the directory that is to hold your main file repository (mine is set to /usr/src/master). The following commands can be placed in a .cshrc or .profile files.
setenv CVSROOT /src/master
for tcsh/csh users, and
CVSROOT=/src/master; export CVSROOT
for bash/sh users.
Run the cvsinit script that comes with CVS to initialize the repository tree.
Encourage all your developers to make a working directory where they will be working on the files (mine is ~/src/work).
Edit the modules file to add the local modules. You can either do this by cd'ing to ${CVSROOT}/CVSROOT and saying co -l modules and then editing modules, or, better, cd to your working directory and do a cvs co modules (co is an alias for checkout).
Next add your modules to the file. I added the following lines to my file:
# libraries
lib antaire/lib
db antaire/lib/db dt antaire/lib/dt inc antaire/lib/inc lwp antaire/lib/lwp malloc antaire/lib/malloc inter antaire/lib/inter prt antaire/lib/inter/prt
The above entries now allow me to cvs co malloc to create a directory malloc where I am and check out the files from ${CVSROOT}/antaire/lib/malloc into that directory.
cvs co lib will check out all my libraries and make a whole tree under lib: lib/db/*, lib/dt/*, lib/inc/*, etc.
Next, create a cvsignore file in ${CVSROOT}/CVSROOT. This file contains the local files that you want CVS to ignore. If you have standard temporary files, or log files, etc. that you would never want CVS to notice then you need to create this file.
The first time you should go into the CVSROOT directory, edit the file and ci -u cvsignore to check it in.
You should apply the mkmodules.patch then recompile and install the mkmodules file See section A patch for mkmodules to make it know about cvsignore. Finally add the following line to your modules file (see above) so you can use CVS to edit the file in the future.
cvsignore -i mkmodules CVSROOT cvsignore
I have in my file:
*.t
*.zip
MAKE.LOG
Makefile.dep
a.out
logfile
...
CVS ignores a number of common temp files (*~, #*, RCS, SCCS, etc..) automatically. (see the manual entry for cvs(5)).
warning: CVS is good at this. Any files in the cvsignore file will be ignored completely without a single warning.
Now, add your files into their respective module directories:
cd into your current directory which holds the files. Build clean/clobber and make sure that only the files you want to be checked into the repository are in the current directory. Execute:
The repository should be a path under ${CVSROOT}. My malloc library is checked into antaire/lib/malloc.
vendortag is a release tag that the vendor assigned to the files. If you are the vendor then put whatever you want there: (PRT_INITIAL, MALLOC_1_01, etc);
Releasetag is your local tag for this copy of the files. (PRT_1, malloc_1_01, etc);