2 messages in com.perforce.jammingProblem with DEPENDS| From | Sent On | Attachments |
|---|---|---|
| Jose...@utstar.com | 07 Aug 1997 16:58 | |
| Laur...@sybase.com | 08 Aug 1997 10:35 |
| Subject: | Problem with DEPENDS![]() |
|---|---|
| From: | Laur...@sybase.com (Laur...@sybase.com) |
| Date: | 08/08/1997 10:35:34 AM |
| List: | com.perforce.jamming |
I'm trying to force a dependency for some assembler include files. I have not created special rules for Jam to process assembler input so I was going to do it by hand using the DEPENDS rule. So I use the following statement to let Jam know that file.asm includes header.inc: DEPENDS file.obj : header.inc ;
The problem is that this doesn't work if LOCATE_TARGET is used. Doesn't Jam look for targets of DEPENDS in the LOCATE_TARGET directories?
Some things to think about:
1) The LOCATE_TARGET magic only works if the 'As' rule is invoked from Library or Main. Are you by any chance invoking 'As' directly?
2) You may need to doctor up the As action for your platform. In the version of Jambase I have, the -I flag is only set for the Unix As action. So on NT, for example, I suspect the assembler has no way of finding the header.inc file.
3) You might try setting up HDRSCAN for assembler source. You shouldn't have to use DEPENDS explicitly.
From your example, I'm guessing you're on a desktop platform, and the 'include' directives in your assembler code don't match the default HDRPATTERN string. (If they did, you wouldn't have to do anything at all, except add the -I flag to the 'As' action.)
So you could set up something like:
ASM_HDRPATTERN = "[your regexp here]" ;
Then, in your Jamfile:
Library zoo : elk.c okapi.asm ;
HDRSCAN on okapi.asm = $(ASM_HDRPATTERN) ;
You may have to experiment with HDRSCAN and HDRPATTERN. I'm never really sure how & when the HdrRule values are applied, but through blind experimentation I've been able to coax some pretty slick behavior out of jam.
---Laura
------------------------------------------------------------------------------ Laura Wingerd Sybase, Inc. 510-922-5232 wing...@sybase.com




