CVS module structure for a multiproject with a main build script

This may sound stupid to CVS gurus, but for me it took years to invent this essentially simple trick.

A common multiproject workspace structure is like this:

If I wanted to use a separate submodule for the main buildfile as well as for the individual subprojects, I didn't find a way to include them directly to the workspace root. Instead I got a subdirectory for them.

Here is the solution: Assume subproject-a has been imported to cvsroot/projecta, subproject-b to cvsroot/projectb and the main buildscript etc to cvsroot/commonfiles. Now, the following module definition

subproject-a -d product-x-workspace/subproject-a projecta
subproject-b -d product-x-workspace/subproject-b projectb
ws-commonfiles -d product-x-workspace commonfiles the_main_buildfile the_main_readme the_main_license
product-x-workspace -d . &subproject-a &subproject-b &ws-commonfiles
will give the wanted workspace structure using command cvs co product-x-workspace.

Originally published on 2005-08-12 at http://www.jroller.com/wipu/entry/cvs_module_structure_for_a under category SCM & process