File: rules

package info (click to toggle)
cothreads 0.10-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 500 kB
  • sloc: ml: 1,963; makefile: 216
file content (19 lines) | stat: -rwxr-xr-x 630 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
#!/usr/bin/make -f

include /usr/share/ocaml/ocamlvars.mk

INSTALLLIBDIR := $(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)/cothreads
UPSTREAM_VERSION := $(shell dpkg-parsechangelog -S version | { read u; echo $${u%-*}; })

%:
	dh $@ --with ocaml

override_dh_auto_build:
	$(MAKE) all NATIVE=$(OCAML_HAVE_OCAMLOPT)

override_dh_auto_install:
	$(MAKE) install INSTALLLIBDIR=$(INSTALLLIBDIR) NATIVE=$(OCAML_HAVE_OCAMLOPT)
	sed "s/@VERSION@/$(UPSTREAM_VERSION)/g" '$(CURDIR)/debian/META.cothreads' > $(INSTALLLIBDIR)/META

override_dh_ocaml:
	dh_ocaml --nodefined-map libcothreads-ocaml-dev:Mutex,Thread,Event,Condition,ThreadUnix,Semaphore