diff options
-rw-r--r-- | Makefile | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -1,11 +1,27 @@ +IKIWIKI_OPTIONS ?= \ + --set srcdir=$(CURDIR)/content \ + --set destdir=$(CURDIR)/build/html + +-include shared/include.mk +-include config/include.mk + all: build -init: +init: submodules config content + +submodules: git submodule init git submodule update --init --recursive - touch $@ -build: init +config: + mkdir -p "$@" + [ -e "$@/ikiwiki.setup" ] || ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup "$@/ikiwiki.setup" + +content: + mkdir -p "$@" + [ -e "$@/index.mdwn" ] || printf "# Hello world!\n\nHello world!\n" > "$@/index.mdwn" + +build: config find config -name '*.setup' -exec ikiwiki --setup '{}' --rebuild ';' -.PHONY: all init build +.PHONY: all build submodules |