File: rules

package info (click to toggle)
findlib 1.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,800 kB
  • ctags: 867
  • sloc: ml: 5,871; xml: 2,964; sh: 1,436; makefile: 364
file content (54 lines) | stat: -rwxr-xr-x 1,448 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/ocaml/ocamlvars.mk

%:
	dh $@ --with ocaml

.PHONY: override_dh_auto_configure
override_dh_auto_configure:
	./configure \
		-config /etc/ocamlfind.conf \
		-bindir /usr/bin \
		-sitelib $(OCAML_STDLIB_DIR) \
		-mandir /usr/share/man \
		-no-camlp4 \
		-with-toolbox

.PHONY: override_dh_auto_build
override_dh_auto_build:
	$(MAKE)
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
	$(MAKE) opt
endif

.PHONY: override_dh_auto_install
override_dh_auto_install:
	$(MAKE) install prefix=$(CURDIR)/debian/tmp
# rm ocamlc.opt and similar settings, they're not avail everywhere in debian
	grep -v \\.opt debian/tmp/etc/ocamlfind.conf > debian/ocamlfind.conf.new
	sed -i -e 's/@OCamlABI@/$(OCAML_ABI)/g' debian/ocamlfind.conf.new
	mv debian/ocamlfind.conf.new debian/tmp/etc/ocamlfind.conf
# rm empty man3 dir
	test -d $(CURDIR)/debian/tmp/usr/share/man/man3 && \
		rmdir $(CURDIR)/debian/tmp/usr/share/man/man3

# do not strip executables on bytecode executables (is this still needed?)
ifneq ($(OCAML_HAVE_OCAMLOPT),yes)
.PHONY: override_dh_strip
override_dh_strip:
endif

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
	if [ -f Makefile.config ]; then $(MAKE) clean; fi
	-rm -f Makefile.config ocargs.log src/findlib/ocaml_args.ml
	-rm -Rf site-lib-src/camlp4/

.PHONY: override_dh_install
override_dh_install:
	dh_install --fail-missing