File: rules

package info (click to toggle)
tomlplusplus 3.4.0%2Bds-0.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,860 kB
  • sloc: cpp: 52,214; python: 985; makefile: 25; sh: 17; ansic: 4
file content (33 lines) | stat: -rwxr-xr-x 1,119 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
#!/usr/bin/make -f

# optimize=-lto because I use Meson's LTO
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto qa=+all

%:
	dh $@ --buildsystem=meson

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
  test := true
else
  test := false
endif

override_dh_auto_configure:
	dh_auto_configure -- \
		-Db_lto=true \
		-Dbuild_tests=$(test) \
		-Dcompile_library=true \
		-Duse_vendored_libs=true

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
	echo '<meta name="color-scheme" content="light dark">' > README.html
	echo '<link rel="stylesheet" href="/usr/share/javascript/highlight.js/styles/default.css" media="(prefers-color-scheme: light)">' >> README.html
	echo '<link rel="stylesheet" href="/usr/share/javascript/highlight.js/styles/dark.css" media="(prefers-color-scheme: dark)">' >> README.html
	echo '<script src="/usr/share/javascript/highlight.js/highlight.min.js"></script>' >> README.html
	echo '<script>hljs.initHighlightingOnLoad();</script>' >> README.html
	cmark-gfm --unsafe --extension table README.md >> README.html
endif

execute_after_dh_clean:
	$(RM) README.html