[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sharing files
From: |
Aad Rijnberg |
Subject: |
Sharing files |
Date: |
31 Aug 2002 21:32:25 +0200 |
Hello,
I want to use a modular approach for settting up a CVS-repository. Unfortunately, I can not get it to work as I want. I have read both the Cederqvist and the Fogel document, but the 'modules' file (which I think must be used for file sharing) is not very extensively explored in both documents.
Can somebody help me to get on the right track?
Suppose a program (prog) that uses 2 modules (mod_1 and mod_2), and one of the modules (mod_2) uses the other (mod_1). Furthermore, for each module I want to check in its own source and header file(s), the resulting library archive (*.a), and the resulting shared object file (*.so).
The .h, .a and .so files are shared to the modules and/or programs that make use of this module.
The working directories (is the correct term 'sandboxes'?) for each module/program would look like:
mod_1
|-- . -> mod_1.[ch]
|--lib -> mod_1.a \_ resulting from compilation of Module 1
\--bin -> mod_1.so /
mod_2
|-- . -> mod_2.[ch]
|--inc -> mod_1.h
|--lib -> mod_1.a mod_2.a \_ mod_2.* resulting from compilation of Module 2
\--bin -> mod_1.so mod_2.so /
prog
|-- . -> prog.c
|--inc -> mod_1.h mod_2.h
|--lib -> mod_1.a mod_2.a
\--bin -> mod_1.so mod_2.so prog (executable) >- prog resulting from compilation of Program
>From this it can be seen that mod_1.h, mod_1.a, mod_1.so are needed by both mod_2 and prog.
And mod_2.h, mod_2.a, mod_2.so are only needed by prog.
It is not desired that (copies of) these files are placed in the repository in every module that needs them, and therefore I have been looking for a method to share them.
For the sharing mechanism I tried to use the 'modules' file. The CVS-repository-tree would look like:
CVSROOT
|--Project
| |--mod_1
| | |--src -> mod_1.[ch] + mod_1-internal [ch]-files
| | |--lib -> mod_1.a
| | \--bin -> mod_1.so
| |--mod_2
| | |--src -> mod_2.[ch] + mod_2-internal [ch]-files
| | |--lib -> mod_2.a
| | \--bin -> mod_2.so
| |--prog
| | |--src -> prog.c
| | \--bin -> prog (executable)
and the 'modules' file I used was:
mod_1_src -d mod_1 Project/mod_1/src
mod_1_h -d inc Project/mod_1/src mod_1.h
mod_1_a -d lib Project/mod_1/lib mod_1.a
mod_1_so -d bin Project/mod_1/bin mod_1.so
mod_1 -d mod_1 &mod_1_src \
&mod_1_a \
&mod_1_so
mod_2_src -d mod_2 Project/mod_2/src
mod_2_h -d inc Project/mod_2/src mod_2.h
mod_2_a -d lib Project/mod_2/lib mod_2.a
mod_2_so -d bin Project/mod_2/bin mod_2.so
mod_2 -d mod_2 &mod_2_src \
&mod_1_h \
&mod_1_a \
&mod_1_so \
&mod_2_a \
&mod_2_so
prog_src -d prog Project/prog/src
prog_exe -d bin Project/prog/bin prog
prog -d prog &prog_src \
&mod_1_h \
&mod_2_h \
&mod_1_a \
&mod_2_a \
&mod_1_so \
&mod_2_so \
&prog_exe
The -d option lets you redefine the directory where to put the files/directories following the -d option, so I thought that the above mentioned modules file should work. However, when checking out mod_2 I get the following error message:
cvs checkout: existing repository /usr/local/cvsroot/Project/mod_1/src
does not match /usr/local/cvsroot/Project/mod_2/src
cvs checkout: ignoring module mod_2_h
Is this because I make a mistake (misinterpret the meaning of the -d option), or is it a bug in CVS? Probably the former...
Any help is appreciated.
Aad Rijnberg
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Sharing files,
Aad Rijnberg <=