-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
88 lines (62 loc) · 2.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
NAME = Sem
GHCFLAGS =
INSTALL_DIR = $(HOME)/public_html/mosg
.PHONY: mosg.cgi mosg.fcgi mosg mosg-fracas semantics.fcgi reasoning.fcgi pgf.fcgi gwt hosted test Syntax.pgf Syntax.hs showpdf install clean distclean
mosg.fcgi: Sem.hs
ghc $(GHCFLAGS) -threaded -package gf -package folkung -package fastcgi --make -o $@ MainFastCGI.hs
mosg.cgi: Sem.hs
ghc $(GHCFLAGS) -package gf -package folkung --make -o $@ MainCGI.hs
mosg: Sem.hs
ghc $(GHCFLAGS) -package gf -package folkung --make -o $@ Main.hs
mosg-fracas: Sem.hs
ghc $(GHCFLAGS) -package gf -package folkung -package HaXml-1.13.3 --make -o $@ MainFraCaS.hs
semantics.fcgi: Sem.hs
ghc $(GHCFLAGS) -threaded -package gf -package fastcgi --make -o $@ SemanticsService.hs
reasoning.fcgi:
ghc $(GHCFLAGS) -threaded -package folkung -package fastcgi --make -o $@ ReasoningService.hs
pgf.fcgi:
cp $(HOME)/.cabal/bin/pgf.fcgi .
gwt:
chmod a+x gwt/Mosg-compile
gwt/Mosg-compile
hosted:
chmod a+x gwt/Mosg-shell-external
gwt/Mosg-shell-external
test:
ghc $(GHCFLAGS) -i../embedded-gf/src --make -o $@ test.hs
Sem.hs: Sem.tex.lhs
lhs2TeX --newcode --path=report: -sunhandled Sem.tex.lhs > Sem.hs
unhandled:
lhs2TeX --newcode Sem.tex.lhs > unhandled.hs
echo | ghci unhandled.hs
%.tex: %.tex.lhs
lhs2TeX $^ > $@
Sem.pdf: Sem.tex
pdflatex Sem.tex
bibtex Sem
pdflatex Sem.tex
pdflatex Sem.tex
showpdf: Sem.pdf
acroread $^
InterExample.hs: InterExample.tex.lhs
lhs2TeX --newcode $^ > $@
InterExample.pdf: InterExample.tex
pdflatex InterExample.tex
Syntax.pgf Syntax.hs:
gfc --make --output-format=haskell --haskell=lexical --lexical=N,N2,N3,PN,A,A2,V,V2,V3,Prep --name=Syntax grammar/English.gf # grammar/Swedish.gf # grammar/Norwegian.gf grammar/German.gf
run: pgf.fcgi semantics.fcgi reasoning.fcgi
@echo '*********************************************'
@echo 'See http://localhost:1970/'
@echo '*********************************************'
lighttpd -f lighttpd.conf -D
install:
mkdir -p $(INSTALL_DIR)
chmod a+w $(INSTALL_DIR)
cp mosg.cgi Syntax.pgf $(INSTALL_DIR)
clean:
-rm -f *.aux *.dvi *.log *.blg *.bbl *.toc *.rel *.ptb
-rm -f $(NAME).pdf
-rm -f *.o *.hi grammar/*.gfc grammar/*.gfr grammar/*.gfo
-rm -f mosg.cgi mosg.fcgi mosg mosg-fracas
distclean: clean
-rm -f Syntax.pgf Syntax.hs