summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2012-03-01 01:50:03 +0100
committerJonas Smedegaard <dr@jones.dk>2012-03-01 01:58:23 +0100
commit4f82d2a5cb3db474382865ce1fdba5b29963f88d (patch)
tree33058caa57c9ce09306bd54e3a3bb86e699eb02c
parent109fdb263c35da12709c40b0e6f532907485ecbf (diff)
Individual configfile targets.
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 7f98f02..ad06556 100644
--- a/Makefile
+++ b/Makefile
@@ -14,16 +14,17 @@ all: build
always-make = $(filter -B,$(MAKEFLAGS))
avoid-broken-git = $(shell cd content && git symbolic-ref -q HEAD > /dev/null || echo " --no-rcs")
-init: config content
+iki_configfiles := $(or $(patsubst %.in,%,$(wildcard config/ikiwiki*.setup.in)),config/ikiwiki.setup)
+
+init: $(iki_configfiles) content
shared/.git:
git submodule init
git submodule update --init --recursive
-config: setupfiles = $(wildcard $@/*.setup)
-config: shared/.git
- $(if $(setupfiles),,mkdir -p '$@')
- $(if $(setupfiles),,ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup '$@/ikiwiki.setup')
+$(iki_configfiles): % : %.in shared/.git
+ $(if $(wildcard config),,mkdir config)
+ ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup $@
content: notempty = $(wildcard $@/*.mdwn)
content: shared/.git