5 messages in com.perforce.jammingActions that build multiple targets| From | Sent On | Attachments |
|---|---|---|
| chri...@natinst.com chris.bartz@natinst.com | 22 Jan 1998 08:35 | |
| M. S...@research.bell-labs.com | 22 Jan 1998 08:52 | |
| Laur...@perforce.com | 22 Jan 1998 10:46 | |
| chri...@natinst.com chris.bartz@natinst.com | 22 Jan 1998 12:08 | |
| Laur...@perforce.com | 22 Jan 1998 13:44 |
| Subject: | Actions that build multiple targets![]() |
|---|---|
| From: | chri...@natinst.com chris.bartz@natinst.com (chri...@natinst.com chris.bartz@natinst.com) |
| Date: | 01/22/1998 08:35:42 AM |
| List: | com.perforce.jamming |
I am having trouble figuring out how to deal with actions that produce multiple targets. For example, if I want to make a "Browser Database" with MSVC, I have each compile also generate a .sbr file and then when all the files are compiled I run bscmake on all these .sbr files to produce the .bsc file. This is analagous to producing .obj files and linking them into a .lib.
The problem is that the compiler generated both the .obj and the .sbr at the same time. This causes several difficulties.
- - How do you pass the information to the Cc action to produce the .sbr file. I want to add a command line option like /Fr$(<:S=.sbr) but how do you tell the action to do this. I currently use a "MAKE_SBR" vairable and then conditionally set the command line option but I'm not sure this is the best way. I could also have another rule CcwithSBR but I don't like that at all - it would explode if there were several possible outputs.
- - How to set up dependencies. The .bsc file depends on all the .sbr files, but as far as jam is concerned, the .sbr files are never made; there is no action to make them - they are made by the Cc action. How do you get the bscmake command to wait until all the compiles are done before it is run. I said the .sbr file depends on the .obj file and this works but it is not correct.
- - My MAKE_SBR variable produces .sbr files for every compile. But if I am making several targets (exe's, lib's, and dll's), I might only want a browser database on one of them so I only want to produce .sbr files for objects that make up that target. These .sbr files are really huge (easily 20 to 30 times bigger than the .obj) so I don't want extra ones lying around.
I have other examples, mostly from custom tools that generate multiple files (I have one program than generates several .c and .h files, some of which include each other). But if there is some good way of dealing with this problem I think it would apply to other cases also.
- -chris bartz




