[C++-sig] defining bjam rules...
Rene Rivera
grafik666 at redshift-software.com
Mon Nov 25 22:56:25 CET 2002
[2002-11-25] Charles Leung wrote:
>Hi all,
>
>I'm trying to implement rules for bjam to install my current project but I
>can't get bjam to execute the 'actions' statement that I defined in my
>Jamfile. Following is an example code that I can't get it to run.
>
>
>
>ECHO_ ?= echo ;
>
>
>rule COUT
>{
> COUT_ $(<) ;
>}
>
>actions COUT_
>{
> $(ECHO_) $(<)
>}
>
>rule my_rules
>{
> DEPENDS $(<) : $(>) ;
> COUT $(>) ;
>}
>
Hmm... I think the missing info is that the $(<) is not the target name
generated by the "exe" rule. It expands the same to include any extension
based on the OS it runs.
>rule make_rule
>{
> exe $(<) : $(>) ;
> LINKLIBS on $(<)$(SUFEXE) = -lm ;
> my_rules $(<) : hello world ;
>}
So try "my_rule $(<)$(SUFEXE) : hello world ;" instead above, and see if you
get the results you expect.
>make_rule testit : test.cc ;
>
>
>
>I tried running something simular using ftjam and it works fine. Am I
>missing something here?
-- grafik - Don't Assume Anything
-- rrivera at acm.org - grafik at redshift-software.com
-- 102708583 at icq - Grafik666 at AIM - Grafik at jabber.org
More information about the Cplusplus-sig
mailing list