File: rules

package info (click to toggle)
android-platform-build-kati 10.0.0%2Br32%2Bgit20220314.09dfa26c4e59-7.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,628 kB
  • sloc: cpp: 10,340; sh: 1,087; python: 85; makefile: 46
file content (38 lines) | stat: -rwxr-xr-x 942 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

export KATI_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS)

%:
	dh $@ $(WITH_GOLANG)

execute_before_dh_auto_build: debian/ckati.1
	mkdir -p obj-$(DEB_HOST_GNU_TYPE)/src out
	[ -d obj-$(DEB_HOST_GNU_TYPE)/src/github.com ] || ln -sf /usr/share/gocode/src/github.com obj-$(DEB_HOST_GNU_TYPE)/src
	echo '// +build ignore' > out/version.cc
	echo >> out/version.cc
	echo 'const char* kGitVersion = "Debian";' >> out/version.cc
ifeq (,$(filter nogolang,$(DEB_BUILD_PROFILES)))
	dh_auto_build --buildsystem=golang

execute_after_dh_auto_clean:
	dh_auto_clean --buildsystem=golang

execute_after_dh_auto_configure:
	dh_auto_configure --buildsystem=golang
	rm -rf obj-$(DEB_HOST_GNU_TYPE)/src/github.com/google/kati/testcase

override_dh_dwz:
	-dh_dwz

WITH_GOLANG = --with=golang
endif

%.1: %.md
	debian/md2man $< $@

override_dh_auto_test:
	-dh_auto_test