Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-04-02 07:10:14


On Wednesday 02 April 2008 10:54:18 Eric Woodruff wrote:
> Volodya,
>
> OK, I checked out the trunk versions of jam and build/v2. I then figured
> how to write the generator for tar, I think. Here's the complete output
> I get now:

Let's backtrace a bit. Does requesting files in 'dist' on the command line
work now?

> I've attached my project files, including the rudimentary tar.jam.

>   rule process ( target : matches * : binding )
>   {
>     local target_path = [ NORMALIZE_PATH $(binding:D) ] ;
>
> #    NOCARE $(matches) ;
>     INCLUDES $(target) : $(self.includes:G=)/$(matches) ;
>     SEARCH on $(matches) = $(target_path) $(self.includes:G=) ;
>    
>     scanner.propagate $(__name__) : $(matches) : $(target) ;    
>   }

Are you sure that

        $(self.includes:G=)/$(matches)

is right? All bjam targets created by Boost.Build have some grist.
For reference, here's how virtual-target.jam creates 'alias' targets
can are used to request specific file on the command line:

            # For a real file target, we create a fake target depending on the
            # real target. This allows us to run
            #
            # bjam hello.o
            #
            # without trying to guess the name of the real target. Note that the
            # target has no directory name and uses a special <e> grist.
            #
            # First, that means that "bjam hello.o" will build all known hello.o
            # targets. Second, the <e> grist makes sure this target won't be
            # confused with other targets, for example, if we have subdir 'test'
            # with target 'test' in it that includes a 'test.o' file, then the
            # target for directory will be just 'test' the target for test.o
            # will be <ptest/bin/gcc/debug>test.o and the target we create below
            # will be <e>test.o
            DEPENDS $(target:G=e) : $(target) ;
            # Allow bjam <path-to-file>/<file> to work. This won't catch all
            # possible ways to refer to the path (relative/absolute, extra ".",
            # various "..", but should help in obvious cases.
            DEPENDS $(target:G=e:R=$(path)) : $(target) ;

So, for this to work you need to add INCLUDE on the same targets that are created
above.

- Volodya


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