summaryrefslogtreecommitdiffstats
path: root/ansible_collections/sensu/sensu_go/docs/Makefile.custom
blob: b896ab9c7c862081ade88d5a4cb67ef0b8395486 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
modules := $(wildcard ../plugins/modules/*.py)
module_docs := $(modules:../plugins/modules/%.py=source/modules/%.rst)
doc_fragments := $(wildcard ../plugins/doc_fragments/*.py)
template := templates/module.rst.j2

export ANSIBLE_COLLECTIONS_PATHS ?= $(realpath $(CURDIR)/../../../..)


.PHONY: all
docs: $(module_docs)
	$(MAKE) html

.PHONY: clean
clean:
	rm -rf build source/modules

source/modules/%.rst: ../plugins/modules/%.py $(doc_fragments) $(template)
	mkdir -p source/modules
	ansible-doc-extractor --template $(template) source/modules $<