From: favonia Date: Fri, 25 May 2018 15:29:32 +0000 (-0400) Subject: Make GNUmakefile more customizable. X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=daf276673025f125b85ea2bffe940ef0b829df6d;p=cubicaltt.git Make GNUmakefile more customizable. --- diff --git a/GNUmakefile b/GNUmakefile index abfdb65..5a69fc5 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,9 +3,12 @@ # files, so this is a poor match. (By contrast, alex and happy do update their # output files.) To defeat that, we touch the output files when trying to make them. -GHC = ghc +GHC ?= ghc +ALEX ?= alex +HAPPY ?= happy +BNFC ?= bnfc # or: -# GHC = cabal exec ghc -- +# GHC = cabal exec ghc -- INPUT = CTT.hs Connections.hs Eval.hs Main.hs Resolver.hs TypeChecker.hs GRAMMAR = Exp.cf GRAMMAR_X_FILES = Exp/Lex.x @@ -40,12 +43,12 @@ include Makefile $(GHC) $(GHCOPTIONS) $< @ touch $*.hi $*.o %.hs: %.y - happy -gca $< + $(HAPPY) -gca $< %.hs: %.x - alex -g $< + $(ALEX) -g $< bnfc $(GRAMMAR_FILES): Exp.cf - bnfc --haskell -d Exp.cf + $(BNFC) --haskell -d Exp.cf @ touch $(GRAMMAR_FILES) TAGS:; hasktags --etags $(INPUT) $(GRAMMAR)