File: rules

package info (click to toggle)
labltk 8.06.2+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,084 kB
  • ctags: 2,334
  • sloc: ml: 12,266; ansic: 1,014; makefile: 567; sh: 279; tcl: 2
file content (39 lines) | stat: -rwxr-xr-x 880 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
#!/usr/bin/make -f
# -*- makefile -*-

DESTDIR=$(CURDIR)/debian/tmp
include /usr/share/ocaml/ocamlvars.mk

OCAMLFIND_DESTDIR=$(DESTDIR)/$(OCAML_STDLIB_DIR)
export OCAMLFIND_DESTDIR

CONFIGURE_OPTS := -use-findlib -installbindir $(DESTDIR)/usr/bin

%:
	dh $@ --with ocaml

.PHONY: override_dh_auto_configure
override_dh_auto_configure:
	./configure $(CONFIGURE_OPTS)

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

.PHONY: override_dh_auto_install
override_dh_auto_install:
	mkdir -p $(OCAMLFIND_DESTDIR) $(OCAMLFIND_DESTDIR)/stublibs $(DESTDIR)/usr/bin
	dh_auto_install

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
	./configure $(CONFIGURE_OPTS)
	dh_auto_clean
	rm -f config/Makefile config/auto-aux/tst

.PHONY: override_dh_install
override_dh_install:
	dh_install --fail-missing -X.so.owner