3 messages in com.perforce.jamming[jamming] MSVC Cl with multiple sourc...
FromSent OnAttachments
Axelsson, Andreas24 Feb 2003 00:54 
Axelsson, Andreas25 Feb 2003 08:04 
Matt Armstrong25 Feb 2003 13:37 
Subject:[jamming] MSVC Cl with multiple source files?
From:Axelsson, Andreas (Andr@dice.se)
Date:02/25/2003 08:04:55 AM
List:com.perforce.jamming

After some tests it looks like it won't matter if I use the "together" and "piecemeal" modifiers, as each sourcefile will result in one objectfile, so there's no way of specifying a target that is actually more than one file. Compare with Library, which makes one library out of a number of object files, each generated from one source-file.

What I'd like to do is:

Objects a.o b.o c.o : a.c b.c c.c ;

and have the Objects rule understand that building all c-files in one go will produce all o-files, but that the dependency is only between each matching source and object file.

/axl

-----Original Message----- From: Robert Cowham [mailto:rob@vaccaperna.co.uk] Sent: den 24 februari 2003 15:54 To: 'Axelsson, Andreas' Subject: RE: [jamming] MSVC Cl with multiple source files?

Check out:

actions [ modifiers ] rulename { commands }

Define a rule's updating actions, replacing any previous definition. The first two arguments may be referenced in the action's commands as $(1) and $(2) or $(<) and $(>). The following action modifiers are understood:

actions piecemeal commands are repeatedly invoked with a subset of $(>) small enough to fit in the command buffer on this OS.

See existing Jambase for use of piecemeal.

-----Original Message----- From: jamm@perforce.com [mailto:jamm@perforce.com] On Behalf Of Axelsson, Andreas Sent: 24 February 2003 08:55 To: 'jamm@perforce.com' Subject: [jamming] MSVC Cl with multiple source files?

Hi,

has anyone experimented with modifying the Object and related rules to allow Cl to take more than one sourcefile at the time on the commandline? In MS DevStudio that's part of the compile-time optimization, as the compiler doesn't have to reload/initialize for each file, but builds 5-10 files at a time. I'm rather new to Jam so before I spend too much time on this I'd like to know if anyone's tested it.

In short I wish to get the following done:

Main test : source1.cpp source2.cpp [sourceN.cpp] ;

"cl source1.cpp source2.cpp [sourceN.cpp] $(ALL_THE_FLAGS)"

If N is to high, it will split into several calls.

It looks like the Library calls do something similar when there are many object files, so it shouldn't be to much of a problem.

Thanks /axl