Boost logo

Boost-Build :

Subject: [Boost-build] what exactly does determine-target-name ?
From: Fabien CHÊNE (fabien.chene_at_[hidden])
Date: 2010-02-18 12:07:35


I encounter an issue with a custom generator. It used to work with an
older boost build (2.0-m11), and unfortunately, it no longer works.
Depending where I invoke bjam, object files are written in different
directories. Invoking bjam in the top directory, a file is generated


If I invoke bjam in a subdirectory, it generates the same file here:

I have spent a hard time understanding why. My guilty is the function
determine-output-name, which calls determine-target-name.

rule determine-target-name ( fullname : prefix ? : postfix ? )
        # See if we need to add directory to the target name.
        local dir = $(fullname:D) ;
        local name = $(fullname:B) ;

        name = $(prefix:E=)$(name) ;
        name = $(name)$(postfix:E=) ;

        if $(dir) &&
          # Never append '..' to target path.
          ! [ MATCH .*(\\.\\.).* : $(dir) ]
          ! [ $(dir) ]
            # Relative path is always relative to the source
            # directory. Retain it, so that users can have files
            # with the same in two different subdirectories.
            name = $(dir)/$(name) ;
        return $(name) ;

I don't understand why, depending on the fact that the path is
relative or not, the target name should be prefixed by the directory.
2.0-m11 only made: name = $(name:D=)


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at