hxml = hxml-0.2 hxq = XML/HXQ options = -O2 parser = $(hxq)/Parser.hs # xquery interpreter all: $(parser) Main.hs ghc $(options) -i$(hxml) --make Main.hs -o xquery # on-the-fly compiler: unstable; use xquery instead hxqc: $(parser) HXQ-unstable.hs ghc $(options) -i$(hxml) -optl-s -package ghc --make HXQ-unstable.hs -o hxqc # generate the XQuery parser using happy $(parser): XQueryParser.y happy -g -a -c -o $(parser) XQueryParser.y test1: $(parser) Test1.hs ghc $(options) -i$(hxml) --make Test1.hs -o a.out ./a.out test2: $(parser) Test2.hs ghc $(options) -i$(hxml) --make Test2.hs -o a.out time ./a.out +RTS -H20m test3: $(parser) TestDB.hs ghc $(options) -i$(hxml) --make TestDB.hs -o a.out ./a.out test4: $(parser) TestDB2.hs ghc $(options) -i$(hxml) --make TestDB2.hs -o a.out ./a.out # run in the ghci interpreter and load HXQ ghci: $(parser) ghci -fth -i$(hxml) Main.hs # create the cabal distribution cabal: $(parser) runhaskell Setup.lhs configure --ghc --user --prefix=$(HOME) runhaskell Setup.lhs build runhaskell Setup.lhs sdist clean: /bin/rm -f *~ data/*~ $(hxq)/*~ *.o *.hi $(hxq)/*.o $(hxq)/*.hi $(hxml)/*.o $(hxml)/*.hi $(parser) xquery hxqc Temp.hs a.out