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 PP |
16 | $(1): $(1)/$(PREFIX)-$(1).html |
17 | endef | |
f0287ae1 | 18 | |
7adf7ee2 | 19 | .PHONY: all |
f0287ae1 | 20 | |
7adf7ee2 | 21 | all: $(ALLVERSIONS) |
f0287ae1 | 22 | |
7adf7ee2 | 23 | $(foreach v,$(ALLVERSIONS),$(eval $(call vrule,$(v)))) |
f0287ae1 PP |
24 | |
25 | .PHONY: clean | |
26 | ||
27 | clean: | |
7adf7ee2 | 28 | $(RM) $(foreach v,$(ALLVERSIONS),$(v)/$(PREFIX)-$(v).html) |