X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Focaml-http%2Fdebian%2Frules;h=bde0727440b5c0279bbaa2a28d9a4787cf55cf84;hb=a7063fc0997a9d9eae6c329443e67ab92c4b6a0f;hp=d7f5ed8a2d61e0af9902adf6ab93ad184a7cafc1;hpb=b9b45789c66f82caa71363fb34487d0adaf4497c;p=helm.git diff --git a/helm/DEVEL/ocaml-http/debian/rules b/helm/DEVEL/ocaml-http/debian/rules index d7f5ed8a2..bde072744 100755 --- a/helm/DEVEL/ocaml-http/debian/rules +++ b/helm/DEVEL/ocaml-http/debian/rules @@ -1,47 +1,20 @@ #!/usr/bin/make -f +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk -#export DH_VERBOSE=1 +PKGNAME = libhttp-ocaml-dev -TARGETDIR = $(CURDIR)/debian/libhttp-ocaml-dev -OCAML_LIB_DIR = $(shell ocamlc -where) +OCAMLABI := $(shell ocamlc -version) +OCAMLLIBDIR := $(shell ocamlc -where) +OFILES := $(patsubst %.in,%,$(shell ls debian/*.in)) +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) -build: build-stamp -build-stamp: - dh_testdir - $(MAKE) all - if [ -x /usr/bin/ocamlopt ]; then $(MAKE) opt; else true; fi - touch build-stamp +ocamlinit: + for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done -clean: - dh_testdir - dh_testroot - rm -f build-stamp - -$(MAKE) distclean - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - $(MAKE) install DESTDIR=$(TARGETDIR)$(OCAML_LIB_DIR) - $(MAKE) doc - -binary-arch: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installexamples - dh_installchangelogs - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-arch -.PHONY: build clean binary-arch binary install +ifeq ($(HAVE_OCAMLOPT),yes) +build/$(PKGNAME):: + $(MAKE) opt +endif