File: rules

package info (click to toggle)
microprofile 4.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,960 kB
  • sloc: cpp: 17,692; asm: 372; ansic: 265; makefile: 257; sh: 36
file content (33 lines) | stat: -rwxr-xr-x 1,267 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto qa=+all
export DEB_CPPFLAGS_MAINT_APPEND = -DMICROPROFILE_API='__attribute__ ((visibility ("default")))'

%:
	dh $@ --buildsystem=meson

# create microprofile_html.h
execute_before_dh_auto_configure:
	$(MAKE) -C src

override_dh_auto_configure:
	dh_auto_configure -- -Db_lto=true

# Convert Markdown to HTML, and use CSS' color-scheme property together with
# highlight.js to highlight code blocks.
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 README.md >> README.html
endif

override_dh_installexamples:
	dh_installexamples -X.vcxproj -X.sln -X.bat

execute_after_dh_auto_clean:
	$(MAKE) -C src clean
	$(RM) README.html