diff options
author | Jonas Smedegaard <dr@jones.dk> | 2012-08-04 19:40:56 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2012-08-04 19:40:56 +0200 |
commit | c04a0e54d61a7512055109bb8942ff081e3b194f (patch) | |
tree | 438f8f9b3ff631d15b55571e11833327380bfe1a /Makefile | |
parent | e8353418082695033c1a641aa58afc02c98d60d9 (diff) | |
parent | acced10a9ec5c3fb7d09d0dcc719c87af9be27b6 (diff) |
Merge branch 'master' into master-da
Conflicts:
shared
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -25,19 +25,24 @@ 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 -$(iki_configfiles): iki_flavor = $(if $(filter config/ikiwiki-%.setup,$@),$(@:config/ikiwiki-%.setup=%)) -$(iki_configfiles): % : %.in shared/.git +config/ikiwiki.setup.in: $(if $(wildcard config),,mkdir config) + $(if $(wildcard config/ikiwiki.setup.in),,touch config/ikiwiki.setup.in) + +configfiles: $(iki_configfiles) +$(iki_configfiles): iki_flavor = $(if $(filter config/ikiwiki-%.setup,$@),$(@:config/ikiwiki-%.setup=%)) +$(iki_configfiles): % : %.in 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 +50,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 |