Johan Nilsson | 13 Nov 13:52

Copy TCL script using install rule

Hi,

I've got a medium-sized project in which I'm using Boost.Build. Applicable 
versions:

- Boost.Build from Boost 1.34.1
- bjam is 3.1.14 (should also be from Boost 1.34.1 release)

My project consists of a number of c++ programs and libraries, but I'd like 
to integrate the "build" of a TCL script into the build. Simply, what I'd 
like to do is to use the install rule to copy the script into the dedicated 
install directory.

This is an excerpt from my Jamroot:

---
install bin
        : # targets
        $(bin-targets) # includes TCL script target below
        : # requirements
        <install-type>EXE
        <install-dependencies>off
        <variant>debug:<location>$(debug-bin-location)
        <variant>release:<location>$(release-bin-location)
;
---

This is my first attempt at a Jamfile for the TCL script:

---
(Continue reading)

Alexander Sack | 14 Nov 14:06

Re: Copy TCL script using install rule

Sill question, but why not just copy it in place since its not a binary?

-aps

On Thu, Nov 13, 2008 at 7:55 AM, Johan Nilsson
<r.johan.nilsson <at> gmail.com> wrote:
> Hi,
>
> I've got a medium-sized project in which I'm using Boost.Build. Applicable
> versions:
>
> - Boost.Build from Boost 1.34.1
> - bjam is 3.1.14 (should also be from Boost 1.34.1 release)
>
> My project consists of a number of c++ programs and libraries, but I'd like
> to integrate the "build" of a TCL script into the build. Simply, what I'd
> like to do is to use the install rule to copy the script into the dedicated
> install directory.
>
> This is an excerpt from my Jamroot:
>
> ---
> install bin
>       : # targets
>       $(bin-targets) # includes TCL script target below
>       : # requirements
>       <install-type>EXE
>       <install-dependencies>off
>       <variant>debug:<location>$(debug-bin-location)
>       <variant>release:<location>$(release-bin-location)
(Continue reading)

Johan Nilsson | 14 Nov 15:02

Re: Copy TCL script using install rule

Alexander Sack wrote:
> Sill question, but why not just copy it in place since its not a
> binary?

[Please don't top post.]

It's not a silly question. I considered it myself, and might revert to that 
unless I can find out another way.

My main reason for not doing that is that I want to have a consistent way of 
installing targets from Jamroot.

Regards,
Johan

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Alexander Sack | 14 Nov 16:56

Re: Copy TCL script using install rule

On Fri, Nov 14, 2008 at 9:02 AM, Johan Nilsson
<r.johan.nilsson <at> gmail.com> wrote:
> Alexander Sack wrote:
>>
>> Sill question, but why not just copy it in place since its not a
>> binary?
>
> [Please don't top post.]

Apologies. For some odd reason I thought I stubbed out your
post...again sorry...

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

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

-aps
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Johan Nilsson | 18 Nov 10:55

Re: Copy TCL script using install rule

Alexander Sack wrote:
> On Fri, Nov 14, 2008 at 9:02 AM, Johan Nilsson
> <r.johan.nilsson <at> gmail.com> 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 
(Continue reading)

Vladimir Prus | 22 Nov 10:00

Re: Copy TCL script using install rule

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> gmail.com> 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...
> 
(Continue reading)

Johan Nilsson | 1 Dec 09:53

Re: Copy TCL script using install rule

[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> gmail.com> wrote:

[snip]

>>>
>>>> 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 ;
>
(Continue reading)

Alexander Sack | 26 Nov 18:34

Re: Copy TCL script using install rule

On Sat, Nov 22, 2008 at 4:00 AM, Vladimir Prus <ghost <at> cs.msu.su> 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> gmail.com> 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...
(Continue reading)

Vladimir Prus | 26 Nov 18:57
Favicon

Re: Copy TCL script using install rule

Alexander Sack wrote:

>> 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.
>>
>> HTH,
>> Volodya
> 
> I have stupid question (again):  Why doesn't Boost.Build register some
> common known types to avoid stuff like this?  I mean TCL is pretty
> standard and so are some others off the top of my head (XML, maybe SH
> or PL etc. etc.).  I know its minor but...

I did not know TCL is common. The only use of TCL I am aware of is DejaGNU,
and

  - it uses extension .exp anyway
  - it really should disappear :-)

XML type is defined. What is SH and PL?

(Continue reading)

Alexander Sack | 26 Nov 21:49

Re: Copy TCL script using install rule

On Wed, Nov 26, 2008 at 12:57 PM, Vladimir Prus
<vladimir <at> codesourcery.com> wrote:
> Alexander Sack wrote:
>
>>> 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.
>>>
>>> HTH,
>>> Volodya
>>
>> I have stupid question (again):  Why doesn't Boost.Build register some
>> common known types to avoid stuff like this?  I mean TCL is pretty
>> standard and so are some others off the top of my head (XML, maybe SH
>> or PL etc. etc.).  I know its minor but...
>
> I did not know TCL is common. The only use of TCL I am aware of is DejaGNU,
> and
>
>  - it uses extension .exp anyway
>  - it really should disappear :-)
>
(Continue reading)


Gmane