| 1 |
TOP=.. |
| 2 |
include ${TOP}/Makefile.defs |
| 3 |
|
| 4 |
OPT = -O2 |
| 5 |
|
| 6 |
expr : Expr.hs Main.lhs |
| 7 |
# might want to run happy with --ghc |
| 8 |
${GHC} -cpp -fglasgow-exts -o expr --make Main.lhs |
| 9 |
|
| 10 |
run : expr |
| 11 |
./expr "1+2*4-3" |
| 12 |
|
| 13 |
runn : expr |
| 14 |
./expr +RTS -s -RTS `perl -e 'print join ("+", (1 .. ${NUM}));'` | tee out-${NUM} |
| 15 |
cat expr.stat >> out-${NUM} |
| 16 |
|
| 17 |
|
| 18 |
eof : expr |
| 19 |
echo testing premature eof |
| 20 |
./expr "1+2*" |
| 21 |
|
| 22 |
err : expr |
| 23 |
echo testing syntax error |
| 24 |
./expr "1+2*2++3" |
| 25 |
|
| 26 |
test : run eof err |
| 27 |
|
| 28 |
clean : |
| 29 |
rm -rf expr Expr.info Expr.hs ExprData.hs *.o *.hi out.daVinci |