Boost logo

Boost-Build :

From: Mark Elston (m.elston_at_[hidden])
Date: 2004-07-01 15:48:47


Let me try this again.

I have been trying to diagnose this by tracking down where these
values are set into the feature. The only place I can find is these
lines from builtin.jam:

local os = [ modules.peek : OS ] ;
feature os : $(os) : propagated link-incompatible ;

I can see from this why NT is the only allowed value and I get the
error I show below. However, I cannot see why the same Jamfile works
on Linux since it contains the <os>NT:... conditional property. It
looks like <os> is not a free feature but *may* only have the value
of the current OS.

I also have not been able to track down what happens in the first
line above. The peek rule from modules.jam is:

rule peek ( module-name ? : variables + )
{
module $(<)
{
return $($(>)) ;
}
}

>From the assignment to the 'os' variable above it looks like the peek
is looking at the global OS variable, i.e. in no particular module.
Is that right? Where is this variable set? I have not been able to find
it in the jam files or in the jam_src directory.

So I guess I have two questions:

1. Can I legitimately use conditional properties based on the <os> feature
in my Jamfiles?

2. Just out of curiosity, what is the OS variable and how is it set?

Mark

> -----Original Message-----
> From: Mark Elston [mailto:m.elston_at_[hidden]]
> Sent: Friday, June 25, 2004 6:46 PM
> To: Jamboost Mailing List
> Subject: Conditional feature problem
>
>
> Ok. I put conditional features in my top-level Jamfile
> and got my two test projects building on Linux.
>
> When I move to Win2K I get the following error:
>
> os: NT
> E:/Tmp/C++/Projects/boost/tools/build/v2/build\feature.jam:431:
> in validate-value-string from module feature
> error: "LINUX" is not a known value of feature <os>
> error: legal values: "NT"
> E:/Tmp/C++/Projects/boost/tools/build/v2/build\feature.jam:318:
> in expand-subfeatures-aux from module feature
> E:/Tmp/C++/Projects/boost/tools/build/v2/build\feature.jam:376:
> in feature.expand-subfeatures from module feature
> E:/Tmp/C++/Projects/boost/tools/build/v2/build\property.jam:155:
> in property.expand-subfeatures-in-conditions from
> module property
> E:/Tmp/C++/Projects/boost/tools/build/v2/build\targets.jam:1205:
> in targets.main-target-requirements from module targets
> E:/Tmp/C++/Projects/boost/tools/build/v2/tools\builtin.jam:509:
> in exe from module builtin
> project-root.jam:29: in oasis_util_exe from module project-root<.>
> utils\byacc\Jamfile:9: in modules.load from module Jamfile
> </E:/Projects/OASIS/Dev/utils/byacc>
> ...
>
> I have attached the top-level Jamfile and project-root.jam.
> Any clues?
>
> Mark
> ---------------------------------------------------------------
> Mark Elston
> melston_at_[hidden]
> ---------------------------------------------------------------
> ------=_NextPart_000_00C1_01C45F72.22367040 Content-Type: application/octet-stream;
name="Jamfile"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="Jamfile"

[Attachment content not displayed.] ------=_NextPart_000_00C1_01C45F72.22367040 Content-Type: application/octet-stream;
name="project-root.jam"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="project-root.jam"

[Attachment content not displayed.] ------=_NextPart_000_00C1_01C45F72.22367040--


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