File: rules

package info (click to toggle)
ninja-build 1.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,160 kB
  • ctags: 1,510
  • sloc: cpp: 12,713; python: 1,196; ansic: 543; sh: 109; lisp: 39; makefile: 31
file content (46 lines) | stat: -rwxr-xr-x 1,325 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
#!/usr/bin/make -f

export DEB_CFLAGS_MAINT_APPEND=$(shell dpkg-buildflags --get CPPFLAGS)
export DEB_CXXFLAGS_MAINT_APPEND=$(shell dpkg-buildflags --get CPPFLAGS)
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

%:
	dh $@

override_dh_auto_configure:
	./configure.py --bootstrap --verbose

override_dh_auto_build:
	./ninja -v all
	./ninja -v manual
	help2man --include=debian/ninja.1.in --output=build/ninja.1 --no-info --no-discard-stderr ./ninja
	sed -i 's/\(default=\)[0-9]\+, \(derived from CPUs available\)/\1\2/g' build/ninja.1

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Deliberately ignore errors from ulimit.
	# It allows more tests to run but some archs/buildds have a lower hard limit.
	sh -c "ulimit -n 2000; ./ninja_test"
endif

override_dh_auto_install:
	# noop

override_dh_auto_clean:
	# noop

override_dh_clean:
	dh_clean
	test -x ninja && ./ninja -t clean || true
	find -type f -iname "*.pyc" | xargs rm -f
	rm -f null.o
	rm -f build.ninja
	rm -rf build

override_dh_install-arch:
	dh_install
	mv debian/ninja-build/usr/share/bash-completion/completions/bash-completion \
	   debian/ninja-build/usr/share/bash-completion/completions/ninja
	mv debian/ninja-build/usr/share/zsh/vendor-completions/zsh-completion \
	   debian/ninja-build/usr/share/zsh/vendor-completions/_ninja