File: rules

package info (click to toggle)
uutf 1.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 220 kB
  • sloc: ml: 1,586; makefile: 29; sh: 18
file content (38 lines) | stat: -rwxr-xr-x 1,059 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
#!/usr/bin/make -f
# -*- makefile -*-

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

%:
	dh $@ --with ocaml

override_dh_auto_clean:
	ocaml pkg/pkg.ml clean

override_dh_auto_build:
	ocaml pkg/pkg.ml build --with-cmdliner true --tests true

override_dh_auto_test:
	ocaml pkg/pkg.ml test

debian/install_bytecode.sh:
	ocaml debian/installer-generator.ml

override_dh_auto_install:
ifeq (,$(filter pkg.uutf.noopam, $(DEB_BUILD_PROFILES)))
	for a in bytecode native; do \
	  mv debian/install_$$a.sh debian/install_$$a.sh.old; \
	done
	debian/rules debian/install_bytecode.sh
	diff -u debian/install_bytecode.sh.old debian/install_bytecode.sh
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
	diff -u debian/install_native.sh.old debian/install_native.sh
endif
	mv debian/install_bytecode.sh.old debian/install_bytecode.sh
	mv debian/install_native.sh.old debian/install_native.sh
endif
	OCAML_STDLIB_DIR=$(OCAML_STDLIB_DIR) debian/install_bytecode.sh
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
	OCAML_STDLIB_DIR=$(OCAML_STDLIB_DIR) debian/install_native.sh
endif