Boost logo

Boost-Build :

Subject: Re: [Boost-build] Copy TCL script using install rule
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2008-12-01 03:53:45

[direct cc as it's been a while since last posting]

Vladimir Prus wrote:
> 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:


>>>> 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'

Ok, combining the following steps "works":

- Register TCL type
- Adding <install-type>TCL to current install target
- Adding the script to the current install target's sources (by globbing)

Does not feel right, though (see further below).

> - 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.

That approach doesn't really appeal to me.

> 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.

Ok, so in my case (after modifications above) I produced a target named
xxx.tcl of type TCL.

How come e.g. the exe/lib rules have targets specified without extension -
what is the magic incantantion? I'd like to be able to do something similar
for the TCL (or other script) files.

A little backgrounder; in this project the convention is to have a "main"
target inside each subproject, named as the containing project directory,
e.g. "<root>/src/apps/fooapp/build/Jamfile" contains an installable target
named "fooapp".

By keeping to this convention I can automate the adding of targets for
installation inside Jamroot; I'd like to be able to do this in the same way
for my script-based application(s). How can I implement this (preferably by
adding nothing else than <install-type>TCL to my Jamroot, for the install

Thanks / Johan

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