| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
include /usr/share/ocaml/ocamlvars.mk |
| 7 |
|
| 8 |
VIM_ADIR = $(CURDIR)/debian/coccinelle/usr/share/vim/addons |
| 9 |
VIM_RDIR = $(CURDIR)/debian/coccinelle/usr/share/vim/registry |
| 10 |
|
| 11 |
CONFIG_FLAGS = --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib \ |
| 12 |
--enable-ocaml --enable-python --with-python=python3 |
| 13 |
|
| 14 |
ifeq ($(DEB_BUILD_ARCH),armhf) |
| 15 |
|
| 16 |
CONFIG_FLAGS += --disable-opt |
| 17 |
else ifeq ($(DEB_BUILD_ARCH),riscv64) |
| 18 |
|
| 19 |
CONFIG_FLAGS += --disable-opt |
| 20 |
else ifeq ($(OCAML_NATDYNLINK),yes) |
| 21 |
CONFIG_FLAGS += --enable-opt |
| 22 |
else |
| 23 |
CONFIG_FLAGS += --disable-opt |
| 24 |
endif |
| 25 |
|
| 26 |
|
| 27 |
export FORCE_SOURCE_DATE = 1 |
| 28 |
|
| 29 |
%: |
| 30 |
dh $@ --with ocaml,python3,autoreconf |
| 31 |
|
| 32 |
override_dh_auto_configure: |
| 33 |
./configure $(CONFIG_FLAGS) |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
override_dh_auto_test-arch: |
| 39 |
$(MAKE) check || echo "IGNORING FAILED TESTS" |
| 40 |
|
| 41 |
override_dh_auto_test-indep: |
| 42 |
|
| 43 |
|
| 44 |
override_dh_auto_install-arch: |
| 45 |
$(MAKE) DESTDIR=$(CURDIR)/debian/coccinelle install install-bash |
| 46 |
|
| 47 |
|
| 48 |
install -d $(VIM_ADIR)/ftdetect $(VIM_ADIR)/syntax |
| 49 |
cp $(CURDIR)/editors/vim/ftdetect/cocci.vim $(VIM_ADIR)/ftdetect/ |
| 50 |
cp $(CURDIR)/editors/vim/syntax/cocci.vim $(VIM_ADIR)/syntax/ |
| 51 |
install -d $(VIM_RDIR) |
| 52 |
cp $(CURDIR)/debian/coccinelle.yaml $(VIM_RDIR)/ |
| 53 |
|
| 54 |
|
| 55 |
cp $(CURDIR)/editors/emacs/cocci.el $(CURDIR)/debian/coccinelle/usr/share/emacs/site-lisp/ |
| 56 |
|
| 57 |
override_dh_auto_install-indep: |
| 58 |
|
| 59 |
|
| 60 |
override_dh_compress: |
| 61 |
dh_compress -X.pdf -X.cocci -X.c |