#!/usr/bin/make -f include /usr/share/ocaml/ocamlvars.mk OCAML_NATIVE_ARCHS := $(subst lpia,,$(OCAML_NATIVE_ARCHS)) BUILDDIR=debian/tmp export OCAMLFIND_DESTDIR=$(OCAML_STDLIB_DIR) %: dh $@ --with ocaml,tex override_dh_auto_configure: autoconf dh_auto_configure -- \ --disable-emacs-compilation \ --disable-coq-libs \ --libdir=$(OCAML_STDLIB_DIR) override_dh_auto_build-arch: $(MAKE) all byte # MATHJAXBAD="https://cdn\.jsdelivr\.net/npm/mathjax.*\.js" # MATHJAXLOCAL="/usr/share/javascript/mathjax/MathJax.js" # override_dh_auto_build-indep: # $(MAKE) doc # cd doc/html; \ # for f in *.html; do \ # sed -e "s|$(MATHJAXBAD)|$(MATHJAXLOCAL)|" $$f > $$f.out; \ # mv $$f.out $$f; \ # done override_dh_auto_install: # do nothing override_dh_install-arch: build-arch $(MAKE) install install-lib DESTDIR=$(CURDIR)/$(BUILDDIR) dh_install -a -XLICENSE override_dh_install-indep: # do nothing override_dh_installexamples: dh_installexamples if [ -d debian/why3-examples/usr/share/doc/why3-examples/examples ]; \ then \ find debian/why3-examples/usr/share/doc/why3-examples/examples \ -name why3shapes.gz \ -exec sh -c 'if [ $$(zcat {} | wc -c) -eq 0 ]; then \rm {}; fi' \;;\ fi override_dh_compress: dh_compress -Xmanual.pdf ifneq ($(wildcard debian/why3$(OCAML_STDLIB_DIR)/why3/commands/why3ide.cmxs),) WHY3IDE_UNITS := $(shell ocamlobjinfo debian/why3$(OCAML_STDLIB_DIR)/why3/commands/why3ide.cmxs | sed -n 's/Name: //p' | xargs echo | tr ' ' ,) else WHY3IDE_UNITS := $(shell ocamlobjinfo debian/why3$(OCAML_STDLIB_DIR)/why3/commands/why3ide.cma | sed -n 's/Unit name: //p' | xargs echo | tr ' ' ,) endif WHY3HYPO_UNITS := $(shell ocamlobjinfo debian/why3$(OCAML_STDLIB_DIR)/why3/plugins/hypothesis_selection.cma | sed -n 's/Unit name: //p' | xargs echo | tr ' ' ,) override_dh_ocaml: dh_ocaml --nodefined-map=why3:$(WHY3IDE_UNITS),$(WHY3HYPO_UNITS)