Debian Codegraph @

yo/concrete/bisonc++/build

raw
1 #!/bin/bash
2
3 case "$1" in
4 ("")
5 echo "
6 usage: 'build prog' to build the program, 'build clean' to cleanup
7 "
8 exit 1
9 ;;
10 (prog)
11 cd parser
12 bisonc++ grammar || exit 1
13 cd ../scanner
14 flexc++ lexer || exit 1
15 cd ..
16
17 g++ -Wall -ocalc *.cc */*.cc -lbobcat || exit 1
18 echo "
19 ready; run the program as './calc'
20 "
21 ;;
22 (clean)
23 rm -f calc
24 cd parser
25 rm -f parse.cc parserbase.h
26 cd ../scanner
27 rm -f lex.cc scannerbase.h
28 echo "
29 done
30 "
31 ;;
32 esac
33
34 exit 1
35
36
37