summaryrefslogtreecommitdiff
path: root/Makefile
blob: c242c60f57390d890f8b5ef6eb0c829dcce2218b (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 content
  9. $(MAKE) config
  10. submodules:
  11. git submodule init
  12. git submodule update --init --recursive
  13. config: submodules
  14. mkdir -p '$@'
  15. [ -e '$@/'*.setup ] || ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup '$@/ikiwiki.setup'
  16. content: submodules
  17. mkdir -p '$@'
  18. [ -e '$@/index.mdwn' ] || printf '# Hello world!\n\nHello world!\n' > '$@/index.mdwn'
  19. build:
  20. find config -name '*.setup' -exec ikiwiki --setup '{}' --rebuild ';'
  21. .PHONY: all build submodules content