summaryrefslogtreecommitdiff
path: root/web/yacco2/bld_bash_SOLARIS
blob: 3979af62d15dc53fba0670eb262909dad59a9296 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#! /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/