[jamming] Pre-parsing source files before building

Chris syndicate_dragon at yahoo.com
Fri Aug 24 11:57:21 PDT 2007


How can I write a rule that tells jam that the parsed
files in the parsed directory depend on the source
files in the source directory? I tried something like
this:

SRCDIR = src
PARSEDDIR = src/parsed
GENSRC = example1.c example2.c ;

rule PreParse
{
LOCATE on $(1) = $(PARSEDDIR) ;
LOCATE on $(2) = $(SRCDIR) ;
Depends $(1) : $(2) ;
}

actions PreParse
{
runScript --outputDir=$(PARSEDDIR) $(SRCDIR)
}
...

PreParse $(GENSRC) : $(GENSRC) ;



but then I get a warning that the files listed in
$(GENSRC) depend on themselves. How can I write the
rule such that it will run the PreParse rule/action
when the source files in the $(SRCDIR) are newer than
in the $(PARSEDDIR)?

Thanks
Chris

--- Craig Allsop <cjamallsop at gmail.com> wrote:
[snip]
> You
> can tell jam to
> output them to an intermediate directory if you
> don't like them in the
> source folder ... anyway ...


"Gee, Thanks. You made me appreciate life by showing me how badly my funeral will suck." - Bender, Futurama


       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/


More information about the jamming mailing list