]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtkmathview/debian/rules
ocaml 3.09 transition
[helm.git] / helm / DEVEL / lablgtkmathview / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 OCAMLABI := $(shell ocamlc -version)
9 OCAMLLIBDIR := $(shell ocamlc -where)
10 OFILES := $(patsubst %.in,%,$(shell ls debian/*.in))
11
12 ocamlinit:
13         for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
14 configure: configure-stamp
15 configure-stamp:
16         dh_testdir
17         ./configure
18
19         touch configure-stamp
20
21 build: configure-stamp build-stamp
22 build-stamp:
23         dh_testdir
24
25         $(MAKE)
26         if [ -x /usr/bin/ocamlopt ]; then $(MAKE) opt; else true; fi
27
28         touch build-stamp
29
30 clean:
31         dh_testdir
32         dh_testroot
33         rm -f build-stamp configure-stamp
34
35         -$(MAKE) distclean
36
37         dh_clean
38
39 install: build
40         dh_testdir
41         dh_testroot
42         dh_clean -k
43         dh_installdirs
44
45         mkdir -p debian/tmp$(OCAMLLIBDIR)
46         $(MAKE) install PREFIX=debian/tmp$(OCAMLLIBDIR)
47
48 binary-arch: build install
49         dh_install
50         dh_testdir
51         dh_testroot
52         dh_installdocs
53         dh_installexamples
54         dh_installman
55         dh_installinfo
56         dh_installchangelogs ChangeLog
57         dh_link
58         dh_strip
59         dh_compress
60         dh_fixperms
61         dh_installdeb
62         dh_shlibdeps
63         dh_gencontrol -- -VF:OCamlABI="$(OCAMLABI)"
64         dh_md5sums
65         dh_builddeb
66
67 binary: binary-arch
68 .PHONY: build clean binary-arch binary install configure