Debian Codegraph @

Makefile

raw
1 ##########################################################################
2 # #
3 # Headache #
4 # #
5 # Vincent Simonet, Projet Cristal, INRIA Rocquencourt #
6 # #
7 # Copyright 2002 #
8 # Institut National de Recherche en Informatique et en Automatique. #
9 # All rights reserved. This file is distributed under the terms of #
10 # the GNU Library General Public License. #
11 # #
12 # [email protected] http://cristal.inria.fr/~simonet/ #
13 # #
14 ##########################################################################
15
16 .PHONY: headache clean install test
17
18 headache:
19 dune build
20
21 clean::
22 dune clean
23
24 # install
25 install:
26 ifndef INSTALLDIR
27 $(error "Please define INSTALLDIR.")
28 else
29 mkdir -p $(INSTALLDIR)
30 cp -f _build/install/default/bin/headache $(INSTALLDIR)/headache
31 endif
32
33 # test
34 bootstrap: headache
35 dune exec -- headache -h example $(filter-out config_builtin.ml, $(wildcard *.ml*)) Makefile doc-src/Makefile doc-src/manual.tex
36
37 test: bootstrap
38 dune exec -- headache -e Makefile > example.txt
39 diff -q example example.txt
40 rm -f example.txt
41
42 # documentation
43 ifndef DOC_INSTALLDIR
44 DOC_SRC= doc-src
45 # default installation from ./doc-src to ./doc and update of ./README
46 DOC_INSTALLDIR= doc
47 .PHONY: install-doc
48 install-doc::
49 cp -f doc-src/manual.txt ./README
50 else
51 # for installation from ./doc to $(DOC_INSTALLDIR)
52 DOC_SRC= doc
53 endif
54 sinclude doc-src/Makefile