Boost logo

Boost-Build :

From: Jim Gallagher (jim_at_[hidden])
Date: 2008-08-26 12:55:59


> I believe that MATCH rule call actually returned an empty list no
>matter what your model command returned. Try writing it like this:
>
> if [ os.name ] = HPUX
> {
> if [ MATCH "^(9000/)" : [ SHELL "model" ] ]
> {
> type SHARED_LIB : sl : LIB ;
> }
> }
> else
> {
> type SHARED_LIB : so : LIB ;
> }
>
> I believe MATCH rule returns a list of strings found at locations
>marked using parentheses in your given regex. Since you gave no
>parenthised of the expression - nothing was getting returned.
>
> Also, I have not looked the the file you plan to insert this into,
>but could your if-logic perhaps be missing setting the .so extension for
>HP-UX machines that are not PA-RISC?
>

Jurko,

You are exactly right. Here is logic that appears to work correctly:

if [ os.name ] = HPUX
{
    # Output of model comand on PA-RISC machines will lead with "9000/".
    # Shared libs should have .sl extension on PA-RISC.
    if [ MATCH "^(9000/)" : [ SHELL "model" ] ]
    {
        type SHARED_LIB : sl : LIB ;
    }
    else
    {
        # We are Itanium and use .so extension.
        type SHARED_LIB : so : LIB ;
    }
}
else
{
    type SHARED_LIB : so : LIB ;
}

Thanks for your help. Is there a formal patch process, or is this post
sufficient?

Thanks again,
Jim Gallagher


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