File: Makefile

package info (click to toggle)
headache 1.08-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: ml: 707; xml: 218; makefile: 73; sh: 8
file content (54 lines) | stat: -rw-r--r-- 1,896 bytes parent folder | download | duplicates (3)
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.                               #
#                                                                        #
#  Vincent.Simonet@inria.fr           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