File: rules

package info (click to toggle)
coreboot 4.15~dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 241,604 kB
  • sloc: ansic: 1,669,060; sh: 16,012; perl: 9,464; pascal: 9,098; asm: 8,353; makefile: 4,638; cpp: 4,049; python: 4,013; ada: 1,609; yacc: 1,261; lex: 731; sed: 75; lisp: 5; php: 2
file content (50 lines) | stat: -rwxr-xr-x 1,710 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
#!/usr/bin/make -f
export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

COREBOOT_UTILS = cbfstool cbmem ifdtool intelvbttool kbc1126 nvramtool
COREBOOT_UTILS_MAN = cbfs-compression-tool cbfstool ifdtool ifittool ifwitool intelvbttool rmodtool
ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 x32))
COREBOOT_UTILS += msrtool bucts ectool intelmetool inteltool pmh7tool superiotool
COREBOOT_UTILS_MAN +=     bucts ectool intelmetool inteltool pmh7tool superiotool
endif

%:
	dh $@ --with sphinxdoc

# this might become needed for other tools in the future
override_dh_auto_configure:
	@echo RUN CONFIGURE KEEPS FAILING ELEGANT WORKAROUND
#	$(SHELL export PREFIX=/usr;cd util/msrtool;./configure)
	cp debian/Makefile util/msrtool

override_dh_auto_build:
	for f in $(COREBOOT_UTILS); do \
		$(MAKE) -C util/$$f;   \
	done
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	# Build docs
	# Hack the Debian package version into the "release = " variable in Documentation/conf.py
	sed -i 's/^release =.*/release = "$(DEB_VERSION)"/' Documentation/conf.py
	PYTHONPATH=. http_proxy='http://127.0.0.1:9/' sphinx-build -N -E -bhtml Documentation build/html
endif

execute_before_dh_install-arch:
ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 x32))
	dh_install util/bucts/bucts usr/sbin
endif

execute_before_dh_installman-arch:
	mkdir -p debian/tmp
	# some executables do not support --help: fmaptool msrtool nvramtool
	for f in $(COREBOOT_UTILS_MAN); do \
		help2man -s8 -N -n "" -o debian/tmp/$$f.1 debian/coreboot-utils/usr/sbin/$$f; \
	done

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	dh_sphinxdoc -p coreboot-utils-doc
endif