File: rules

package info (click to toggle)
ocaml-atd 2.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,856 kB
  • sloc: ml: 37,031; sh: 218; makefile: 92; java: 76; python: 31
file content (46 lines) | stat: -rwxr-xr-x 1,143 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
#!/usr/bin/make -f
# -*- makefile -*-

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

include /usr/share/dpkg/pkg-info.mk
include /usr/share/ocaml/ocamlvars.mk

export PATH := $(CURDIR)/_tmp/usr/bin:$(PATH)
export OCAMLPATH := $(CURDIR)/_tmp$(OCAML_STDLIB_DIR)

DUNE_INSTALL := dune install --destdir=$(CURDIR)/_tmp --prefix=/usr --libdir=..$(OCAML_STDLIB_DIR)

%:
	dh $@ --with ocaml

override_dh_auto_clean:
	dh_auto_clean
	rm -rf _tmp

override_dh_auto_build:
	dune build -p atdgen-codec-runtime
	$(DUNE_INSTALL) atdgen-codec-runtime
	dune build -p atd
	$(DUNE_INSTALL) atd
	dune build -p atdgen-runtime
	$(DUNE_INSTALL) atdgen-runtime
	dune build -p atdgen
	$(DUNE_INSTALL) atdgen
	echo 'let version = "$(DEB_VERSION_UPSTREAM)"' > atd_version.ml
	$(MAKE) -C manual

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dune runtest -p atdgen-codec-runtime
	dune runtest -p atd
	dune runtest -p atdgen-runtime
	dune runtest -p atdgen
endif

override_dh_auto_install:
	rm -rf debian/tmp
	cp -a _tmp debian/tmp
	rm -rf debian/tmp/usr/doc/atdgen*runtime debian/tmp/usr/doc/*/LICENSE.md