-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
54 lines (47 loc) · 1.85 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
##########################################################################
# #
# Headache #
# #
# Vincent Simonet, Projet Cristal, INRIA Rocquencourt #
# #
# Copyright 2002 #
# Institut National de Recherche en Informatique et en Automatique. #
# All rights reserved. This file is distributed under the terms of #
# the GNU Library General Public License. #
# #
# [email protected] http://cristal.inria.fr/~simonet/ #
# #
##########################################################################
.PHONY: headache clean install test
headache:
dune build
clean::
dune clean
# install
install:
ifndef INSTALLDIR
$(error "Please define INSTALLDIR.")
else
mkdir -p $(INSTALLDIR)
cp -f _build/install/default/bin/headache $(INSTALLDIR)/headache
endif
# test
bootstrap: headache
dune exec -- headache -h example $(filter-out config_builtin.ml, $(wildcard *.ml*)) Makefile doc-src/Makefile doc-src/manual.tex
test: bootstrap
dune exec -- headache -e Makefile > example.txt
diff -q example example.txt
rm -f example.txt
# documentation
ifndef DOC_INSTALLDIR
DOC_SRC= doc-src
# default installation from ./doc-src to ./doc and update of ./README
DOC_INSTALLDIR= doc
.PHONY: install-doc
install-doc::
cp -f doc-src/manual.txt ./README
else
# for installation from ./doc to $(DOC_INSTALLDIR)
DOC_SRC= doc
endif
sinclude doc-src/Makefile