GHC_VERSION = $(shell ghc --numeric-version) HAPPY = happy HAPPY_OPTS = -a -g -c -i/tmp/t.info ALEX = alex ALEX_OPTS = -g SRC = src CABAL_BUILD = $(shell ./find-build.cl) all: parsers lexers parsers: $(CABAL_BUILD)/Rlp/Parse.hs $(CABAL_BUILD)/Core/Parse.hs \ $(CABAL_BUILD)/Rlp/AltParse.hs lexers: $(CABAL_BUILD)/Rlp/Lex.hs $(CABAL_BUILD)/Core/Lex.hs $(CABAL_BUILD)/Rlp/Parse.hs: $(SRC)/Rlp/Parse.y $(HAPPY) $(HAPPY_OPTS) $< -o $@ $(CABAL_BUILD)/Rlp/AltParse.hs: $(SRC)/Rlp/AltParse.y $(HAPPY) $(HAPPY_OPTS) $< -o $@ $(CABAL_BUILD)/Rlp/Lex.hs: $(SRC)/Rlp/Lex.x $(ALEX) $(ALEX_OPTS) $< -o $@ $(CABAL_BUILD)/Core/Parse.hs: $(SRC)/Core/Parse.y $(HAPPY) $(HAPPY_OPTS) $< -o $@ $(CABAL_BUILD)/Core/Lex.hs: $(SRC)/Core/Lex.x $(ALEX) $(ALEX_OPTS) $< -o $@