From ee28654bb1095eeb08b8e404e7dca34e382c111c Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 24 Nov 2018 18:00:49 +0100 Subject: Initial draft. --- Makefile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..40d4bce --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +# 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 -- cgit v1.2.3