[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: One file in several modules?
From: |
David Dunbar |
Subject: |
Re: One file in several modules? |
Date: |
Fri, 20 Apr 2001 18:09:20 -0500 |
address@hidden wrote:
> From: Keith Hearn <address@hidden>
> To: "Info-Cvs List (E-mail)" <address@hidden>
> Subject: One file in several modules?
> Date: Fri, 20 Apr 2001 15:01:23 -0700
>
> The project for which I'm the release engineer has code broken into several
> CVS modules, based on functionality. This works fine, but there is one
> difficulty. Each module contains a Makefile.include file which contains
> various rule & variable definitions that are used by most of the other
> Makefiles.
>
> We want to keep each module self-contained so you can just check it out and
> work on it without having to check out other modules as well. But I also
> want to keep the Makefile.include files in synch.
>
> Currently, we have a separate copy in each module, and if I want to make a
> change I have to make the change in every copy (in 25+ modules). Needless to
> say, this is more work than I'd like for it to be.
>
> Is there any way to have one file be in several modules? Or is there a
> better way to handle this issue?
>
Your way is asking for trouble.
Our system has ~150 modules and ~20 libraries. The CVS directory tree
looks something like this:
cvsroot/
CVSROOT/
src/
Makefile
admin/
Makefile
Makefile.include
dir1/
Makefile
codea.c
...
lib1/
Makefile
lib11/
Makefile
codeb.c
...
modules/
Makefile
module1/
Makefile
codec.c
...
The Makefile at each level triggers the Makefiles in the lower levels.
The Makefile in the admin directory also copies the Makefile.include to
a location where all other files expect to find it. i.e. the other
Makefiles start with
include /path_to/Makefile.include
This way the number of modules can grow essentially indefinitely.
David
--
David M. Dunbar <address@hidden>
Always drink upstream from the herd,
especially if you suspect mad cow disease.