File: rules

package info (click to toggle)
why 2.40-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 10,504 kB
  • sloc: ml: 71,410; xml: 13,660; java: 8,079; ansic: 1,176; makefile: 728; sh: 199; lisp: 3
file content (69 lines) | stat: -rwxr-xr-x 2,161 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1

include /usr/share/ocaml/ocamlvars.mk
include /usr/share/coq/coqvars.mk

WHYDIR    = $(CURDIR)/debian/why
#FRAMADIR  = $(WHYDIR)/$(shell frama-c -print-plugin-path)
FRAMADIR  = $(WHYDIR)/usr/lib/frama-c/plugins
FRAMAVER  = $(shell dpkg-query -W -f='$${Version}' frama-c-base)
VERSION   = $(shell cat Version | grep ^VERSION | cut -d= -f 2)
export OCAMLINIT_SED += -e 's/@VERSION@/$(VERSION)/g'

override_dh_auto_configure:
	./configure \
	    --host=$(DEB_HOST_GNU_TYPE) \
	    --build=$(DEB_BUILD_GNU_TYPE) \
	    --prefix=/usr \
	    --libdir=/usr/share \
	    --mandir=\$${prefix}/share/man \
	    --infodir=\$${prefix}/share/info \
	    LDFLAGS="-Wl,-z,defs"

override_dh_auto_clean:
	[ ! -f Makefile ] || sed -e 's/include .depend.*//g' Makefile > Makefile.debian
	[ ! -f Makefile.debian ] || $(MAKE) -f Makefile.debian clean
	$(RM) -f lib/coq/*.glob

override_dh_auto_build:
	mkdir -p bin
	dh_auto_build

frama-c-plugin/META.frama-c-jessie:
	echo 'description = "Frama-C Jessie plug-in"' > $@
	echo -n 'version = "' >> $@
	echo -n $(FRAMAVER) >> $@
	echo '"' >> $@
	echo 'requires = ""' >> $@
	echo 'archive(byte) = "Jessie.cma"' >> $@
	echo 'archive(native) = "Jessie.cmxa"' >> $@
	echo 'archive(plugin) = "Jessie.cmxs"' >> $@
	echo 'directory = ""' >> $@

override_dh_auto_install: frama-c-plugin/META.frama-c-jessie
	mkdir -p $(FRAMADIR)
	$(MAKE) prefix=$(WHYDIR)/usr install \
		LIBDIR=$(WHYDIR)/usr/share   \
		PLUGIN_INSTALL_DIR=$(WHYDIR)/usr/lib/frama-c/plugins \
		COQLIB=$(CURDIR)/debian/libwhy-coq/$(COQ_STDLIB_DIR)
	#Used to remove /usr/share/coq/jessie_why.v which is alone and installed by libwhy-coq
	-$(RM) -rf $(WHYDIR)/usr/share/coq/
	#There is no program using the Jessie library.
	-$(RM) -rf $(WHYDIR)/usr/share/jessie/
	#Jessie.cma is installed, no need for this extra file
	-$(RM) -f $(FRAMADIR)/Jessie.cmo
	echo 'F:CoqABI=$(COQ_ABI)' >> debian/libwhy-coq.substvars
	echo 'F:FramaCVersion=$(FRAMAVER)' >> debian/why.substvars

override_dh_compress:
	dh_compress -X.v -X.sx -X.why

override_dh_auto_test:

%:
	dh $@ --with ocaml --no-parallel

#	dh_installchangelogs CHANGES