8 messages in com.perforce.jamming[jamming] Some Jam questions and obse...| From | Sent On | Attachments |
|---|---|---|
| Alan Burlison | 08 Nov 2001 04:41 | |
| Craig McPheeters | 08 Nov 2001 10:52 | |
| David Abrahams" <david.abrahams@rcn.com (David Abrahams) | 08 Nov 2001 11:14 | |
| Roesler, Randy | 08 Nov 2001 11:56 | |
| Alan Burlison | 08 Nov 2001 15:10 | |
| Roesler, Randy | 13 Nov 2001 11:19 | |
| Alan Burlison | 13 Nov 2001 14:40 | |
| Alex Nicolaou | 13 Nov 2001 18:45 |
| Subject: | [jamming] Some Jam questions and observations![]() |
|---|---|
| From: | Craig McPheeters (cmcp...@aw.sgi.com) |
| Date: | 11/08/2001 10:52:41 AM |
| List: | com.perforce.jamming |
From: Alan Burlison <Alan...@sun.com>
...
I'm not exactly clear how in detail the header file scanning works - if a.h includes b.h, and then x.c and y.c both include a.h, does a.h just get scanned , or does a.h + b.h get scanned? In either case, do the header files get scanned twice, or is Jam clever enough to realise that when it processes y.c it has already scanned them when processing x.c, so it can just reuse the scan results?
I believe that the original Jam scans each target. If a header is represented in the dependency graph more than once via grist, its scanned more than once. In your example, if there is nothing fancy going on with grist, the header is scanned only once. In a system the size you are mentioning, you'll probably need grist to make target names unique, in which case each combination of grist+file would be scanned.
With the cache in place, each physical file is only scanned once. The cache uses the boundname of the header.
Why doesn't Jam make use of the ability of many compilers to list the header files as they are read? I appreciate that on the 'first pass' this
I can't speak for why Christopher made this decision, but I'm glad he did! I would mention: portability, simplicity as being the small obvious reasons. The real reason would be that the results of the scan are needed before the dependency graph can be run - its needed before any of the compiles start up. The header dependencies determine the order of the graph which is critical to the way jam works.
I also can't find any way of setting variables based on the output of a shell command - is this not possible? In our case, the variables automatically set by Jam from the machine environment (OS, OSPLAT etc.)
I don't know of a way to set a Jam variable to the result of a command you run. We needed a similar thing though. What we do is combine some perl/sh in our build, and create a series of files with the info we need. On compile lines, if you need that info, either use something like: CC -o foo -set_version `cat .version` or create a header and include it. There are usually ways around it.




