#! /bin/sh # File: bld_bash_SOLARIS # Why: builds the yacco2 package # Note: set the proper path of package by variable O2 # How to run example: # cd /usr/local//yacco2 # . bld_bash_SOLARIS # # U can edit/comment out the Solaris_bash_file make lines not wanted # # Note: I use the Gnu make utility as the Solaris # ``make'' is a bit crude in its parsing of content and functionality # ``Unexpected end of line problems'' did me in when ``od'' showed # a well formed Solaris make file and my patiences is thinning on # just bad parsing. # # # Happy ccing # ###---- Notice - ``cwebmac.tex'' file needing Repair: ### Please make sure you're signed in as a user with appropriate priviledges ### to change the ``cwebmac.tex'' file of your ``texlive'' distribution. ### If u do not have ``texlive'' installed on your system, this does not stop ### the O2 compiler/compiler from running but the ``-p'' option to draw grammar ### diagrams and ``cweb'' to create TeX grammar documents will be not supported. ### To obtain ``texlive'', please visit ``www.tex.org'' website and join Tug. ### There is great ``open source'' software of which O2 uses ``cweb'', TeX, ### and metapost. Even more there are some very interesting people and events ### that just might hook your intellect. ### ----> Again please join Tug and support their efforts and thank you.<---- ### ### Must add ``\input eplain'' instruction to the start of the cwebmac.tex file ### as its \listing macro is used by O2's generated documents. ### Please edit below the uncommented Bash line CWEBDIR as to where ### the directory is containing this file. Example: ### CWEBDIR=/usr/local/texlive/2008/texmf-dist/tex/plain/cweb ### The /2008/ part is all that needs to be changed to your installed distribution. ### If u are not sure of where it resides then run the following command ### find / | grep 'cwebmac\.tex$' ### If this is NOT the first time installing O2, the below command ### will bypass the editing of the ``cwebmac.tex'' file if the comment within the quotes ### '% For O2 compiler/compiler support' is present. ###---- end of Notice CWEBDIR=/usr/local/texlive/2008/texmf-dist/tex/plain/cweb CWEBFILE="$CWEBDIR/cwebmac.tex" if ! grep '% For O2 compiler/compiler support' $CWEBFILE > /dev/null then cp $CWEBFILE "$CWEBFILE.bk" echo -e "% For O2 compiler/compiler support\n\\input eplain" > x; cat x "$CWEBFILE.bk" > $CWEBFILE rm -f x fi ############# Start of O2 distribution ##################### O2=/usr/local/yacco2/ export O2 #Make=/usr/bin/gnumake Make=/usr/sfw/bin/gmake ### o2testdriver bld echo "----------->Building o2testdriver that allows some QA sanity checks<-----------" cd "$O2"/o2testdriver $Make Rlse -f makefile_SOLARIS echo "----------->Building yacco2 library<-----------" cd "$O2"/library $Make Rlse -f makefile_SOLARIS #$Make Genw -f makefile_SOLARIS #$Make Dbg -f makefile_SOLARIS echo "----------->Building o2's grammars library<-----------" cd "$O2"/compiler/grammars $Make Rlse -f makefile_SOLARIS #$Make Genw -f makefile_SOLARIS #$Make Dbg -f makefile_SOLARIS echo "----------->Building o2 the compiler / compiler<-----------" cd "$O2"/compiler/o2 $Make Rlse -f makefile_SOLARIS #$Make Genw -f makefile_SOLARIS #$Make Dbg -f makefile_SOLARIS echo "----------->Building o2linker the companion to o2 compiler / compiler<-----------" cd "$O2"/o2linker $Make Rlse -f makefile_SOLARIS #$Make Genw -f makefile_SOLARIS #$Make Dbg -f makefile_SOLARIS echo "----------->Building o2testdriver that allows some QA sanity checks<-----------" cd "$O2"/o2testdriver $Make Rlse -f makefile_SOLARIS #$Make Dbg -f makefile_SOLARIS ### # testing H2Os 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<-----------" echo "----will only run successfully----" echo "----when default /yacco2 is used.----------" echo "----This is due to the include statements in the grammar being compiled----------" cd /tmp "$O2"/bin/o2 -p -t -err "$O2"/compiler/grammars/eol.lex echo "----------->Exercise the test suite of grammars<-----------" cd /yacco2/grammar-testsuite . test-out-grammars.sh -p ### ### If u don't have ``cweb'' system installed please comment out below bash commands ### cweave Err pdftex Err pdftops Err.pdf cweave T pdftex T pdftops T.pdf cweave Lrk pdftex Lrk pdftops Lrk.pdf mv Err.pdf "$O2"/docs/ mv T.pdf "$O2"/docs/ mv Lrk.pdf "$O2"/docs/ mv Err.ps "$O2"/docs/ mv T.ps "$O2"/docs/ mv Lrk.ps "$O2"/docs/