forked from standardml/twelf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
94 lines (76 loc) · 2.8 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
89
90
91
92
93
94
# Makefile for Twelf Server
# Copyright (C) 1997-2006, Frank Pfenning, Carsten Schuermann, and others
# Available under a BSD license, see LICENSE
# ---------------------------------------------------------------
# The following lines attempt to set default names of compilers
# and locations; if these defaults are wrong, edit the following
# lines.
# ---------------------------------------------------------------
polyml = poly
smlnj = sml
oldnj = sml
mlton = mlton -default-ann 'nonexhaustiveMatch ignore'
make = make
twelfdir = `pwd`
twelfserver = twelf-server
# ---------------------------------------------------------------
# You should not need to edit beyond this point
# ---------------------------------------------------------------
.PHONY: default
default: ;
@echo "Options for building Twelf:"
@echo " make smlnj Make Twelf with SML/NJ"
@echo " make mlton Make Twelf with MLton"
@echo ""
@echo "To load Twelf in SML/NJ, use the \"sources.cm\" file in this directory."
@echo ""
.PHONY: buildid
buildid:
-rm -Rf src/frontend/buildid.sml
bin/buildid >src/frontend/buildid.sml
.PHONY: twelf-server-announce
twelf-server-announce:
@echo "*************************************************"
@echo "Twelf Server"
@echo "*************************************************"
.PHONY: twelf-server-mlton
twelf-server-mlton:
mltonversion=`$(mlton) 2>&1 | awk 'NR==1 { print 0+$$2 }'`; \
if [ $$mltonversion -ge 20041109 ]; then \
cmfileid="twelf-server-mlton.mlb"; \
elif [ $$mltonversion="MLTONVERSION" ]; then \
cmfileid="twelf-server-mlton.mlb"; \
else \
echo; echo "Error: MLton >= 20041109 required"; echo; \
exit 1; \
fi; \
$(mlton) -output bin/$(twelfserver) build/$${cmfileid}
.PHONY: twelf-server-smlnj
twelf-server-smlnj:
$(smlnj) < build/twelf-server-smlnj.sml ;
bin/.mkexec "$(smlnj)" "$(twelfdir)" twelf-server "$(twelfserver)" ;
.PHONY: twelf-emacs
twelf-emacs: ;
@echo "*************************************************"
@echo "Twelf Emacs Integration"
@echo "*************************************************"
@echo "Add"
@echo ""
@echo "(setq twelf-root \"$(twelfdir)/\")"
@echo "(load (concat twelf-root \"emacs/twelf-init.el\"))"
@echo ""
@echo "to your .emacs file"
@echo "*************************************************"
.PHONY: poylml smlnj oldnj mlton
polyml : ;
@echo "This makefile not yet working with PolyML."
smlnj : twelf-server-announce buildid twelf-server-smlnj twelf-emacs
mlton : twelf-server-announce buildid twelf-server-mlton twelf-emacs
.PHONY: twelf-regression check
twelf-regression: buildid
$(mlton) -output bin/twelf-regression TEST/mlton-regression.mlb
check : twelf-regression
$(make) -C TEST check
install:
cp bin/twelf-server $(DESTDIR)/bin/twelf-server.new
mv $(DESTDIR)/bin/twelf-server.new $(DESTDIR)/bin/twelf-server