X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=Makefile;h=0271a0db0c21b2794cf26e36664ad09fe10c2053;hb=7568806b93c22a44465fd55d35a50c7030a3c15e;hp=a66e8e14d5667c3597b658641b613f5220443a7d;hpb=f0287ae19ba24983cb17b0614879195ffd051e77;p=lttng-docs.git diff --git a/Makefile b/Makefile index a66e8e1..0271a0d 100644 --- a/Makefile +++ b/Makefile @@ -1,28 +1,33 @@ +# Copyright 2016 Philippe Proulx + CONF = asciidoc.html5.conf PREFIX = lttng-docs -ALLVERSIONS = 2.5 2.6 2.7 +ALLVERSIONS = $(sort $(wildcard 2.*)) ASCIIDOC = asciidoc -v -f $(CONF) -a source-highlighter=pygments RM = rm -rf -htmldst = $(1)/$(PREFIX)-$(1).html +define vrule +$(1)/$(PREFIX)-$(1).html: $(1)/$(PREFIX)-$(1).txt $(CONF) + $(ASCIIDOC) -a "lttng_version=$(1)" $(1)/$(PREFIX)-$(1).txt -.PHONY: all +.PHONY: $(1) -all: $(ALLVERSIONS) +$(1): $(1)/$(PREFIX)-$(1).html -.PHONY: $(ALLVERSIONS) +view-$(1): + xdg-open $(1)/$(PREFIX)-$(1).html -2.5: $(call htmldst,2.5) +.PHONY: view-$(1) +endef -2.6: $(call htmldst,2.6) +.PHONY: all -2.7: $(call htmldst,2.7) +all: $(ALLVERSIONS) -%.html: %.txt $(CONF) - $(ASCIIDOC) $< +$(foreach v,$(ALLVERSIONS),$(eval $(call vrule,$(v)))) .PHONY: clean clean: - $(RM) $(foreach version,$(ALLVERSIONS),$(call htmldst,$(version))) + $(RM) $(foreach v,$(ALLVERSIONS),$(v)/$(PREFIX)-$(v).html)