File: rules

package info (click to toggle)
device-tree-compiler 1.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,116 kB
  • sloc: ansic: 13,916; sh: 1,200; asm: 713; lex: 522; python: 507; yacc: 499; makefile: 313; perl: 74
file content (47 lines) | stat: -rwxr-xr-x 1,441 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
#!/usr/bin/make -f
# -*- makefile -*-

# reproducible builds: texlive needs FORCE_SOURCE_DATE set in order to
# respect SOURCE_DATE_EPOCH.
export FORCE_SOURCE_DATE=1

include /usr/share/dpkg/pkg-info.mk
export SETUPTOOLS_SCM_PRETEND_VERSION=$(DEB_VERSION_UPSTREAM)
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

include /usr/share/dpkg/architecture.mk
ifeq ($(origin CC),default)
export CC = $(DEB_HOST_GNU_TYPE)-gcc
endif

include /usr/share/dpkg/buildflags.mk
EXTRA_CFLAGS = $(CFLAGS) -Wno-error
CPPFLAGS += -I libfdt -I .

include /usr/share/dpkg/buildtools.mk
NO_VALGRIND := $(shell $(PKG_CONFIG) --exists valgrind; echo $$?)
ifeq ($(NO_VALGRIND),1)
       CPPFLAGS += -DNO_VALGRIND
endif

%:
	dh $@ --with python3

override_dh_auto_build:
	dh_auto_build -- V=1 EXTRA_CFLAGS="$(EXTRA_CFLAGS)" CPPFLAGS="$(CPPFLAGS)"
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	$(MAKE) -C Documentation
endif

override_dh_auto_install:
	NO_PYTHON=1 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp PREFIX=/usr LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
	$(MAKE) maybe_install_pylibfdt EXTRA_CFLAGS="$(EXTRA_CFLAGS)" PREFIX=$(CURDIR)/debian/tmp/usr

override_dh_auto_test:
	dh_auto_test -- V=1 EXTRA_CFLAGS="$(EXTRA_CFLAGS)" CPPFLAGS="$(CPPFLAGS)"

override_dh_auto_clean:
	dh_auto_clean
	[ ! -f Documentation/Makefile ] || $(MAKE) -C Documentation clean
	[ ! -d build ] || rm -rf build
	[ ! -d pylibfdt/libfdt.egg-info/ ] || rm -rf pylibfdt/libfdt.egg-info/