summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2012-03-01 01:56:54 +0100
committerJonas Smedegaard <dr@jones.dk>2012-03-01 01:58:30 +0100
commitcf92a6b4a6ec9f8025fd3847ec4c2d7cd7c3ddac (patch)
tree196dcdf7394d0a8025b0455a5ffa1738a9c57f74 /Makefile
parent4f82d2a5cb3db474382865ce1fdba5b29963f88d (diff)
Generate Ikiwiki setup files from defaults, hardcoding (path) options and optional *.in YAML file.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ad06556..4e287aa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,16 @@
+IKIWIKI_DEFAULTS ?= \
+ --rcs git \
+ --set cgi_wrappermode=00755 \
+ --set git_wrappermode=06755 \
+ $(IKIWIKI_SHARED_DEFAULTS)
+
IKIWIKI_OPTIONS ?= \
- --set srcdir='$(CURDIR)/content' \
- --set destdir='$(CURDIR)/build/html' \
- $(IKIWIKI_SHARED_OPTIONS) $(IKIWIKI_CONFIG_OPTIONS)
+ --set srcdir='$(CURDIR)/content' \
+ --set destdir='$(CURDIR)/build/html$(iki_flavor:%=-%)' \
+ --set cgi_wrapper='$(CURDIR)/build/cgi$(iki_flavor:%=-%)/ikiwiki.cgi' \
+ --set git_wrapper='$(CURDIR)/build/git/post-update-ikiwiki$(iki_flavor:%=-%)' \
+ --set wikistatedir='$(CURDIR)/.ikiwiki$(iki_flavor:%=-%)' \
+ $(IKIWIKI_SHARED_OPTIONS)
cssprojects ?= $(wildcard shared/themes/goab styling)
@@ -22,9 +31,10 @@ shared/.git:
git submodule init
git submodule update --init --recursive
+$(iki_configfiles): iki_flavor = $(if $(filter config/ikiwiki-%.setup,$@),$(@:config/ikiwiki-%.setup=%))
$(iki_configfiles): % : %.in shared/.git
$(if $(wildcard config),,mkdir config)
- ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup $@
+ ikiwiki $(IKIWIKI_DEFAULTS) $(patsubst %,--setup %,$(wildcard $<)) $(IKIWIKI_OPTIONS) --dumpsetup $@
content: notempty = $(wildcard $@/*.mdwn)
content: shared/.git