Makefile 1.02 KB
Newer Older
1
2
3
minimal:
	ocamlbuild minimal.otarget

Stephane Glondu's avatar
Stephane Glondu committed
4
5
6
all:
	ocamlbuild all.otarget

7
check: minimal
8
	demo/demo.sh
9
	demo/demo-threshold.sh
Stephane Glondu's avatar
Stephane Glondu committed
10

Stephane Glondu's avatar
Stephane Glondu committed
11
clean:
12
13
	-ocamlbuild -clean
	rm -rf _build
Stephane Glondu's avatar
Stephane Glondu committed
14
	rm -f *~
Stephane Glondu's avatar
Stephane Glondu committed
15
16
17

tree: _build/tree.html

18
_build/tree.html: _build/_digests
Stephane Glondu's avatar
Stephane Glondu committed
19
	mkdir -p _build
Stephane Glondu's avatar
Stephane Glondu committed
20
	tree -o $@ -H '..'  -I '_build|_run|*~'
21

Stephane Glondu's avatar
Stephane Glondu committed
22
.PHONY: doc
23
24
25
26
27
doc:
	ocamlbuild doc.otarget
	$(MAKE) doc/specification.pdf

doc/specification.pdf: doc/specification.tex
Stephane Glondu's avatar
Stephane Glondu committed
28
	cd doc && for u in 1 2 3; do pdflatex specification.tex; done
Stephane Glondu's avatar
Stephane Glondu committed
29
30

archive:
31
32
33
34
35
36
37
38
39
40
41
42
43
	@if [ `git status --porcelain | grep -v '^?? ' | wc -l ` -eq 0 ]; then \
	  COMMIT_ID=`git describe --tags`; \
	  VERSION=`cat VERSION`; \
	  if [ "$$(printf $$COMMIT_ID | head -c$$(printf $$VERSION | wc -c))" = "$$VERSION" ]; then \
	    git archive --prefix=belenios-$$COMMIT_ID/ $$COMMIT_ID | gzip -9n > ../belenios-$$COMMIT_ID.tar.gz; \
	    ln -sf belenios-$$COMMIT_ID.tar.gz ../belenios.tar.gz; \
	    ls -l ../belenios.tar.gz; \
	  else \
	    echo "VERSION is not up-to-date!"; exit 1; \
	  fi; \
	else \
	  echo "The tree is not clean!"; exit 1; \
	fi