Debian Codegraph @

doc/Makefile

raw symbols SCIP
1 SHELL=/bin/bash
2
3 # disable parallel execution of make
4 .NOTPARALLEL:
5
6 prefix = /usr
7 datadir = $(prefix)/share
8 mandir = $(datadir)/man
9
10 adoctargets = $(shell echo *.adoc)
11 htmltargets = $(patsubst %.adoc, %.html, $(adoctargets))
12
13 # asciidoctor is in Ruby and used on Debian and SUSE and can generate manpages directly
14 # asciidoc is in Python and used on Fedora and RHEL and cannot generate manpages, so we use xmlto to convert docbooc to manpage
15 asciidoc := $(shell if type -p asciidoctor >/dev/null; then echo asciidoctor; else echo asciidoc; fi) -a webfonts!
16
17 all: docs
18
19 dist: docs
20
21 man: rear.8
22
23 docs: rear.8 $(htmltargets)
24 make -C user-guide docs
25
26 install: rear.8
27 install -Dp -m0644 rear.8 $(DESTDIR)$(mandir)/man8/rear.8
28
29 clean:
30 rm -f unconv.8 *.html *.xml
31 make -C user-guide clean
32
33 %.8.html: %.8.adoc
34 $(asciidoc) -a footer-style=none -d manpage $<
35
36 ifeq ($(asciidoc),asciidoc)
37 %.8.xml: %.8.adoc
38 $(asciidoc) -b docbook -d manpage $<
39
40 %.8: %.8.xml
41 xmlto man $<
42 else
43 %.8: %.8.adoc
44 $(asciidoc) -b manpage -d manpage $<
45 endif
46
47 %.html: %.adoc
48 $(asciidoc) -a footer-style=none $<