File: rules

package info (click to toggle)
menhir 20181113-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,992 kB
  • sloc: ml: 21,252; makefile: 425; sh: 90; lisp: 8
file content (41 lines) | stat: -rwxr-xr-x 807 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
#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1

include /usr/share/ocaml/ocamlvars.mk

DESTDIR := $(CURDIR)/debian/tmp
export OCAMLFIND_DESTDIR := $(DESTDIR)/$(OCAML_STDLIB_DIR)
BEST := native
ifneq ($(OCAML_BEST),opt)
BEST = byte
endif


override_dh_auto_build:
	$(MAKE) TARGET=$(BEST) PREFIX=/usr

override_dh_auto_clean:
	$(MAKE) -C src/ clean PREFIX=$(DESTDIR)/usr

override_dh_auto_install:
	mkdir -p $(OCAMLFIND_DESTDIR)
	$(MAKE) TARGET=$(BEST) PREFIX=$(DESTDIR)/usr install

override_dh_installexamples:
	dh_installexamples
	if [ -d debian/menhir-doc/usr/share/doc/menhir/examples ]; \
	then \
	  find debian/menhir-doc/usr/share/doc/menhir/examples \
	    -name .gitignore -delete ; \
	fi


override_dh_missing:
	dh_missing --fail-missing

override_dh_auto_test:

%:
	dh $@ --with ocaml