summaryrefslogtreecommitdiff
path: root/Makefile
blob: 6b019e4e10dee43dfa1a6596852edd4b5e0b6ff6 (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 '$@/'*.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 content