File: rules

package info (click to toggle)
coccinelle 1.0.8.deb-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 26,148 kB
  • sloc: ml: 136,392; ansic: 23,594; sh: 2,189; makefile: 2,157; perl: 1,576; lisp: 840; python: 823; awk: 70; csh: 12
file content (54 lines) | stat: -rwxr-xr-x 1,320 bytes parent folder | download
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/ocaml/ocamlvars.mk

VIM_ADIR = $(CURDIR)/debian/coccinelle/usr/share/vim/addons
VIM_RDIR = $(CURDIR)/debian/coccinelle/usr/share/vim/registry

CONFIG_FLAGS = --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib \
  --enable-ocaml --enable-python

ifeq ($(OCAML_NATDYNLINK),yes)
CONFIG_FLAGS += --enable-opt
else
CONFIG_FLAGS += --disable-opt
endif

%:
	dh $@ --with ocaml,python3,autoreconf

override_dh_auto_configure:
	./configure $(CONFIG_FLAGS)

override_dh_auto_build-indep:
	$(MAKE) -C docs/manual pdf

override_dh_auto_test-arch:
	$(MAKE) check || echo "IGNORING FAILED TESTS"

override_dh_auto_test-indep:
	# nothing

override_dh_auto_install-arch:
	$(MAKE) DESTDIR=$(CURDIR)/debian/coccinelle install install-bash

	# Vim files
	install -d $(VIM_ADIR)/ftdetect $(VIM_ADIR)/syntax
	cp $(CURDIR)/editors/vim/ftdetect/cocci.vim $(VIM_ADIR)/ftdetect/
	cp $(CURDIR)/editors/vim/syntax/cocci.vim $(VIM_ADIR)/syntax/
	install -d $(VIM_RDIR)
	cp $(CURDIR)/debian/coccinelle.yaml $(VIM_RDIR)/

	# Emacs files
	cp $(CURDIR)/editors/emacs/cocci.el $(CURDIR)/debian/coccinelle/usr/share/emacs/site-lisp/

override_dh_auto_install-indep:
	# Nothing

override_dh_compress:
	dh_compress -X.pdf -X.cocci -X.c

override_dh_dwz: