summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2012-03-10 02:10:08 +0100
committerJonas Smedegaard <dr@jones.dk>2012-03-10 02:10:08 +0100
commit539443a49798f3ee1d9d3da660d8f88134822a64 (patch)
treed0733f2cbf2e6d7aae755a3bd0422234d99c3c88 /Makefile
parent3b28f4bf72e1791a34a4ebe23ea66f7cfa89f6af (diff)
Restructure (again again) init dependencies.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4e287aa..dd996fe 100644
--- a/Makefile
+++ b/Makefile
@@ -25,19 +25,21 @@ avoid-broken-git = $(shell cd content && git symbolic-ref -q HEAD > /dev/null ||
iki_configfiles := $(or $(patsubst %.in,%,$(wildcard config/ikiwiki*.setup.in)),config/ikiwiki.setup)
-init: $(iki_configfiles) content
+init: shared/.git content
+ $(MAKE) $(iki_configfiles)
shared/.git:
git submodule init
git submodule update --init --recursive
+configfiles: $(iki_configfiles)
$(iki_configfiles): iki_flavor = $(if $(filter config/ikiwiki-%.setup,$@),$(@:config/ikiwiki-%.setup=%))
-$(iki_configfiles): % : %.in shared/.git
+$(iki_configfiles): % : %.in
$(if $(wildcard config),,mkdir config)
ikiwiki $(IKIWIKI_DEFAULTS) $(patsubst %,--setup %,$(wildcard $<)) $(IKIWIKI_OPTIONS) --dumpsetup $@
content: notempty = $(wildcard $@/*.mdwn)
-content: shared/.git
+content:
$(if $(notempty),,mkdir -p '$@')
$(if $(notempty),,printf '# Hello world!\n\nHello world!\n' > '$@/index.mdwn')
@@ -45,4 +47,4 @@ build:
$(if $(cssprojects),$(MAKE) $(cssprojects))
$(foreach config,$(shell find config -name '*.setup'),ikiwiki --setup $(config)$(avoid-broken-git)$(if $(always-make), --rebuild);)
-.PHONY: all build
+.PHONY: all build configfiles