7 messages in com.perforce.jamming[jamming] Multiple Jambase files
FromSent OnAttachments
Darrin Smart21 Dec 2001 22:19 
Darrin Smart21 Dec 2001 22:52 
Matt Armstrong24 Dec 2001 20:10 
Darrin Smart29 Dec 2001 19:53 
Toon Knapen31 Dec 2001 00:14 
Toon Knapen31 Dec 2001 00:25 
Diane Holt01 Jan 2002 13:32 
Subject:[jamming] Multiple Jambase files
From:Toon Knapen (toon@si-lab.org)
Date:12/31/2001 12:25:35 AM
List:com.perforce.jamming

Darrin Smart wrote:

On Tuesday, December 25, 2001, at 03:10 PM, Matt Armstrong wrote:

Yes, for any rule named X there is one and only one "actions X" that will work. In this case, you're probably calling the rule Cc for both the gcc and xcc trees. Call them different names and you can use them both in the same Jam run. Then the problem becomes getting the built in Objects rule to call xcc_Cc when appropriate. I don't have any direct experience getting Jam to build with two different compilers in the same run, so I won't be much help.

Thanks for the reply Matt.

It seems like a bit of a shortcoming in Jam, particularly for very large and complex projects.

One solution might be to make the file name matching be based on regular expressions instead of file suffixes. Then I could override the Object rule to select CC or xcc_Cc as you said.

Boost.Jam is able to use different compiles at the same time.

Actually, the 'trick' is identical to what one would do in 'make' : create a small jamfile for every specific compiler, then include one of these in a jam run according to some (global) variable which identifies the compiler that should be used. (Correct me if I'm wrong David)

Actually, Boost.Jam is able to use multiple compilers at once so the the trick is a little more subtle.

Take a look at the Boost.Jam code as it is used in the Boost(www.boost.org) project :

cvs -d:pserver:anon@cvs.boost.sourceforge.net:/cvsroot/boost login [Hit <return> when it asks for a password] cvs -z3 -d:pserver:anon@cvs.boost.sourceforge.net:/cvsroot/boost checkout boost cvs -d:pserver:anon@cvs.boost.sourceforge.net:/cvsroot/boost logout

more specifically, look in the tools/build subdir to see all compiler specific jamfiles, look in tools/build/jam_src for the source code of boost.jam.