|
Boost-Build : |
From: Rene Rivera (grafik.list_at_[hidden])
Date: 2004-04-23 10:04:10
Toon Knapen wrote:
> Is it possible to describe template targets in the Jamrules in bjam.v1.
> I tried but it does not seem to work.
Not really. Since template are real targets they can only be in
Jamfiles. Of course it's always possible to kludge something, but it
probably not worth it.
>So now I
>
> include $(PROJECT_ROOT)/template_target_desciptions ;
>
> in the Jamfile of some subprojects. But the documentation says that the
> template definition is relative to the subdirectory of the Jamfile
> containing the template definition. Is that $(PROJECT_ROOT) in my case
> or the location of the Jamfile of my subproject ?
Tricky question to answer, with the limited information.... The basic
rule is that the template targets are defined in the Jamfile that
includes the template_target_descriptions. So if you are referring to
them in the same Jamfile you just use the base target name. If you are
in another subproject you need to use a relative path to the template
targets. And if you include the file from multiple Jamfiles you'll end
up with many versions of the template same template targets. For example:
root/template_target_descriptions (ex. declares a "app" template)
root/sub1/Jamfile (includes the templates)
root/sub2/Jamfile
root/sub3/Jamfile (includes the templates)
You'll end up with these template targets: @root/sub1/app, and
@root/sub3/app. "<template>app" in sub1 would refer to the one in sub1
subproject, but you could also refer to the one in the sub3 project with
"<template>../sub3/app". And in sub2 you can only refer to the templates
with a relative path "<template>../sub1/app" and "<template>../sub3/app".
You could also you the "@_project_/.." syntax to refer to the targets
"absolutely".
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/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