|
Boost-Build : |
From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-05-01 09:13:10
[2003-05-01] Vaclav Vesely wrote:
>It's possible to obtain the name of the root project directory in the
>"Jamrules" file?
>
>I would like to add to "Jamrules" something like this
>
> ALL_LOCATE_TARGET = $(ALL_LOCATE_TARGET) $(PROJECT_ROOT_DIRECTORY_NAME)
>;
>
>in the "Jamrules" to allow build several versions of the same project which
>are stored in directories like
>
> C:\Src\my_project_HEAD
> C:\Src\my_project_RELEASE_1_0
>
>And I don't want to change the "Jamrules" file in each version.
Step 1 find the project root location, In BBV1 I do:
PROJECT_ROOT = [ find-to-root [ PWD } : $(JAMRULES) ] ;
PROJECT_ROOT = $(PROJECT_ROOT:D) ;
In BBV2 you can do the simpler:
PROJECT_ROOT = [ project-root get-location ];
(If I remember correctly you can do that last one in any context, project or
project root)
And you probabably only want the last part of the name to append to your
ALL_LOCATE_TARGET top level path...
PROJECT_ROOT_NAME = $(PROJECT_ROOT:B) ;
-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq
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