[jamming] MSVC Cl with multiple source files?

Axelsson, Andreas Andreas.Axelsson at dice.se
Tue Feb 25 08:05:17 PST 2003


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:robert at 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.

Robert

> -----Original Message-----
> From: jamming-admin at perforce.com 
> [mailto:jamming-admin at perforce.com] On Behalf Of Axelsson, Andreas
> Sent: 24 February 2003 08:55
> To: 'jamming at 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
> 
> _______________________________________________
> jamming mailing list  -  jamming at perforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming
> 
> 




More information about the jamming mailing list