-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (44 loc) · 1.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
OCAMLBUILD=ocamlbuild -libs str,unix -I doc
all: native tests
tags:
ctags *.ml
preproc: FORCE
echo "let git_commit=\"$(shell git rev-parse HEAD)\"" > version.ml
@make -C doc
debug:
$(OCAMLBUILD) -tag profile -tag debug main.native
@ln -sf ./main.native ./chariot
native:
$(OCAMLBUILD) main.native
@ln -sf ./main.native ./chariot
byte:
$(OCAMLBUILD) main.byte
@ln -sf ./main.byte ./chariot
release:
$(OCAMLBUILD) main.native -cflag "-noassert"
@cp ./main.native ./chariot
tests: native
@echo "tests:"
@make -s -C tests all
noninteractive-tests: native
@make -s -C tests all INTERACTIVE="-n"
@echo "ALL TESTS OK"
archive: preproc
git archive --prefix=chariot/ -o chariot.tar HEAD
tar --append --file=chariot.tar version.ml --transform 's,version.ml,chariot/version.ml,'
tar --append --file=chariot.tar doc/*.ml --transform 's,doc/,chariot/doc/,'
install-vim:
@install -d ~/.vim/ftdetect/
ln -sf $(PWD)/vim/ftdetect/chariot.vim ~/.vim/ftdetect/
@install -d ~/.vim/ftplugin/
ln -sf $(PWD)/vim/ftplugin/chariot.vim ~/.vim/ftplugin/
@install -d ~/.vim/syntax/
ln -sf $(PWD)/vim/syntax/chariot.vim ~/.vim/syntax/
clean:
ocamlbuild -clean
rm -rf _build
rm -f main.native main.byte
rm -f chariot
rm -f tags
rm -f gmon.out a.out
FORCE: