|
Boost-Build : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-11-06 06:22:38
Bojan Resnik wrote:
> I am trying to implement ICU support for my projects. The problem I
> am facing is resource generation. ICU has a tool that generates
> resources from txt files and another that bundles the generated
> resources into a single file. My goal is to be able to write something
> like:
> icu.bundle myapp : [ glob res/*.txt ] ;
>
> and have ICU automatically generate a resource file for each txt
> file, and a resource bundle named myapp that contains all these
> resources.
>
> When Jam is run in the app folder, the resource files for app
> library are generated correctly, but no resources are generated
> neither for app_test, nor for its dependency ..//app/<link>static.
> Below is an excerpt from the jam file I am using for ICU support.
>
> I suspect I misunderstood the generators concept. Can someone please
> shed some light on this?
IIUC, you are:
1. compiling TXT -> RES
2. creating a list of all the RES files generated
3. passing this list to the bundling program
This is similar to the response file concept used in the msvc and cw
toolsets. There was a bug in the old logic that meant that the response
files weren't getting regenerated. I suspect that this is where your
problem lies.
If you download the latest CVS version of jam_src, you can do the following:
nl = "
";
action bundle
{
$(BUNDLER) ... @($(TMPFILE):S=.lst:E=$(nl)"$(<)")
}
The @(...) is the new response file logic...
$(TMPFILE) -- generate a temporary file (don't care what it's called)
:S=.lst -- make it have the .lst extension (i.e. it matches *.lst)
:E= -- set the content of the file to...
$(nl)"$(<)" -- a list of newline separated source files
the @(...) will expand to the name of the file, e.g. /tmp/jam124890.lst.
HTH,
- Reece
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk