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