From 539443a49798f3ee1d9d3da660d8f88134822a64 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 10 Mar 2012 02:10:08 +0100 Subject: Restructure (again again) init dependencies. --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3