forked from abella-prover/abella
/
OMakefile
104 lines (83 loc) · 2.68 KB
/
OMakefile
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
95
96
97
98
99
100
101
102
103
104
UPLOAD_SITE = "agacek@bhoop.cs.umn.edu:/web/research03/abella.cs.umn.edu/development"
VERSION = 1.3.6-dev2
ABELLA = $(CWD)/abella$(EXE)
.SUBDIRS: src examples
################################################
# Default target builds abella and moves it to the toplevel
#
.PHONY: all
.DEFAULT: all
OCamlProgramCopy(all, ., src/abella)
################################################
# Distribution
#
BuildDist() =
rm -rf dist
mkdir dist
cp dist-makefile dist/makefile
cp README dist/README
cp COPYING dist/COPYING
mkdir dist/src
cp src/*.ml* dist/src
rm -f dist/src/*test*.ml
rm -f dist/src/parser.mli
rm -f dist/src/parser.ml
rm -f dist/src/lexer.ml
cp -r examples dist/
rm -r dist/examples/html-files
rm -f $(addsuffixes .html -details.html, $(rootname $(find . -name *.thm)))
rm $(set-diff $(filter-out %makefile %.html %.thm %.mod %.sig, $(ls R, dist/examples)), $(subdirs dist/examples))
mkdir dist/emacs
cp emacs/* dist/emacs
abella-$(VERSION).tar.gz: test theorems
BuildDist()
make -C dist
BuildDist()
rm -f abella-$(VERSION).tar.gz
mv dist abella
bash -c "/usr/bin/find abella -type d | xargs chmod 755"
bash -c "/usr/bin/find abella -type f | xargs chmod 644"
tar c abella | gzip - > abella-$(VERSION).tar.gz
bash -c "chmod 664 abella-$(VERSION).tar.gz" # Set cygwin modes
rm -rf abella
abella-$(VERSION).zip: test theorems
BuildDist()
make -C dist
mv dist/abella.exe .
BuildDist()
mv abella.exe dist/
rm -f abella-$(VERSION).zip
mv dist abella
zip -r abella-$(VERSION).zip abella
bash -c "chmod 664 abella-$(VERSION).zip" # Set cygwin modes
rm -rf abella
.PHONY: dist
dist: abella-$(VERSION).tar.gz abella-$(VERSION).zip
version.html:
fprint(version.html, $(VERSION))
bash -c "chmod 644 version.html"
.PHONY: upload real-upload
upload:
section rule
println(This command will release version $(VERSION) of Abella to)
println($(UPLOAD_SITE))
print(Confirm this action by repeating this version number: )
RESULT = $(input-line $(stdin))
if $(mem $(RESULT), $(VERSION))
upload: real-upload
println(Release completed)
else
upload:
exit 1
real-upload: abella-$(VERSION).tar.gz abella-$(VERSION).zip version.html
scp version.html $(UPLOAD_SITE)
scp abella-$(VERSION).zip abella-$(VERSION).tar.gz \
$(UPLOAD_SITE)/distributions
rm -f version.html
rm -f abella-$(VERSION).zip abella-$(VERSION).tar.gz
################################################
# Utilites
#
.PHONY: clean
clean:
rm $(filter-proper-targets $(ls R, .))