]> matita.cs.unibo.it Git - helm.git/blob - DEVEL/ocaml-http/debian/rules
when auto_close is set, use flush + shutdown instead of close_out, work around an...
[helm.git] / DEVEL / ocaml-http / debian / rules
1 #!/usr/bin/make -f
2 include /usr/share/cdbs/1/rules/debhelper.mk
3 include /usr/share/cdbs/1/class/makefile.mk
4
5 PKGNAME = libhttp-ocaml-dev
6
7 OCAMLABI := $(shell ocamlc -version)
8 OCAMLLIBDIR := $(shell ocamlc -where)
9 OFILES_ALL := $(patsubst %.in,%,$(shell ls debian/*.in))
10 OFILES := $(filter-out debian/rules, $(OFILES_ALL))
11 HAVE_OCAMLOPT := $(shell test -x /usr/bin/ocamlopt && echo "yes")
12 DEB_DH_GENCONTROL_ARGS = -- -VF:OCamlABI="$(OCAMLABI)"
13 DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(CURDIR)/debian/$(PKGNAME)$(OCAMLLIBDIR)
14
15 ocamlinit:
16         for f in $(OFILES_ALL); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
17
18 makebuilddir/$(PKGNAME)::
19         for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
20
21 ifeq ($(HAVE_OCAMLOPT),yes)
22 build/$(PKGNAME)::
23         $(MAKE) opt
24 endif