On Thu, Feb 03, 2000 at 04:36:37PM +0000, Christian Goetze wrote:
> Then, consider actually creating two branches: One, say, for
> unix_development and one for nt_development (also consider calling
> them nt and unix for short, since you might end up typing this a lot).
>
> The main branch would contain the "common" trunc, and the variant branches
> unix and nt would contain the platform specific changes - we'll see later
> why this is useful.
This is called a platform branch or platform line in the paper at:
http://www.enteract.com/~bradapp/acme/branching
In particular see
http://www.enteract.com/~bradapp/acme/branching/branch-creation.html#PlatformLine
and also
http://www.enteract.com/~bradapp/acme/clearcase/#IntegrationBranches
> P.S. If this is some coding project in C/C++, I'd actually prefer using
> the classic #ifdef method (or the method of selectively compiling certain
> files via a Makefile)
Actually - #ifdefs is not usually the preferred solution for this unless
they are very few and far between (see the classic article "#ifdef
considered harmful" by Geoff Collyer and Henry Spencer - available online
under the heading "no ifdefs" at http://x.bell-labs.com/usr/geoff/)
The preferred way to do this is not with #ifdefs or branches, but with
platform specific files/modules/directories (and make variables that
sort of act as if they were polymorphic build-time "dispatch selectors"
based on platform-type ;-) For a good description of how to do this for
C++, look at Doug Schmidt's paper on the "Wrapper-Facade" pattern which
appeared in the C++ Report, SIGS, Vol. 11, No 2, February, 1999. Its
also available online at http://www.cs.wustl.edu/~schmidt/report-art.html
Cheers!
-- Brad Appleton <bradapp@enteract.com> http://www.enteract.com/~bradapp/ "And miles to go before I sleep." -- Robert Frost - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This archive was generated by hypermail 2b29 : Sun May 06 2001 - 00:23:01 EDT