summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2012-03-01 01:39:19 +0100
committerJonas Smedegaard <dr@jones.dk>2012-03-01 01:39:19 +0100
commitd8c0ceefa83fd295d6acca607ff8ba3c8c99f69d (patch)
tree15b5ed4fbe58d00aaa381eff4489bdb8f6087602 /Makefile
parent5d4b61649b3c470295b72e2d2a2dcb3c08b9da15 (diff)
Restructure submodules and config targets dependency handling (now use -B to force rebuilding).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 8 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 85f3dda..7f98f02 100644
--- a/Makefile
+++ b/Makefile
@@ -14,24 +14,24 @@ all: build
always-make = $(filter -B,$(MAKEFLAGS))
avoid-broken-git = $(shell cd content && git symbolic-ref -q HEAD > /dev/null || echo " --no-rcs")
-init: submodules content
- $(MAKE) -B config
+init: config content
-submodules:
+shared/.git:
git submodule init
git submodule update --init --recursive
config: setupfiles = $(wildcard $@/*.setup)
-config: submodules
+config: shared/.git
$(if $(setupfiles),,mkdir -p '$@')
$(if $(setupfiles),,ikiwiki $(IKIWIKI_OPTIONS) --dumpsetup '$@/ikiwiki.setup')
-content: submodules
- mkdir -p '$@'
- [ -e '$@/index.mdwn' ] || printf '# Hello world!\n\nHello world!\n' > '$@/index.mdwn'
+content: notempty = $(wildcard $@/*.mdwn)
+content: shared/.git
+ $(if $(notempty),,mkdir -p '$@')
+ $(if $(notempty),,printf '# Hello world!\n\nHello world!\n' > '$@/index.mdwn')
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 submodules content
+.PHONY: all build