/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1024 by johnpye, Sat Dec 30 14:27:47 2006 UTC revision 1025 by johnpye, Wed Jan 3 11:11:21 2007 UTC
# Line 870  def CheckYacc(context): Line 870  def CheckYacc(context):
870      return is_ok      return is_ok
871    
872  #----------------  #----------------
873    # LEX
874    
875    lex_test_text = """
876    %{
877    #include <stdio.h>
878    %}
879    DIGIT   [0-9]
880    ID      [a-z][a-z0-9]*
881    %%
882    {DIGIT}+    {
883            printf("A digit: %s\\n",yytext);
884        }
885    
886    [ \\t\\n]+    /* ignore */
887    
888    .           {
889            printf("Unrecognized guff");
890        }
891    %%
892    main(){
893        yylex();
894    }
895    """
896    
897    def CheckLex(context):
898        context.Message("Checking for Lex ('%s')... " % context.env.get('LEX'))
899        is_ok = context.TryCompile(lex_test_text,".l")
900        context.Result(is_ok)
901        return is_ok
902    
903    #----------------
904  # CUnit test  # CUnit test
905    
906  cunit_test_text = """  cunit_test_text = """
# Line 1366  conf = Configure(env Line 1397  conf = Configure(env
1397          , 'CheckGcc' : CheckGcc          , 'CheckGcc' : CheckGcc
1398          , 'CheckGccVisibility' : CheckGccVisibility          , 'CheckGccVisibility' : CheckGccVisibility
1399          , 'CheckYacc' : CheckYacc          , 'CheckYacc' : CheckYacc
1400            , 'CheckLex' : CheckLex
1401          , 'CheckTkTable' : CheckTkTable          , 'CheckTkTable' : CheckTkTable
1402          , 'CheckX11' : CheckX11          , 'CheckX11' : CheckX11
1403          , 'CheckIDA' : CheckIDA          , 'CheckIDA' : CheckIDA
# Line 1438  if not conf.CheckYacc(): Line 1470  if not conf.CheckYacc():
1470  else:  else:
1471      conf.env['HAVE_YACC']=True      conf.env['HAVE_YACC']=True
1472    
1473  conf.env['HAVE_LEX']=True  if not conf.CheckLex():
1474        print "YACC NOT FOUND OR NOT WORKING"
1475    else:
1476        conf.env['HAVE_LEX']=True
1477    
1478  # Tcl/Tk  # Tcl/Tk
1479    

Legend:
Removed from v.1024  
changed lines
  Added in v.1025

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22