Hi Chris,
OMG DOS now that brings back memories, what is this compiler
you're using? ;)
It would be good if this preprocessing tool only did the
files you
give it, if it updates all the sources you'll be building
all the time
as jam will think they are all newer.
To use a temp directory, in the example I suggestion add a
LOCATE_SOURCE to set the output directory of GenFile, jam
will create
the directory and 'clean' target will also be aware of
it...
LOCATE_SOURCE = [ FDirName $(SUBDIR) parsed ] ;
GenFile <parsed>genfile1.c : tool genfile1.c ;
Main target : <parsed>genfile1.c ;
FDirName is a built-in rule to form a path. SUBDIR is this
jamfile's
directory which is set by the SubDir rule you have at the
top of each
jamfile. The <parsed> prefix lets you create a new
name for your file
without changing the on-disk name. Jam will replace the
appropriate
full path of this "name" in actions.
You can scan for all your sources with Glob if you don't
want to
remember to update your jamfile so it might look like...
AUXSRC = [ Glob $(SUBDIR) : gen*.c ] ;
AUXSRC = $(AUXSRC:BS) ; # remove paths
for i in $(AUXSRC)
{
# $(i:G=temp) will prefix names with <temp>
GenFile $(i:G=parsed) : tool $(i) ;
}
Main target : $(AUXSRC:G=parsed) ;
Craig.
On 8/25/07, Chris <syndicate_dragon yahoo.com> wrote:
> Part of the problem is that I am limited to an 8.3 DOS
name. So, it's really
> hard to come up with a different name that is legal for
the compiler.
>
> However, I did not think of putting the parsed files
into a separate
> directory. That could work. Since I only need to run
the script once (it
> automatically parses all the files in directory), I
would need a custom
> rule. I guess I could set it up so that the targets of
the rule were the
> source files in the parsed directory, and the
dependencies were the original
> source files. The rule to build the library would then
depend on the files
> in the parsed directory.
>
> I'll have to give that some more thought, and
experiment a bit, but that
> seems like it might be a good way to go.
>
> Thanks for all of your help!
_______________________________________________
jamming mailing list - jamming perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming
|