Skip to content

Commit

Permalink
chore(tooling): Add more tooling for generating LSP and documentation…
Browse files Browse the repository at this point in the history
… resources
  • Loading branch information
alerque committed Feb 14, 2024
1 parent a67bc64 commit ed33e5b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Makefile.am
Expand Up @@ -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 .
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Expand Up @@ -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])
Expand Down

0 comments on commit ed33e5b

Please sign in to comment.