summaryrefslogtreecommitdiff
path: root/web/yacco2/bld_bash_APPLE
blob: 23846d0f206f7f45578ac66c43b89cb26a7c6722 (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
#! /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/