# Depends: myrepos git mkdocs w3c-linkchecker libconfig-tiny-perl libpath-tiny-perl libtext-hogan-perl libio-prompter-perl -include site.mk MKDOCS_PREP ?= bin/mkdocs-prep.pl all: doc doc: docs $(patsubst %,docs/%,$(subst -,/,$(notdir $(wildcard source/*)))) mkdocs build ln -sfT /usr/share/javascript/jquery/jquery.min.js site/js/jquery-3.6.0.min.js publish: rsync -avH --delete-after site/ www-ruc@xayide.jones.dk:public_websites/docs.abcde.../ check: checklink site/index.html # TODO: drop symlink removal when 2020-06-19 is well in the past docs: mkdir -p docs find docs -type l -delete $(MKDOCS_PREP) README.md docs/index.md $(MKDOCS_PREP) SETUP.md docs/setup.md docs/%: source mkdir -p docs/$* $(MKDOCS_PREP) source/$(subst /,-,$*)/README.md docs/$*/index.md $(if $(wildcard source/$(subst /,-,$*)/USE.md),\ $(MKDOCS_PREP) source/$(subst /,-,$*)/USE.md docs/$*/use.md) $(if $(wildcard source/$(subst /,-,$*)/ADMIN.md),\ $(MKDOCS_PREP) source/$(subst /,-,$*)/ADMIN.md docs/$*/admin.md) $(if $(wildcard source/$(subst /,-,$*)/SETUP.md),\ $(MKDOCS_PREP) source/$(subst /,-,$*)/SETUP.md docs/$*/setup.md) $(if $(wildcard source/$(subst /,-,$*)/DEVELOP.md),\ $(MKDOCS_PREP) source/$(subst /,-,$*)/DEVELOP.md docs/$*/devel.md) init: mr update clean: rm -rf site rm -rf docs distclean: clean rm -rf source rm -f site.mk .PHONY: all doc check clean distclean