Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 DESTDIR=$(CURDIR)/debian/tmp
8
9 include /usr/share/ocaml/ocamlvars.mk
10
11 OCAMLFIND_DESTDIR=$(DESTDIR)/$(OCAML_STDLIB_DIR)
12 export OCAMLFIND_DESTDIR
13 OCAMLFIND_LDCONF=ignore
14 export OCAMLFIND_LDCONF
15
16 ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
17 CONF_OPTS=--enable-has-ocamlopt
18 else
19 CONF_OPTS=--disable-has-ocamlopt
20 endif
21
22 SETUP := ocaml -I +camlp-streams camlp_streams.cma setup.ml
23
24 %:
25 dh $@ --with ocaml
26
27 override_dh_auto_configure:
28 $(SETUP) -configure --prefix /usr --destdir '$(DESTDIR)' $(CONF_OPTS)
29
30 override_dh_auto_build:
31 $(SETUP) -build
32 $(SETUP) -doc
33
34 .PHONY: override_dh_auto_test
35 override_dh_auto_test:
36 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
37 $(SETUP) -test
38 endif
39
40 override_dh_auto_install:
41 mkdir -p '$(DESTDIR)/usr/bin'
42 mkdir -p '$(OCAMLFIND_DESTDIR)'
43 $(SETUP) -install
44
45 override_dh_auto_clean:
46 $(SETUP) -distclean