[jamming] yet another newbie

Paul Forgey paulf at metainfo.com
Thu Apr 7 13:45:34 PDT 2005


Looks like you forgot to add grist.  Your rules know how to build 
y.tab.c, but not <Parser.d>y.tab.c.  The Jambase's Yacc rules don't do 
this because the targets are already gristed because they are called 
from the Object rule, which is called from the Objects rule which 
applies the grist.  If you don't have grist and you build from TOP 
rather than Parser.d and other sub projects use another y.tab.c, Jam 
can't tell them apart.

It also looks like you used Jambase as an example.  You can simplify 
things and not use MyYacc1 because you are assuming you always have a 
yacc.  Just put an actions on MyYacc.

But..  with the stock Jambase, you should be able to simply say:
Library libparser : paux.C p.y lexer.l ;

So I don't know why you are making life so hard on yourself.

On Apr 6, 2005, at 5:58 PM, Anton Evgrafov wrote:

> Hi,
>
> I got stuck with the following problem. In my Jamfile I have:
>
> SubDir TOP Parser.d ;
> Library libparser : paux.C lex.yy.c y.tab.c ;
> MyYacc y.tab.c y.tab.h : p.y ;
> MyLex lex.yy.c : lexer.l y.tab.h ;
>
> where y.tab.c, y.tab.h, and lex.yy.c are supposed to be generated by 
> lex/yacc.
> Basically, MyLex1 & MyYacc1 are the standard rules, which do not copy 
> output files (see below). Anyway, I can run smoothly "jam lex.yy.c", 
> which produces all three files as desired. Unfortunately, "jam all" 
> fails miserably saying:
>
> ...can't find 2 target(s)...
> ...can't make 2 target(s)...
> ...skipped <Parser.d>lex.yy.o for lack of <Parser.d>lex.yy.c...
> ...skipped <Parser.d>y.tab.o for lack of <Parser.d>y.tab.c...
>
> Any help?
>
> --Anton
>
> PS:
> In $(TOP)/Jamrules we have:
> rule MyLex
> {
>   Depends $(<) : $(>) ;
>   MyLex1 $(<) : $(>) ;
>   MakeLocate $(<) : $(LOCATE_SOURCE) ;
>   Clean clean : $(<) ;
> }
> actions MyLex1
> {
>   $(LEX) $(LEXFLAGS) "-o$(1)" $(2[1]:Q)
> }
> rule MyYacc
> {
>   Depends $(<) : $(>) ;
>   MyYacc1 $(<) : $(>) ;
>   MakeLocate $(<) : $(LOCATE_SOURCE) ;
>   Clean clean : $(<) ;
> }
> actions MyYacc1
> {
>   $(YACC) $(YACCFLAGS) "$(2)"
> }
> _______________________________________________
> jamming mailing list  -  jamming at perforce.com
> http://maillist.perforce.com/mailman/listinfo/jamming




More information about the jamming mailing list