blob: 2e6c9eca8ec41659cacce702f3a93a1da24b71e7 (
plain)
- IKIWIKI_OPTIONS ?= \
- --set srcdir='$(CURDIR)/content' \
- --set destdir='$(CURDIR)/build/html' \
- $(IKIWIKI_SHARED_OPTIONS) $(IKIWIKI_CONFIG_OPTIONS)
- -include shared/include.mk
- -include config/include.mk
- -include shared/themes/Makefile
- avoid-broken-git = $(shell cd content && git symbolic-ref -q HEAD > /dev/null || echo --no-rcs)
- all: build
- init: submodules content
- -$(MAKE) -C shared/themes
- $(MAKE) config
- submodules:
- git submodule init
- git submodule update --init --recursive
- config: submodules
- mkdir -p '$@'
- [ -e '$@/'*.setup ] || ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup '$@/ikiwiki.setup'
- $(if $(wildcard shared/themes/Makefile),[ -e '$@/config.rb' ] || printf '# Compass config\nhttp_path = "/"\ncss_dir = "content"\nsass_dir = "content"\nimages_dir = "content"\njavascripts_dir = "content"\nfonts_dir = "content"\n' > '$@/config.rb')
- content: submodules
- mkdir -p '$@'
- [ -e '$@/index.mdwn' ] || printf '# Hello world!\n\nHello world!\n' > '$@/index.mdwn'
- build: $(cssfiles)
- find config -name *.setup -exec ikiwiki --setup '{}' $(avoid-broken-git) --rebuild ';'
- .PHONY: all build submodules content
|