-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
77 lines (58 loc) · 2.65 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
##############################################################################
# #
# This file is part of fontforge-of-ocaml library #
# #
# Copyright (C) 2017-2022, Patrick BAUDIN #
# (https://github.com/pbaudin/fontforge-of-ocaml) #
# #
# you can redistribute it and/or modify it under the terms of the GNU #
# Lesser General Public License as published by the Free Software #
# Foundation, version 2.1. #
# #
# It is distributed in the hope that it will be useful, but WITHOUT ANY #
# WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. #
# #
# See the GNU Lesser General Public License version 2.1 #
# for more details (enclosed in the file licenses/LGPLv2.1) #
# #
##############################################################################
.PHONY: all build clean
PACKAGE=fontforge-of-ocaml
all: $(PACKAGE).opam build
build:
dune build @install
$(PACKAGE).opam: $(PACKAGE).opam.template dune-project
rm -f $@
dune build $@
PHONY: clean
clean:
rm -fr _build
##############################################################################
.PHONY: tests
tests:
dune build @runtest
##############################################################################
.PHONY: install uninstall
FFOO_INSTALLDIR?=""
install:
ifeq ($(FFOO_INSTALLDIR),"")
dune install
else
dune install --prefix ${FFOO_INSTALLDIR}
endif
uninstall:
ifeq ($(FFOO_INSTALLDIR),"")
dune uninstall
else
dune uninstall --prefix ${FFOO_INSTALLDIR}
endif
##############################################################################
.PHONY: headers
HEADER_FILES:=dune dune-project headers/headache_config.txt Makefile
HEADER_FILES+=src/dune $(wildcard src/*.ml) $(wildcard src/*.mli)
HEADER_FILES+=tests/dune tests/Makefile $(wildcard tests/*.ml) $(wildcard tests/*.mli)
HEADACHE=headache -c headers/headache_config.txt -h headers/license.txt
headers:
$(HEADACHE) $(HEADER_FILES)
##############################################################################