1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/ocaml/ocamlvars.mk
include /usr/share/ocaml/ocamlinit.mk
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O3
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
%:
dh $@ --with ocaml
.PHONY: override_dh_auto_build
override_dh_auto_build:
$(MAKE) libagrep.a agrep.cma
ifneq ($(OCAML_OPT_ARCH),)
$(MAKE) agrep.cmxa
endif
.PHONY: override_dh_clean
override_dh_clean:
rm -rf debian/doc
.PHONY: override_dh_auto_install
override_dh_auto_install:
mkdir -p debian/tmp/$(OCAML_STDLIB_DIR)/agrep
# Default install doesn't handle no-ocamlopt platforms
cp $(wildcard *.cmi *.cma *.cmxa *.a *.so *.mli) debian/tmp/$(OCAML_STDLIB_DIR)/agrep
mkdir -p debian/doc/html
$(OCAML_OCAMLDOC) -html -m A -keep-code -d debian/doc/html agrep.mli
|