List Info

Thread: "metatargets"




"metatargets"
country flaguser name
Russian Federation
2007-09-04 12:41:57
This is something I've tried to do before, but found it
again in
my todo list. Now, we call 'exe', 'lib' and other things
you define in Jamfiles a 'main target'. Inside code, we have
'virtual targets',
that are more like files. This 'main target' term seems
confusing. How about
calling it 'metatarget'? In user documentation, we'll define
it as 'metatarget',
but since user cannot define anything else, we'll use
'target' is synonym for
'metatarget'. 

In code, we'll have 'metatarget' and 'virtual-target'.  Of
course, the rename
in code probably won't happen until Python port is done, and
changing docs
will not happen immediately. So, assuming nobody objects,
I'll file an
issue in the tracker.

Objections?

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

Re: "metatargets"
country flaguser name
United States
2007-09-04 14:56:40
On 09/04/07 12:41, Vladimir Prus wrote:
> This is something I've tried to do before, but found it
again in
> my todo list. Now, we call 'exe', 'lib' and other
things
> you define in Jamfiles a 'main target'. Inside code, we
have 'virtual targets',
> that are more like files. This 'main target' term seems
confusing. How about
> calling it 'metatarget'? In user documentation, we'll
define it as 'metatarget',
[snip]
According to:

htt
p://www.boost.org/doc/html/bbv2/reference.html

exe and lib are builtin rules.  Do you mean the 1st arg to
these
rule invocations in Jamfiles are 'main targets'?  Using the
proposed rename, what is the relationship between a
'metatarget'
and the corresponding 'virtual target'?  I'm guessing it's
some grist function of the metatarget and toolset and
properties and the
rule name.

TIA.

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

Re: "metatargets"
country flaguser name
United States
2007-09-04 15:12:59
On 09/04/07 14:56, Larry Evans wrote:
> On 09/04/07 12:41, Vladimir Prus wrote:
>> This is something I've tried to do before, but
found it again in
>> my todo list. Now, we call 'exe', 'lib' and other
things
>> you define in Jamfiles a 'main target'. Inside
code, we have 'virtual targets',
>> that are more like files. This 'main target' term
seems confusing. How about
>> calling it 'metatarget'? In user documentation,
we'll define it as 'metatarget',
> [snip]
> According to:
> 
> htt
p://www.boost.org/doc/html/bbv2/reference.html
> 
> exe and lib are builtin rules.  Do you mean the 1st arg
to these
> rule invocations in Jamfiles are 'main targets'?  Using
the
[snip]
This reminded me of a problem I had with naming targets on
the command
line.  In a Jamfile.v2, I had to write:

exe main : main.cpp

obj main_obj : main.cpp

and to create the object, I had to `bjam --v2 main_obj`, or
something
like that (now that I think a little more, there's something
not quite
right about that description.  What would that create
main_obj.o on
unix and main_obj.obj on windows?).

Anyway, it seemed to me the extra _obj on the main for the
obj rule was
redundant.  Wouldn't it be simpler to have a Jamvfile.v2:

main.exe : main.cpp

main.obj : main.cpp

?  Then, to just compile main, do `bjam --v2 main.obj`. 
OTOH, to create
the executable, do `bjam main.exe`.  Now, just as now, the
actual file
create would be main on unix and main.exe on windows.

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

Re: "metatargets"
country flaguser name
Russian Federation
2007-09-04 15:20:45
Larry Evans wrote:

> On 09/04/07 12:41, Vladimir Prus wrote:
>> This is something I've tried to do before, but
found it again in
>> my todo list. Now, we call 'exe', 'lib' and other
things
>> you define in Jamfiles a 'main target'. Inside
code, we have 'virtual
>> targets', that are more like files. This 'main
target' term seems
>> confusing. How about calling it 'metatarget'? In
user documentation,
>> we'll define it as 'metatarget',
> [snip]
> According to:
> 
> htt
p://www.boost.org/doc/html/bbv2/reference.html
> 
> exe and lib are builtin rules.

Yes. Both create 'main target rule' -- in current wording.

> Do you mean the 1st arg to these 
> rule invocations in Jamfiles are 'main targets'?  

Strictly speaking, names of main targets to create.


> Using the 
> proposed rename, what is the relationship between a
'metatarget'
> and the corresponding 'virtual target'?  I'm guessing
it's
> some grist function of the metatarget and toolset and
properties and the
> rule name.

'metatarget' is something that can produce various things
depending on
build request. For a specific build request, when a
metatarget is
generated, it produces a bunch of virtual target, where each
virtual target
corresponds to a file.

- Volodya




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

Re: "metatargets"
country flaguser name
Sweden
2007-09-05 02:31:25
Vladimir Prus wrote:
> This is something I've tried to do before, but found it
again in
> my todo list. Now, we call 'exe', 'lib' and other
things
> you define in Jamfiles a 'main target'. Inside code, we
have 'virtual
> targets', that are more like files. This 'main target'
term seems
> confusing. How about calling it 'metatarget'? In user
documentation,
> we'll define it as 'metatarget', but since user cannot
define
> anything else, we'll use 'target' is synonym for
'metatarget'.
>
> In code, we'll have 'metatarget' and 'virtual-target'.

"meta-target" for better consistency?

>  Of course,
> the rename
> in code probably won't happen until Python port is
done,

Whoa! Is it really accepted that the main Boost.Build
development path will 
lead to a Python port? One of the main reasons for me using
BB is the lack 
of other dependencies than BJam (requiring only a C
compiler) and the 
Boost.Build sources/scripts.

[snip rest]

/ Johan


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

naming targets on command line (was Re: "metatargets"
country flaguser name
United States
2007-09-17 15:14:23
On 09/04/07 15:12, Larry Evans wrote:
[snip]
> This reminded me of a problem I had with naming targets
on the command
> line.  In a Jamfile.v2, I had to write:
> 
> exe main : main.cpp
> 
> obj main_obj : main.cpp
> 
> and to create the object, I had to `bjam --v2
main_obj`, or something
> like that (now that I think a little more, there's
something not quite
> right about that description.  What would that create
main_obj.o on
> unix and main_obj.obj on windows?).
[snip]
OOPS.  I should have read:

http://boost.org/boost-build2/doc/html/bbv2/adv
anced/targets.html

which contains:

The entire name is significant when resolving references
from other 
targets. For determining filenames, only the part before the
first dot 
is taken. For example:

obj test.release : test.cpp : <variant>release ;
obj test.debug : test.cpp : <variant>debug ;

will generate two files named test.obj (in two different
directories), 
not two files named test.release.obj and test.debug.obj.

thus, instead of my above example, I could use:

   exe main.exe : main.cpp

   obj main_obj : main.cpp

and then, on command line:

   bjam main.exe

to create the target named main.exe, or

   bjam main.obj

to create the target named main.obj.  Of course
on unix the actual filenames would just be main and main.o.

Sorry for noise.

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

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )