Boost logo

Boost-Build :

From: Olivier Smeesters (olivier.smeesters_at_[hidden])
Date: 2006-10-12 05:52:53


Hi Volodya,

Thanks for your kind reply. The <install-source-root> tag does help
indeed, at least when used directly on "install" targets.

However, in my precise case, it still shows some problems that I don't
see how to solve. I'll try to explain this concisely.

The project has the following source tree:
root
    - yui
       - build
           - fonts
           - menu
           - yahoo
    - gui
          - src

I want to build the web app in a tree like
root
    - builddir
        - www
             - yui
                  - fonts
                  - ...
             - (files from gui/src)

Boost.Build may copy the files as many times as it needs to if it helps
the build process. So...

The Jamfile in root says:
| use-project /yui : yui ;
| build-project gui ;

In yui, the Jamfile says:
| project . ;
| install fonts : [ glob build/fonts/* ] : <install-source-root>build
<location>builddir ;
| install menu : [ glob build/menu/* ] : <install-source-root>build
<location>builddir ;
| install yahoo : [ glob build/yahoo/* ] : <install-source-root>build
<location>builddir ;

In gui,, the Jamfile looks like:
| project . ;
| install www/yui : /yui//yahoo /yui//menu /yui//fonts :
<location>builddir ;
| install www : [ glob src/* ] : <location>builddir ;
| alias builddir : www www/yui ;

"bjam yui//menu" works (copies the files to yui/builddir/menu).
But "bjam gui//builddir" fails from the top. Here is the output:
> ...found 175 targets...
> ...updating 124 targets...
> MkDir1 gui/builddir
> MkDir1 gui/builddir/..
> mkdir: cannot create directory `gui/builddir/..': File exists
>
> mkdir "gui/builddir/.."
>
> ...failed MkDir1 gui/builddir/.....
> ...skipped gui/builddir/../builddir for lack of gui/builddir/.....
> ...skipped gui/builddir/../builddir/fonts for lack of
> gui/builddir/../builddir...
> MkDir1 yui/builddir
> MkDir1 yui/builddir/fonts
> common.copy yui/builddir/fonts/fonts-min.css
> ...skipped <pgui/builddir>../builddir/fonts/fonts-min.css for lack of
> gui/builddir/../builddir/fonts...
> common.copy yui/builddir/fonts/fonts.css
> ...skipped <pgui/builddir>../builddir/fonts/fonts.css for lack of
> gui/builddir/../builddir/fonts...
I also tried with alias as shown in my previous email (with the
install-source-root in the alias requirements or even in the project
requirements) but it did not do any better.

In fact, the easiest way would to be able to declare a group of source
files in the yui Jamfile (like yui/build/menu/* considering root as
yui/build), be able to modify their target location in acm_gui (add a
"yui/" prefix) and install all the files of the web app in the
root/builddir.
Is there a nice an easy way to do that, that I missed ? (Boost Build is
so capable of building C/C++ sources that it's more difficult to make a
simple tree copy... :) )

Thanks for the great work and the kind help,

Olivier

> Hi Oliver,
>
>> > For YUI, it goes like this (partial copy) :
>> > | project . ;
>> > | alias menu_assets : [ glob build/menu/assets/* ] : <location>menu/assets
>> > | ; alias menu : [ glob build/menu/*.js ] menu_assets : <location>menu ;
>> > | alias yahoo : [ glob build/yahoo/*.js ] : <location>yahoo ;
>> >
>> > My application is defined like this:
>> > | project . ;
>> > | alias www : [ glob src/* ] ../yui//menu ../yui//yahoo ;
>> >
>> > Then, in the Jamroot, I've put instructions to assemble the application:
>> > | install release/www : acm_gui//www : <location>release/www ;
>> >
>> > The problem is that "install" insists on flattening the tree...
>> >
>> > How to make a tree-structure-aware install ?
>>
>
> I've just documented that, and the docs should appear in:
>
> http://boost.org/boost-build2/doc/html/bbv2/builtins/stage.html
>
> within 10 mins.
>
> Thanks,
> Volodya
>


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