File: rules

package info (click to toggle)
coreboot 25.09%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 217,084 kB
  • sloc: ansic: 1,685,313; sh: 15,803; python: 11,200; perl: 10,186; asm: 8,519; makefile: 5,179; cpp: 4,724; pascal: 2,327; ada: 1,985; yacc: 1,264; lex: 731; sed: 75; ruby: 5; lisp: 5; awk: 4
file content (47 lines) | stat: -rwxr-xr-x 1,494 bytes parent folder | download | duplicates (2)
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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export TOOLCFLAGS = -Wno-error -g

include /usr/share/dpkg/default.mk

COREBOOT_UTILS = cbfstool cbmem ifdtool intelvbttool kbc1126 nvramtool
ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 x32))
COREBOOT_UTILS += bucts ectool intelmetool inteltool msrtool pmh7tool superiotool
endif

%:
	dh $@ --with sphinxdoc

override_dh_auto_configure:
	# util/msrtool/configure is hardcoded in several places (e.g. PREFIX=/usr/local)
	# replace it with a simple substitution. Previously was copied from d/Makefile
	sed -e "s#@VERSION@#${DEB_VERSION}#g" -e "s#@CC@#${CC}#g" -e "s#@CFLAGS@#${CFLAGS}#g" \
		-e "s#@LDFLAGS@#${LDFLAGS} -lpci#g" -e "s#@INSTALL@#install#g" -e "s#@PREFIX@#/usr#g" \
		util/msrtool/Makefile.in > util/msrtool/Makefile

override_dh_auto_build:
	set -e; \
	for f in $(COREBOOT_UTILS); do \
		$(MAKE) -C util/$$f;   \
	done
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	# Build docs
	PYTHONPATH=. DEB_VERSION=$(DEB_VERSION) http_proxy='http://127.0.0.1:9/' \
			sphinx-build -N -E -bhtml Documentation build/html
endif

override_dh_clean:
	# TAGS gets cleaned by builtin db_clean, but this is upstream tracked
	dh_auto_clean
	dh_clean --exclude=src/sbom/TAGS

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

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