OCAMLABI := $(shell ocamlc -version)
OCAMLLIBDIR := $(shell ocamlc -where)
-OFILES := $(patsubst %.in,%,$(shell ls debian/*.in))
+OFILES_ALL := $(patsubst %.in,%,$(shell ls debian/*.in))
+OFILES := $(filter-out debian/rules, $(OFILES_ALL))
HAVE_OCAMLOPT := $(shell test -x /usr/bin/ocamlopt && echo "yes")
DEB_DH_GENCONTROL_ARGS = -- -VF:OCamlABI="$(OCAMLABI)"
DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(CURDIR)/debian/$(PKGNAME)$(OCAMLLIBDIR)
ocamlinit:
+ for f in $(OFILES_ALL); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
+
+makebuilddir/$(PKGNAME)::
for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
ifeq ($(HAVE_OCAMLOPT),yes)