diff options
| author | bringert <bringert@cs.chalmers.se> | 2005-11-25 16:36:19 +0000 |
|---|---|---|
| committer | bringert <bringert@cs.chalmers.se> | 2005-11-25 16:36:19 +0000 |
| commit | dbe8e61acc616b8f5ac07e8df89eb98a7997c29d (patch) | |
| tree | 6e379f18986fc60f5606e023def46abdf770dca5 /transfer/Makefile | |
| parent | fe2731e5f8e301b5a0169bf8b667bb6c13bae80b (diff) | |
Move transfer into the GF repo.
Diffstat (limited to 'transfer/Makefile')
| -rw-r--r-- | transfer/Makefile | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/transfer/Makefile b/transfer/Makefile new file mode 100644 index 000000000..5c2e68362 --- /dev/null +++ b/transfer/Makefile @@ -0,0 +1,50 @@ +SRCDIR=../src + +GHC=ghc +GHCFLAGS=-i$(SRCDIR) + + +.PHONY: all bnfc bnfctest doc docclean clean bnfcclean distclean + +all: + $(GHC) $(GHCFLAGS) --make -o run_core run_core.hs + $(GHC) $(GHCFLAGS) --make -o compile_to_core compile_to_core.hs + +bnfc: bnfcclean + cd $(SRCDIR) && bnfc -gadt -d -p Transfer Transfer/Core/Core.cf + perl -i -pe 's/^import Transfer.Core.ErrM/import Transfer.ErrM/' $(SRCDIR)/Transfer/Core/*.{hs,x,y} + -rm -f $(SRCDIR)/Transfer/Core/ErrM.hs + cd $(SRCDIR) && alex -g Transfer/Core/Lex.x + cd $(SRCDIR) && happy -gca Transfer/Core/Par.y + cd $(SRCDIR) && bnfc -gadt -d -p Transfer Transfer/Syntax/Syntax.cf + perl -i -pe 's/^import Transfer.Syntax.ErrM/import Transfer.ErrM/' $(SRCDIR)/Transfer/Syntax/*.{hs,x,y} + -rm -f $(SRCDIR)/Transfer/Syntax/ErrM.hs + cd $(SRCDIR) && alex -g Transfer/Syntax/Lex.x + cd $(SRCDIR) && happy -gca Transfer/Syntax/Par.y + +bnfctest: + ghc $(GHCFLAGS) --make $(SRCDIR)/Transfer/Core/Test.hs -o test_core + ghc $(GHCFLAGS) --make $(SRCDIR)/Transfer/Syntax/Test.hs -o test_syntax + ghc $(GHCFLAGS) --make $(SRCDIR)/Transfer/Syntax/ResolveLayout.hs -o test_layout + +doc: + (cd $(SRCDIR)/Transfer/Core/; latex Doc.tex; dvips Doc.dvi -o Doc.ps) + (cd $(SRCDIR)/Transfer/Syntax/; latex Doc.tex; dvips Doc.dvi -o Doc.ps) + +docclean: + -rm -f $(SRCDIR)/Transfer/Core/*.{log,aux,dvi,ps} + -rm -f $(SRCDIR)/Transfer/Syntax/*.{log,aux,dvi,ps} + +clean: + -rm -f *.o *.hi + find $(SRCDIR)/Transfer -name '*.o' -o -name '*.hi' | xargs rm -f + -rm -f run_core + -rm -f compile_to_core + -rm -f test_core test_syntax test_layout + +bnfcclean: + -rm -f $(SRCDIR)/Transfer/Core/{Doc,Lex,Par,Layout,Skel,Print,Test,Abs}.* + -rm -f $(SRCDIR)/Transfer/Syntax/{Doc,Lex,Par,Layout,Skel,Print,Test,Abs}.* + +distclean: clean bnfcclean + |
