File: rules

package info (click to toggle)
ninja-build 1.13.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,816 kB
  • sloc: cpp: 21,348; python: 2,473; ansic: 790; sh: 118; makefile: 20
file content (31 lines) | stat: -rwxr-xr-x 1,274 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
#!/usr/bin/make -f

%:
	dh $@ --builddirectory=build

override_dh_auto_configure:
	# upstream enables LTO only for the "Release" build type but Debian
	# uses the custom "None" type, so enable LTO here for all types
	dh_auto_configure -- -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DNINJA_PYTHON=python3

ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
execute_after_dh_auto_build:
	# create build.ninja file with the "manual" target
	./configure.py
	build/ninja -v manual
	help2man --include=debian/ninja.1.in --output=build/ninja.1.org --no-info --no-discard-stderr build/ninja
	sed 's/\(default=\)[0-9]\+ on this system/\1\#CPUs/' build/ninja.1.org > build/ninja.1
	if cmp --silent build/ninja.1.org build/ninja.1; then echo "sed pattern not found"; exit 1; fi
endif

override_dh_auto_test:
	# 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; build/ninja_test"

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