Boost logo

Boost-Build :

Subject: Re: [Boost-build] Copy TCL script using install rule
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-11-22 04:00:38

On Tuesday 18 November 2008 12:55:05 Johan Nilsson wrote:
> Alexander Sack wrote:
> > On Fri, Nov 14, 2008 at 9:02 AM, Johan Nilsson
> > <r.johan.nilsson_at_[hidden]> wrote:
> >> Alexander Sack wrote:
> >>>
> >>> Sill question, but why not just copy it in place since its not a
> >>> binary?
> >>
> [snip]
> >
> >> It's not a silly question. I considered it myself, and might revert
> >> to that unless I can find out another way.
> >
> > I only mention is because bjam manages installed targets and your
> > script is sort of out-of-band in the context in which you described.
> The script "is-a" target due to the usage of the make rule (which only,
> quite unnecessarily, copies the script to a gristed target). Or did I
> misunderstand your statement?
> >
> >> My main reason for not doing that is that I want to have a
> >> consistent way of installing targets from Jamroot.
> >
> > In either case its consistent. The question is if there is an
> > existing automated way to do what you are asking I suppose...
> I'd like to have some way of expressing e.g. <install-type>SCRIPT in
> addition to <install-type>EXE in the install rule (I think).

I think there are few ways to install random files:

        - Just add another install target, with the same location, with extra
        files as sources, and without <install-type> property
        - Teach Boost.Build that .tcl files have a type. Your Jamroot might have:

                import type ;
                type.register TCL : tcl ;

        and add the .tcl script as the source for install -- no need for 'make'

        - Make Boost.Build always install things specified in the sources list for
        'install' -- even if they have 'wrong' type. I think I've tried to do this,
        using some new feature, but in the end approach (1) proved to be easier.

The reason your code does not work is that:

        make $(APP) : $(sources) : common.copy ;

when built, does not produce a target of EXE type, but rather of whatever type
is associated with the name of the target. E.g.

        make a.cpp : ....... ;

will produce the target of type CPP. In your case, no type is associated with the
name, so target is typeless, not of type EXE.


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