File: rules

package info (click to toggle)
device-tree-compiler 1.6.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,008 kB
  • sloc: ansic: 13,376; sh: 1,109; asm: 703; lex: 522; yacc: 479; python: 478; makefile: 299; perl: 74
file content (38 lines) | stat: -rwxr-xr-x 1,174 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
#!/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 .

%:
	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_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/