aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: a972defe2545f6df4ea949cb6e8608bd152d58a8 (plain)
  1. # Depends: myrepos git mkdocs w3c-linkchecker libconfig-tiny-perl libpath-tiny-perl libtext-hogan-perl libio-prompter-perl
  2. -include site.mk
  3. MKDOCS_PREP ?= bin/mkdocs-prep.pl
  4. all: doc
  5. doc: docs $(patsubst %,docs/%,$(subst -,/,$(notdir $(wildcard source/*))))
  6. mkdocs build
  7. ln -sfT /usr/share/javascript/jquery/jquery.min.js site/js/jquery-3.6.0.min.js
  8. publish:
  9. rsync -avH --delete-after site/ www-ruc@xayide.jones.dk:public_websites/docs.abcde.../
  10. check:
  11. checklink site/index.html
  12. # TODO: drop symlink removal when 2020-06-19 is well in the past
  13. docs:
  14. mkdir -p docs
  15. find docs -type l -delete
  16. $(MKDOCS_PREP) README.md docs/index.md
  17. $(MKDOCS_PREP) SETUP.md docs/setup.md
  18. docs/%: source
  19. mkdir -p docs/$*
  20. $(MKDOCS_PREP) source/$(subst /,-,$*)/README.md docs/$*/index.md
  21. $(if $(wildcard source/$(subst /,-,$*)/USE.md),\
  22. $(MKDOCS_PREP) source/$(subst /,-,$*)/USE.md docs/$*/use.md)
  23. $(if $(wildcard source/$(subst /,-,$*)/ADMIN.md),\
  24. $(MKDOCS_PREP) source/$(subst /,-,$*)/ADMIN.md docs/$*/admin.md)
  25. $(if $(wildcard source/$(subst /,-,$*)/SETUP.md),\
  26. $(MKDOCS_PREP) source/$(subst /,-,$*)/SETUP.md docs/$*/setup.md)
  27. $(if $(wildcard source/$(subst /,-,$*)/DEVELOP.md),\
  28. $(MKDOCS_PREP) source/$(subst /,-,$*)/DEVELOP.md docs/$*/devel.md)
  29. init:
  30. mr update
  31. clean:
  32. rm -rf site
  33. rm -rf docs
  34. distclean: clean
  35. rm -rf source
  36. rm -f site.mk
  37. .PHONY: all doc check clean distclean