blob: be53be37eada87aff9578323a6878b05c7bafe05 (
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
- always-make = $(filter -B,$(MAKEFLAGS))
- 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 -B
- $(MAKE) -B 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) $(if $(always-make),--rebuild) ';'
- .PHONY: all build submodules content
|