File: Makefile

package info (click to toggle)
rear 2.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,332 kB
  • sloc: sh: 19,302; makefile: 286; xml: 282
file content (43 lines) | stat: -rw-r--r-- 803 bytes parent folder | download | duplicates (4)
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
SHELL=/bin/bash

prefix = /usr
datadir = $(prefix)/share
mandir = $(datadir)/man

adoctargets = $(shell echo *.adoc)
htmltargets = $(patsubst %.adoc, %.html, $(adoctargets))

asciidoc := $(shell if type -p asciidoctor >/dev/null; then echo asciidoctor; else echo asciidoc; fi)

all: docs

dist: docs

man: rear.8

docs: rear.8 $(htmltargets)
	make -C user-guide docs

install: rear.8
	install -Dp -m0644 rear.8 $(DESTDIR)$(mandir)/man8/rear.8

clean:
	rm -f unconv.8 *.html *.xml
	make -C user-guide clean

%.8.html: %.8.adoc
	$(asciidoc) -a footer-style=none -d manpage $<

ifeq ($(asciidoc),asciidoc)
%.8.xml: %.8.adoc
	$(asciidoc) -b docbook -d manpage $<

%.8: %.8.xml
	xmlto man $<
else
%.8: %.8.adoc
	$(asciidoc) -b manpage -d manpage $<
endif

%.html: %.adoc
	$(asciidoc) -a footer-style=none $<