blob: e8563078acfacf8a1538bb0671885bdb7baa65f3 (
plain)
- # Depends: myrepos git mkdocs linkchecker
- all: doc
- doc: docs $(patsubst %,docs/%,$(subst -,/,$(notdir $(wildcard source/*))))
- mkdocs build
- linkchecker site/index.html
- docs:
- mkdir -p docs
- ln -sf ../README.md docs/index.md
- # ln -sf ../USE.md docs/use.md
- # ln -sf ../ADMIN.md docs/admin.md
- docs/%: source
- mkdir -p docs/$*
- ln -sf $(shell realpath --relative-to=$@ source/$(subst /,-,$*)/README.md) docs/$*/index.md
- $(if $(wildcard source/$(subst /,-,$*)/USE.md),\
- ln -sf $(shell realpath --relative-to=$@ source/$(subst /,-,$*)/USE.md) docs/$*/use.md)
- $(if $(wildcard source/$(subst /,-,$*)/ADMIN.md),\
- ln -sf $(shell realpath --relative-to=$@ source/$(subst /,-,$*)/ADMIN.md) docs/$*/admin.md)
- init:
- mr update
- clean:
- rm -rf site
- rm -rf docs
- distclean: clean
- rm -rf source
- .PHONY: all doc clean distclean
|