File: rules

package info (click to toggle)
libmimic 1.0.4-2.3
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 3,612 kB
  • ctags: 116
  • sloc: sh: 8,357; ansic: 2,601; makefile: 71
file content (51 lines) | stat: -rwxr-xr-x 1,561 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
#!/usr/bin/make -f

buildbasedir := $(CURDIR)/debian/build
DEB_BUILDDIR := $(buildbasedir)

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)

PY_VERSIONS = $(shell pyversions --requested debian/control)

# Python rules
configure-stamp-%:
	mkdir $(buildbasedir)/$*
	cd $(buildbasedir)/$* && PYTHON=`which $*` $(DEB_CONFIGURE_SCRIPT_ENV) \
	    $(DEB_CONFIGURE_SCRIPT) \
		$(DEB_CONFIGURE_NORMAL_ARGS) \
		$(cdbs_configure_flags) \
		$(DEB_CONFIGURE_EXTRA_FLAGS) \
		$(DEB_CONFIGURE_USER_FLAGS)
	touch $@

configure/python-libmimic:: $(addprefix configure-stamp-, $(PY_VERSIONS))

build-stamp-%:
	make -C $(buildbasedir)/$*
	touch $@

build/python-libmimic:: $(addprefix build-stamp-, $(PY_VERSIONS))

install-stamp-%:
	make -C $(buildbasedir)/$* install DESTDIR=$(DEB_DESTDIR)
	# stop shipping *.a and *.la files for the Python module;
	# python-support moves them anyway (#412477)
	find $(DEB_DESTDIR)/usr/lib/$* -name \*.a -exec rm -f '{}' \;
	find $(DEB_DESTDIR)/usr/lib/$* -name \*.la -exec rm -f '{}' \;
	touch $@

install/python-libmimic:: $(addprefix install-stamp-, $(PY_VERSIONS))

binary-install/python-libmimic::
	dh_python2 -ppython-libmimic

clean::
	-rm -rf $(buildbasedir)
	-rm -rf $(addprefix configure-stamp-, $(PY_VERSIONS))
	-rm -rf $(addprefix build-stamp-, $(PY_VERSIONS))
	-rm -rf $(addprefix install-stamp-, $(PY_VERSIONS))