From 98db86ccbcdad71182be70d3a74ab99d65fb9e82 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Nov 2007 11:33:24 +0100 Subject: Fix Makefile install target; change it to an eval'ed template. Slightly improve hints in Makefile. Add some targets to .PHONY. --- Makefile | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3c7a46c..08a3354 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ ikiwiki_LOCALES = da #dummy_MODULES = content_dummy +# uncomment this when ikiwiki.setup is configured for the local environment #CONFIGS = ikiwiki.setup # Everything after this is generic @@ -19,13 +20,6 @@ podir = po all: $(SOURCES) -install: -ifneq ($(strip $(CONFIGS)),) - $(CONFIGS:%=ikiwiki --setup % --rebuild) -else - $(error FIXME: you need to adjust ikiwiki.setup first!) -endif - # 1:source 2:locales @@ -130,10 +124,30 @@ $(foreach module,$(dummy_MODULES),$(eval $(call DUMMYMODULE_template,$(masterdir +# 1:configfile +define CONFIG_template +$(1): + mkdir -p $$@ + +# WARNING: this may wipe unrelated files too! +install:: + ikiwiki --setup $(1) --rebuild +endef +$(foreach config,$(CONFIGS),$(eval $(call CONFIG_template,$(config)))) + + + +install: +ifneq ($(strip $(CONFIGS)),) + $(error Please configure ikiwiki.setup and then uncomment it at the top of the Makefile!) +endif + + + pot: $(ALL_POTFILES) po: $(ALL_POFILES) translations: $(ALL_L10NFILES) -.PHONY: all $(SOURCES) pot po translations +.PHONY: all $(SOURCES) pot po translations install ultraclean -- cgit v1.2.3