Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #
  2. # Rules for compiling and linking the typechecker/evaluator
  3. #
  4. # Type
  5. # make to rebuild the executable files
  6. # make clean to remove all intermediate and temporary files
  7. #
  8.  
  9. # Files that need to be generated from other files
  10. DEPEND += Tokens.hs Grammar.hs Eval.hs
  11.  
  12. # When "make" is invoked with no arguments, we build an executable
  13. # after building everything that it depends on
  14. all: $(DEPEND) myinterpreter
  15.  
  16. # Build an executable for Toy interpreter
  17. myinterpreter: $(DEPEND) Main.hs
  18. ghc -o myinterpreter Main.hs
  19.  
  20.  
  21. # Generate ML files from a parser definition file
  22. Grammar.hs : Grammar.y
  23. @rm -f Grammar.hs
  24. happy Grammar.y
  25. @chmod -w Grammar.hs
  26.  
  27. # Generate ML files from a lexer definition file
  28. Tokens.hs : Tokens.x
  29. @rm -f Tokens.hs
  30. alex Tokens.x
  31. @chmod -w Tokens.hs
  32.  
  33. # Clean up the directory
  34. clean::
  35. rm -rf Tokens.hs Grammar.hs *.hi *.o *.info
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement