Commit | Line | Data |
---|---|---|
7adf7ee2 PP |
1 | # Copyright 2016 Philippe Proulx <pproulx@efficios.com> |
2 | ||
f0287ae1 PP |
3 | CONF = asciidoc.html5.conf |
4 | PREFIX = lttng-docs | |
7adf7ee2 | 5 | ALLVERSIONS = $(sort $(wildcard 2.*)) |
f0287ae1 PP |
6 | |
7 | ASCIIDOC = asciidoc -v -f $(CONF) -a source-highlighter=pygments | |
8 | RM = rm -rf | |
9 | ||
7adf7ee2 PP |
10 | define vrule |
11 | $(1)/$(PREFIX)-$(1).html: $(1)/$(PREFIX)-$(1).txt $(CONF) | |
12 | $(ASCIIDOC) -a "lttng_version=$(1)" $(1)/$(PREFIX)-$(1).txt | |
f0287ae1 | 13 | |
7adf7ee2 | 14 | .PHONY: $(1) |
f0287ae1 | 15 | |
7adf7ee2 | 16 | $(1): $(1)/$(PREFIX)-$(1).html |
4026b681 PP |
17 | |
18 | view-$(1): | |
19 | xdg-open $(1)/$(PREFIX)-$(1).html | |
20 | ||
21 | .PHONY: view-$(1) | |
7adf7ee2 | 22 | endef |
f0287ae1 | 23 | |
7adf7ee2 | 24 | .PHONY: all |
f0287ae1 | 25 | |
7adf7ee2 | 26 | all: $(ALLVERSIONS) |
f0287ae1 | 27 | |
7adf7ee2 | 28 | $(foreach v,$(ALLVERSIONS),$(eval $(call vrule,$(v)))) |
f0287ae1 PP |
29 | |
30 | .PHONY: clean | |
31 | ||
32 | clean: | |
7adf7ee2 | 33 | $(RM) $(foreach v,$(ALLVERSIONS),$(v)/$(PREFIX)-$(v).html) |