Boost logo

Boost :

Subject: Re: [boost] [modular-boost] "b2 headers" behavior on Windows
From: Vyacheslav Andrejev (mortituris_at_[hidden])
Date: 2014-02-04 02:12:46


Hello Edward,

ED> The issue is not the links to directories. The issue is that there
ED> are hardlinks to individual files in the boost subtree using the
ED> logic of the current 'b2 headers' when run under Windows. This is a
ED> problem because if the original file in the libs directory has been
ED> changed, as for example via some 'pull' from Git, the corresponding
ED> hardlink still points to the old file. So we have a mismatch which
ED> causes errors in testing and Boost development.

If you want to create symbolic links to files, open link.jam, locate there
rule do-file-link and change the order of “if $(.can-symlink) = true” and
“if $(.can-hardlink) = true”. It should look like this after the change:

rule do-file-link
{
    local target = [ path.native [ path.relative-to [ path.pwd ] $(<) ] ] ;
    local source = [ path.native [ path.relative-to [ path.pwd ] $(>) ] ] ;
    LOCATE on $(target) = . ;
    DEPENDS $(.current-target) : $(target) ;
    if $(.can-symlink) = true
    {
        link.mklink $(target) : $(source) ;
    }
    else if $(.can-hardlink) = true
    {
        DEPENDS $(target) : $(source) ;
        link.hardlink $(target) : $(source) ;
    }
    else
    {
        DEPENDS $(target) : $(source) ;
        common.copy $(target) : $(source) ;
    }
}

--
Vyacheslav Andrejev

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk