Merge "2.13: Cleanup duplicate paragraph"
[lttng-docs.git] / Makefile
CommitLineData
7adf7ee2
PP
1# Copyright 2016 Philippe Proulx <pproulx@efficios.com>
2
f0287ae1
PP
3CONF = asciidoc.html5.conf
4PREFIX = lttng-docs
7adf7ee2 5ALLVERSIONS = $(sort $(wildcard 2.*))
f9167c82 6ALLCHECK = $(foreach v, $(ALLVERSIONS), check-$(v))
f0287ae1
PP
7
8ASCIIDOC = asciidoc -v -f $(CONF) -a source-highlighter=pygments
9RM = rm -rf
10
7adf7ee2
PP
11define vrule
12$(1)/$(PREFIX)-$(1).html: $(1)/$(PREFIX)-$(1).txt $(CONF)
13 $(ASCIIDOC) -a "lttng_version=$(1)" $(1)/$(PREFIX)-$(1).txt
f0287ae1 14
7adf7ee2 15.PHONY: $(1)
f0287ae1 16
7adf7ee2 17$(1): $(1)/$(PREFIX)-$(1).html
4026b681
PP
18
19view-$(1):
20 xdg-open $(1)/$(PREFIX)-$(1).html
21
22.PHONY: view-$(1)
f9167c82
KS
23
24check-$(1): $(1)/$(PREFIX)-$(1).txt $(CONF)
25 python3 tools/check.py $(1)/$(PREFIX)-$(1).txt
26
27.PHONY: check-$(1)
7adf7ee2 28endef
f0287ae1 29
7adf7ee2 30.PHONY: all
f0287ae1 31
7adf7ee2 32all: $(ALLVERSIONS)
f0287ae1 33
7adf7ee2 34$(foreach v,$(ALLVERSIONS),$(eval $(call vrule,$(v))))
f0287ae1 35
f9167c82
KS
36.PHONY: check
37
38check: $(ALLCHECK)
39
f0287ae1
PP
40.PHONY: clean
41
42clean:
7adf7ee2 43 $(RM) $(foreach v,$(ALLVERSIONS),$(v)/$(PREFIX)-$(v).html)
This page took 0.024017 seconds and 4 git commands to generate.