File: rules

package info (click to toggle)
mysql-ocaml 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 484 kB
  • ctags: 776
  • sloc: ansic: 963; ml: 732; sh: 153; makefile: 67; perl: 41
file content (48 lines) | stat: -rwxr-xr-x 1,070 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

#export DH_VERBOSE=1

include /usr/share/ocaml/ocamlvars.mk

DESTDIR = $(CURDIR)/debian/tmp/$(OCAML_STDLIB_DIR)

CFLAGS = -Wall -g -fPIC

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL_PROGRAM += -s
endif

.PHONY: override_dh_auto_configure
override_dh_auto_configure:
	CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
	 --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info

.PHONY: override_dh_auto_build
override_dh_auto_build:
	$(MAKE) all
ifneq ($(OCAML_OPT_ARCH),)
	$(MAKE) opt
endif

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
	rm -f build-stamp
	[ ! -f Makefile ] || $(MAKE) clean
	rm -f config.log config.status Makefile

.PHONY: override_dh_auto_install
override_dh_auto_install:
	mkdir -p $(DESTDIR)
	$(MAKE) install OCAMLFIND_DESTDIR=$(DESTDIR) OCAMLFIND_LDCONF=ignore

.PHONY: override_dh_installchangelogs
override_dh_installchangelogs:
	dh_installchangelogs CHANGES

%:
	dh $@ --with ocaml