info-cvs
[Top][All Lists]
Advanced

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

Two different platforms sharing common code base: How to do so?


From: Spiro Trikaliotis
Subject: Two different platforms sharing common code base: How to do so?
Date: Mon, 29 Nov 2004 12:30:03 +0100
User-agent: Mutt/1.5.6i

Hello,

I have a question regarding two projects, which do the same for Windows
and/or Linux, and share many files of the common code base.

Unfortunately, the build systems or not compatible: GNU Make with gcc on
the one hand, Microsoft's BUILD-Tool on the other. MS's solution needs
the files to be co-located with the .C-files. To make things worse, GNU
uses a file it calls "Makefile", as well as MS's BUILD-Tools.

So, a typical directory structure (should) look like this:

dir1/
dir1/DIRS          [Win]
dir1/Makefile      [Linux]
dir1/dir2/SOURCES  [Win]
dir1/dir2/Makefile [Win]
dir1/dir2/Makefile [Linux]
dir1/dir2/abc.c    [both]

The problem is obvious: dir1/dir2/Makefile has to be two different
files, which is not possible at all.

I see the following solutions:

1. Let Linux use a makefile called "GNUMakefile" instead of "Makefile".
2. Move the Makefile somewhere else, in other directories.

No. 1 has been rejected, as the Linux guys thing: "GNUMakefile" is a
name which is reserved for makefiles which use GNU-specific extensions.
This is not the case here.

No. 2 has been rejected, as MS's build tool does not allow having the
SOURCES and Makefile files somewhere else than the .C files. They think
it would make the Linux project look like a "2nd class" project if the
makefiles of Linux or somewhere else, but the makefiles of Windows are
in the directory itself.


Now, we ask ourselves how we can integrate both projects into one?
Currently, we are using two CVS modules now.

I do not really see a solution to this. It would be nice if we could
have 3 modules:
- common files (.C)
- Linux build system (Makefile)
- Windows build system (Makefile, dirs, sources)

Now, if we checkout one module, for example the Windows version, we
could checkout the common files, too.

Anyway, as far as I understand it, this is not completely possible with
CVS, is it? Can we mix files in one directory this way? From my
understanding of the CVSROOT/modules file, this is not possible, is it?
For example, an ampersand-module puts another module into a
sub-directory, they do not overlap.

Any advice is highly appreciated.

Regards,
   Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/




reply via email to

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