File: rules

package info (click to toggle)
eye 1%3A10.30.11~ds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 96,936 kB
  • sloc: perl: 12,775; sh: 401; makefile: 27
file content (44 lines) | stat: -rwxr-xr-x 1,176 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
#!/usr/bin/make -f

# generate documentation unless nodoc requested
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
DOCS_stem = README $(filter-out documentation/docker,$(basename $(wildcard documentation/*.md)))
DOCS = $(addsuffix .html,$(DOCS_stem)) $(addsuffix .txt,$(DOCS_stem))
MANPAGES = debian/$(cmd).1
endif

PROLOG_ABI = $(shell swipl --abi_version | sed 's/^swipl-abi-//')

cmd = eye

# generate manpage with help2man from --help option of executable
_mkman = help2man $(if $3,--name "$(strip $3)") --no-info --no-discard-stderr --output $2 $1 \
 || { $1 --help; false; }

%:
	dh $@

%.html: %.md
	cmark-gfm $< > $@

%.txt: %.md
	cmark-gfm --to plaintext $< > $@

override_dh_auto_build:
	swipl -o eye --emulator=/usr/bin/swipl -g main -c eye.pl -- --image $(cmd)

execute_after_dh_auto_build: $(DOCS) $(MANPAGES)

override_dh_installdocs:
	dh_installdocs --all -- $(DOCS)

override_dh_installchangelogs:
	dh_installchangelogs RELEASE

override_dh_gencontrol:
	dh_gencontrol -- -V"prolog:ABI=$(PROLOG_ABI)"

# build manpage
debian/$(cmd).1: debian/%.1: debian/fake_bin/% %
	$(call _mkman, $<, $@, \
		Euler Yet another proof Engine (EYE) semantic web reasoning engine)