summaryrefslogtreecommitdiff
path: root/Makefile
blob: 43db4bfb63db3aa0cac05a3cf6586a6ad5a4971e (plain)
  1. IKIWIKI_OPTIONS ?= \
  2. --set srcdir=$(CURDIR)/content \
  3. --set destdir=$(CURDIR)/build/html
  4. -include shared/include.mk
  5. -include config/include.mk
  6. all: build
  7. init: submodules config content
  8. submodules:
  9. git submodule init
  10. git submodule update --init --recursive
  11. config:
  12. mkdir -p "$@"
  13. [ -e "$@/ikiwiki.setup" ] || ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup "$@/ikiwiki.setup"
  14. content:
  15. mkdir -p "$@"
  16. [ -e "$@/index.mdwn" ] || printf "# Hello world!\n\nHello world!\n" > "$@/index.mdwn"
  17. build: config
  18. find config -name '*.setup' -exec ikiwiki --setup '{}' --rebuild ';'
  19. .PHONY: all build submodules