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