blob: 12e6d8748c5a009b50ea0feec19384836a777fe0 (
plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
#!/usr/bin/make -f
# debian/rules for coq
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Build cache (for accelerating Debian debugging)
BUILDCACHE := $(wildcard ../coq.cache)
# This has to be exported to make some magic below work.
export COQTEST_SKIPCOMPLEXITY = true
export CAML_LD_LIBRARY_PATH = $(shell pwd)/kernel/byterun
# Show full commands when building Coq
export VERBOSE=1
include /usr/share/ocaml/ocamlvars.mk
HTMLDOC := doc/stdlib/html/index.html
COQPREF := $(CURDIR)/debian/tmp
ADDPREF := COQINSTALLPREFIX=$(COQPREF)
PACKAGES := $(shell dh_listpackages)
COQ_VERSION := $(shell head -n1 debian/changelog | awk -F'[+() ]' '{print $$3}')
COQ_ABI := $(COQ_VERSION)+$(OCAML_ABI)
CONFIGUREOPTS := --arch Linux --prefix /usr --mandir /usr/share/man \
--emacslib /usr/share/emacs/site-lisp/coq --reals all --fsets all \
--browser "/usr/bin/x-www-browser %s &" \
--with-doc no --coqrunbyteflags "-dllib -lcoqrun"
export OCAMLINIT_SED += \
-e 's%@CoqVersion@%$(COQ_VERSION)%' \
-e 's%@CoqABI@%$(COQ_ABI)%'
DH := dh --with ocaml
configure: configure-stamp
configure-stamp:
$(DH) build --before dh_auto_configure
./configure $(CONFIGUREOPTS)
touch $@
build: build-stamp
build-stamp: configure-stamp
dh_testdir
ifeq ($(BUILDCACHE),)
# VALIDOPTS are the options given to coqchk; the value given here is
# the default one without -silent (-silent maybe cause buildd to
# timeout because of lack of output)
$(MAKE) STRIP=true VALIDOPTS="-o -m" check
$(MAKE) DOC_TARGETS=$(HTMLDOC) $(HTMLDOC)
else
rsync -a --exclude=debian --exclude=.git $(BUILDCACHE)/ .
endif
$(DH) build --after dh_auto_test
touch $@
install: install-stamp
install-stamp: build-stamp
$(DH) install --before dh_auto_install
$(MAKE) $(ADDPREF) install
find debian/tmp -regextype posix-awk \
-regex '.*\.(cm[aoxi]|cmxa|[ao])$$' \
>> debian/libcoq-ocaml-dev.install
find debian/tmp -name '*.vo' -printf '%P\n' \
>> debian/coq-theories.install
dh_install --list-missing
cp debian/coq.xpm debian/coqide/usr/share/pixmaps/coqide.xpm
$(DH) install --after dh_install
for u in $(PACKAGES); do \
echo 'F:OCamlABI=$(OCAML_ABI)' >> debian/$$u.substvars; \
echo 'F:CoqABI=$(COQ_ABI)' >> debian/$$u.substvars; \
done
touch $@
clean:
$(DH) $@
binary-indep: install-stamp
$(DH) $@
binary-arch: install-stamp
$(DH) $@
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|