summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2007-11-06 11:33:24 +0100
committerJonas Smedegaard <dr@jones.dk>2007-11-06 11:33:24 +0100
commit98db86ccbcdad71182be70d3a74ab99d65fb9e82 (patch)
tree835680b774c9735e0408b52a95e606a8a11ff398
parentfb793d8a6f580f0dd32347a8df1867195237291d (diff)
Fix Makefile install target; change it to an eval'ed template. Slightly improve hints in Makefile. Add some targets to .PHONY.
-rw-r--r--Makefile30
1 files changed, 22 insertions, 8 deletions
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