diff options
author | Loïc Hoguin <[email protected]> | 2018-08-16 15:54:16 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-08-16 15:54:16 +0200 |
commit | abe4ff5ca5c6c74c4c1562c38d74ab232607312b (patch) | |
tree | d4c1fcc0d8e5a3932d8aed0732f4afb95f66741e /Makefile | |
parent | 2a19b0fab81e4f4aec444ab37caff34c18d51017 (diff) | |
download | asciideck-abe4ff5ca5c6c74c4c1562c38d74ab232607312b.tar.gz asciideck-abe4ff5ca5c6c74c4c1562c38d74ab232607312b.tar.bz2 asciideck-abe4ff5ca5c6c74c4c1562c38d74ab232607312b.zip |
Run groff against projects that use Asciideck for their manual
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -21,3 +21,38 @@ AUTO_CI_HIPE ?= OTP-LATEST AUTO_CI_WINDOWS ?= OTP-19+ include erlang.mk + +# Test building documentation of projects that use Asciideck +# and run Groff checks against the output. +# +# We only run against asciidoc-manual because the guide requires +# the DocBook toolchain at this time. + +.PHONY: groff + +GROFF_PROJECTS = cowboy gun ranch + +tests:: groff + +groff: $(addprefix groff-,$(GROFF_PROJECTS)) + +$(ERLANG_MK_TMP)/groff: + $(verbose) mkdir -p $@ + +define groff_targets +$(ERLANG_MK_TMP)/groff/$1: | $(ERLANG_MK_TMP)/groff + $(verbose) rm -rf $$@ + $(verbose) git clone -q --depth 1 -- $(call dep_repo,$1) $$@ + $(verbose) mkdir $$@/deps + $(verbose) ln -s $(CURDIR) $$@/deps/asciideck + $(verbose) cp $(CURDIR)/erlang.mk $$@/ + +groff-$1: $(ERLANG_MK_TMP)/groff/$1 + $(gen_verbose) $(MAKE) -C $$^ asciidoc-manual + $(verbose) for f in $$^/doc/man*/*.gz; do \ + echo " GROFF " `basename "$$$$f"`; \ + zcat "$$$$f" | groff -man -rD1 -z -ww; \ + done +endef + +$(foreach p,$(GROFF_PROJECTS),$(eval $(call groff_targets,$p))) |