comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal Obry <pascal@obry.net>
To: Jacob Sparre Andersen <sparre@nbi.dk>
Subject: Re: chopping Ada source that have preprocessor symbols in them
Date: Tue, 19 Feb 2013 17:42:14 +0100
Date: 2013-02-19T17:42:14+01:00	[thread overview]
Message-ID: <5123AB66.2040107@obry.net> (raw)
In-Reply-To: <87liakk4aa.fsf_-_@adaheads.sparre-andersen.dk>

Le 19/02/2013 11:05, Jacob Sparre Andersen a �crit :
> I've looked a little bit at Mercurial and its "subrepos" facility
> (http://mercurial.selenic.com/wiki/Subrepository).  I think it (combined
> with a sensible use of separate bodies) does the trick.
> 
> Taking Janus/Ada with two OS targets and two CPU architectures, you
> would set up a structure like this:
> 
>    Janus_Ada/ - thin build management repository
>       Common/       - subrepo containing source files common to all targets
>       OS_Specific/  - subrepo containing branches for Linux/Windows
>       CPU_Specific/ - subrepo containing branches for ARM/Intel

But this means that to do a fix for multiple OS/CPU (for example adding
a new routine) you have to move branches! This is quite counter
productive and it also means that you cannot do an atomic commit for
related work on different branches.

I do prefer the GNAT way. That is, having files for different OS/CPU on
the same repo with a suffix starting with double _ to avoid having them
picked up by default by the project file (as this is not a standard
naming). Then using the package Naming and some variables you select the
variant you want to use for a specific build.

-- 
  Pascal Obry /  Magny Les Hameaux (78)

  The best way to travel is by means of imagination

  http://v2p.fr.eu.org
  http://www.obry.net

  gpg --keyserver keys.gnupg.net --recv-key F949BD3B



  parent reply	other threads:[~2013-02-19 16:42 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06  0:54 chopping Ada source that have preprocessor symbols in them Georg Bauhaus
2013-02-06  5:29 ` codeallergy
2013-02-06 12:00   ` Georg Bauhaus
2013-02-08 12:22 ` Stephen Leake
2013-02-08 13:19   ` Georg Bauhaus
2013-02-09  2:51     ` Stephen Leake
2013-02-09 17:59       ` Georg Bauhaus
2013-02-09 20:15         ` Simon Wright
2013-02-11 23:13           ` Georg Bauhaus
2013-02-12 16:04             ` Björn Persson
2013-02-12 19:18               ` Georg Bauhaus
2013-02-15 10:40         ` Stephen Leake
2013-02-15 11:11           ` Georg Bauhaus
2013-02-15 16:39             ` Pascal Obry
2013-02-16  1:10               ` Randy Brukardt
2013-02-17  8:46                 ` Jacob Sparre Andersen
2013-02-18 23:18                   ` Randy Brukardt
2013-02-19 10:05                     ` Version control and multiple implementation variants (Was: chopping Ada source that have preprocessor symbols in them) Jacob Sparre Andersen
2013-02-19 11:41                       ` Thomas Løcke
2013-02-19 16:42                       ` Pascal Obry [this message]
2013-02-19 21:07                       ` Randy Brukardt
2013-02-19 23:20                         ` Georg Bauhaus
2013-02-16  8:22             ` chopping Ada source that have preprocessor symbols in them Stephen Leake
2013-02-16 15:12               ` Georg Bauhaus
2013-02-17 11:51                 ` Stephen Leake
2013-02-18 12:51               ` Björn Persson
2013-02-08 20:27 ` Florian Weimer
2013-02-08 21:09   ` Georg Bauhaus
2013-02-10  9:01 ` Björn Persson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox