summaryrefslogtreecommitdiff
path: root/Makefile
blob: 8e88c210cc94c6a18764ce6933e6794177a769e6 (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:
  13. mkdir -p "$@"
  14. [ -e "$@/ikiwiki.setup" ] || ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup "$@/ikiwiki.setup"
  15. content:
  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