summaryrefslogtreecommitdiff
path: root/Makefile
blob: 3aab8c7852a65635bc90e58224fa91bac96b7f58 (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