File: rules

package info (click to toggle)
why 2.26%2Bdfsg-2%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 19,796 kB
  • ctags: 19,175
  • sloc: ml: 115,078; java: 9,253; ansic: 4,757; makefile: 1,350; sh: 485; lisp: 3
file content (51 lines) | stat: -rwxr-xr-x 1,545 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
#!/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)
VERSION   = $(shell cat Version | grep ^VERSION | cut -d= -f 2)
export OCAMLINIT_SED += -e 's/@VERSION@/$(VERSION)/g'

override_dh_auto_configure:
	autoconf
	./configure \
	    --host=$(DEB_HOST_GNU_TYPE) \
	    --build=$(DEB_BUILD_GNU_TYPE) \
	    --prefix=/usr \
	    --libdir=/usr/share \
	    --mandir=\$${prefix}/share/man \
	    --infodir=\$${prefix}/share/info \
	    --enable-apron=yes \
	    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_install:
	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

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

%:
	dh --with ocaml $@

#	dh_installchangelogs CHANGES