#! /bin/sh # File: bld_bash_APPLE # Why: builds the yacco2 package for Apple mac 10.7 lion # Note: set the proper path of package by variable O2 # How to run: # cd /usr/local/yacco2 # . bld_bash_APPLE # # U can edit/comment out the bld_bash_APPLE make lines not wanted # or the appropriate option wanted: Rlse, Genw, Dbg # Happy ccing # O2=`pwd` export O2 echo "----------->Building yacco2 library<-----------" cd "$O2"/library make Rlse -f makefile_APPLE #make Dbg -f makefile_APPLE #make Genw -f makefile_APPLE echo "----------->Building yacco2's grammars library<-----------" cd "$O2"/compiler/grammars make Rlse -f makefile_APPLE #make Dbg -f makefile_APPLE #make Genw -f makefile_APPLE echo "----------->Building o2 program --- the compiler / compiler <-----------" cd "$O2"/compiler/o2 make Rlse -f makefile_APPLE #make Dbg -f makefile_APPLE #make Genw -f makefile_APPLE echo "----------->Building o2linker program --- the companion to o2 compiler / compiler<-----------" cd "$O2"/o2linker make Rlse -f makefile_APPLE #make Dbg -f makefile_APPLE #make Genw -f makefile_APPLE echo "----------->Building testout program --- example of writing a compiler<-----------" cd "$O2"/grammar-testsuite make Rlse -f makefile_testout_APPLE #make Dbg -f makefile_testout_APPLE #make Genw -f makefile_testout_APPLE echo "----------->Building testdriver program <-----------" cd "$O2"/o2testdriver make Rlse -f makefile_APPLE #make Dbg -f makefile_APPLE #make Genw -f makefile_APPLE ### # testing O2 by gening all options # the gened eol*.* c++ code is left in the /tmp account # See yacco2/compiler/grammars/o2grammars.bat for gening properly all the grammars ### echo "----------->Simple test on self<-----------" cd /tmp "$O2"/bin/o2 -t -err "$O2"/compiler/grammars/eol.lex echo "----------->Exercise the test suite of grammars<-----------" cd /usr/local/yacco2/grammar-testsuite make Rlse -f makefile_testout_APPLE cd /usr/local/yacco2/grammar-testsuite . test-out-grammars.sh -p ### # comment out below bash scripts if u want to test out the quality assurance tests # or run them individually by hand ### echo "----------->Exercise the QA suite of tests<-----------" echo "----------->uncomment the below scripts if u want to test out QA<-----------" ####cd /usr/local/yacco2/qa ####. o2_testsuite.sh ####. o2linker_testsuite2.sh ####. qa_alltests.sh ####. test_use_cnt.sh ####. o2_testsuite_lrness.sh ####. o2testdriver_tests.sh ####. qa_alltests1.sh ### ### If u have cweave / ctangle then uncomment out below bash commands ### to gen \o2's Error and T terminal s vocabulary documents ### echo "If u have cweave / ctangle installed then uncomment below bash commands" echo "to gen o2's Error and T terminal documents" ####cd /usr/local/yacco2/compiler/grammars ####cweave Err ####pdftex Err ####cweave T ####pdftex T ####cweave Lrk ####pdftex Lrk ####mv Err.pdf "$O2"/docs/ ####mv T.pdf "$O2"/docs/ ####mv Lrk.pdf "$O2"/docs/