blob: 09d18c15fcffc7bb32d0d7f4130573d977142e8d (
plain) (
blame)
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
|
--- Makefile.orig Sun Dec 22 11:29:46 2002
+++ Makefile Sat Jul 9 18:52:09 2005
@@ -31,7 +31,7 @@
default : twelf-server twelf-emacs
-all : twelf-server twelf-sml twelf-emacs
+# all : twelf-server twelf-sml twelf-emacs
twelf-server: ;
@echo "*************************************************"
@@ -62,3 +62,73 @@
clean: ;
rm -rf $(twelfdir)/src/*/CM ;
+
+# ---------------------------------------------------------------
+# Installation
+# ---------------------------------------------------------------
+
+arch != uname -p
+
+.if ${arch} == "i386"
+smlarch = x86
+.else
+smlarch = ${arch}
+.endif
+
+prefix = %%PREFIX%%
+bindir = ${prefix}/bin
+infodir = ${prefix}/info
+twelfexecdir = ${prefix}/libexec/twelf
+twelfsharedir = ${prefix}/share/twelf
+
+runfile = bin/twelf-server
+heapfile = bin/.heap/twelf-server.${smlarch}-bsd
+
+infofiles != (cd doc/info; find . -type f -not -name '*.orig')
+sharefiles != (find README -type f; \
+ find doc -type f -not -name '*.orig'; \
+ find emacs -type f; \
+ find examples -type f; \
+ find examples-clp -type f; \
+ find tex -type f)
+
+installfiles := ${bindir}/twelf-server \
+ ${twelfsharedir}/${runfile} \
+ ${twelfexecdir}/${heapfile} \
+ ${infofiles:%=$(infodir)/%} \
+ ${sharefiles:%=$(twelfsharedir)/%}
+
+all: ${runfile} ${heapfile}
+
+${runfile}:
+ echo "#!/bin/sh" >$@
+ echo "exec ${sml} @SMLload=${twelfexecdir}/${heapfile} @SMLdebug=/dev/null" >>$@
+
+${heapfile}:
+ $(sml) < twelf-server.sml
+
+${bindir}/twelf-server: ${twelfsharedir}/${runfile}
+ ln -s $? $@
+
+${twelfsharedir}/${runfile}: ${runfile}
+ @install -d -o root -g wheel -m 0755 ${@D}
+ install -o root -g wheel -m 0555 $? $@
+
+${twelfexecdir}/${heapfile}: ${heapfile}
+ @install -d -o root -g wheel -m 0755 ${@D}
+ install -o root -g wheel -m 0444 $? $@
+
+.for file in ${infofiles}
+${infodir}/${file}: doc/info/${file}
+ ln -s ${twelfsharedir}/$? $@
+.endfor
+
+.for file in ${sharefiles}
+${twelfsharedir}/${file}: ${file}
+ @install -d -o root -g wheel -m 0755 ${@D}
+ install -o root -g wheel -m 0644 $? $@
+.endfor
+
+install: ${installfiles}
+ install-info ${infodir}/twelf.info ${infodir}/dir
+
|