2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
8 OCAMLABI := $(shell ocamlc -version)
9 OCAMLLIBDIR := $(shell ocamlc -where)
10 OFILES := $(patsubst %.in,%,$(shell ls debian/*.in))
13 for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
14 configure: configure-stamp
21 build: configure-stamp build-stamp
26 if [ -x /usr/bin/ocamlopt ]; then $(MAKE) opt; else true; fi
33 rm -f build-stamp configure-stamp
45 mkdir -p debian/tmp$(OCAMLLIBDIR)
46 $(MAKE) install PREFIX=debian/tmp$(OCAMLLIBDIR)
48 binary-arch: build install
56 dh_installchangelogs ChangeLog
63 dh_gencontrol -- -VF:OCamlABI="$(OCAMLABI)"
68 .PHONY: build clean binary-arch binary install configure