diff --git a/Makefile.am b/Makefile.am index f4df7e413..f2ec2aded 100644 --- a/Makefile.am +++ b/Makefile.am @@ -176,7 +176,21 @@ selfcheck: | $(bin_PROGRAMS) $(_BUILT_SUBDIRS) docs: $(_MANUAL) lua-api-docs .PHONY: lua-api-docs -lua-api-docs: lua-api-docs/index.html +lua-api-docs: lua-api-docs/index.html documentation/lsp.html + +documentation/lsp.html: + $(LSP) --doc $(top_srcdir) | + $(GREP) ': ' | + $(AWK) -F'[][]' '{ print $$2 }' | + while read resource; do + case $$resource in + *.json) cp $$resource $(@D) ;; + *.md) + $(PANDOC) $$resource --wrap none -o $(basename $(@F)).md + $(PANDOC) $$resource -s -o $@ + ;; + esac + done lua-api-docs/index.html: build-aux/config.ld $(LDOC) -c build-aux/config.ld . diff --git a/configure.ac b/configure.ac index e61906f5d..3936a221f 100644 --- a/configure.ac +++ b/configure.ac @@ -221,10 +221,12 @@ AM_COND_IF([DEPENDENCY_CHECKS], [ AX_PROGVAR([grep]) AX_PROGVAR([head]) AX_PROGVAR([ldoc]) + AX_PROGVAR([lsp], [lua-language-server]) AX_PROGVAR([luacheck]) AX_PROGVAR([luarocks]) AX_PROGVAR([nix]) AX_PROGVAR([npm]) + AX_PROGVAR([pandoc]) AX_PROGVAR([perl]) AX_PROGVAR([sort]) AX_PROGVAR([tr])