[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How to define a shared submodule?

From: Arthur Barrett
Subject: RE: How to define a shared submodule?
Date: Tue, 3 Jun 2008 05:56:30 +1000

> I have a bit of a dilemma. I'm working on two completely separate
> projects for two different platforms (one is cross-compiled). They are
> also relatively large projects with many sub-directories. The problem
> is, they need to share some common code. The common code is self
> contained in it's own directory.
> Right now I've manually copied the sub-directory of the common code
> from one project to the other on my local machine. This is a hack
> solution filled with pitfalls. For one, updating the project that has
> the copied sub-directory doesn't update that sub-directory. I have to
> remember to manually update the sub-directory as well. This is error
> prone. If I forget to manually update the sub-dir. my code will be out
> of sync. Another problem, someone can't simply check-out the project
> that has the copied sub-directory and build it. They need to know that
> there is a directory from another project they need to copy over.
> Has anyone come accross this problem before, and if so did you find a
> reasonable solution? Is there any way to define an alias that contains
> a module, and have that module buried several levels deep in the
> project directory?

There are many ways to resolve this but it depends on the version of CVS
and your operating environment (linux/mac/windows/as400 etc).

With CVSNT I'd use modules2 (but if you are using CVSNT you'd be asking
on the CVSNT newsgroup wouldn't you?).

With CVSNT (and I'd assume this *should* work on CVS) you can also
simply checkout the second project below the first, ie:
cvs -d :pserver:host:/repo co projecta
cd projecta
cvs -d :pserver:host:/repo co shared

An 'update' issued in 'projecta' will update both 'projecta' and


Arthur Barrett

reply via email to

[Prev in Thread] Current Thread [Next in Thread]