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