summaryrefslogtreecommitdiff
path: root/Makefile
blob: e841b59b7d4cb4088c5f9caff5d727f27f137b92 (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. avoid-broken-git = $(shell cd content && git symbolic-ref -q HEAD > /dev/null || echo --no-rcs)
  9. all: build
  10. init: submodules content
  11. -$(MAKE) -C shared/themes
  12. $(MAKE) config
  13. submodules:
  14. git submodule init
  15. git submodule update --init --recursive
  16. config: submodules
  17. mkdir -p '$@'
  18. [ -e '$@/'*.setup ] || ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup '$@/ikiwiki.setup'
  19. content: submodules
  20. mkdir -p '$@'
  21. [ -e '$@/index.mdwn' ] || printf '# Hello world!\n\nHello world!\n' > '$@/index.mdwn'
  22. build: $(cssfiles)
  23. find config -name *.setup -exec ikiwiki --setup '{}' $(avoid-broken-git) --rebuild ';'
  24. .PHONY: all build submodules content