blob: 40d4bce19257f243f0dd06612e1649749a06b6e3 (
plain)
- # Depends: myrepos git mkdocs linkchecker
- all: doc
- doc: docs $(patsubst %,docs/%,$(subst -,/,$(notdir $(wildcard source/*))))
- mkdocs build --strict
- 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
|