summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-08-09 05:16:34 +0200
committerJonas Smedegaard <dr@jones.dk>2008-08-09 05:16:34 +0200
commitcf9d7b60d46c218c2fedc825922b5b1081a40ca3 (patch)
tree4d1df1cc98620592c81ba66211878ed68a941930
parenta53189cdff1dcb63ba54fe9daec2242963d68ac9 (diff)
parente651d76ecad4d55295a1b4805a6113dbae8cda4d (diff)
Merge branch 'master' into clean
Conflicts (manually resolved): Makefile
-rw-r--r--.gitignore6
-rw-r--r--Makefile6
-rw-r--r--make/rules.mk14
3 files changed, 20 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 658803e..df30d2f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,12 @@
/basewiki
/basewiki_l10n
+/basewiki_nonedit
+/basewiki_nonedit_l10n
+/content
+/content_dummy
/smiley
/smiley_l10n
/templates
/templates_l10n
+/templates_nonedit
+/templates_nonedit_l10n
diff --git a/Makefile b/Makefile
index f0952ba..20e42b4 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,10 @@ SOURCES = ikiwiki
ikiwiki_ORIGIN = git://source.jones.dk/ikiwiki_MODULE
ikiwiki_MODULES = templates basewiki smiley
+ikiwiki_basewiki_FLAVORS = nonedit
+ikiwiki_templates_FLAVORS = nonedit
ikiwiki_POMODULES = basewiki smiley
-ikiwiki_BRANCH = clean-LOCALE
+ikiwiki_BRANCH = clean-FLAVOR-LOCALE
ikiwiki_LOCALES = da nb
ikiwiki_POLOCALES = da
@@ -17,6 +19,8 @@ ikiwiki_POLOCALES = da
# FIXME: Not all of these are used within templates
masterdir = $(module)
l10ndir = $(module)_l10n/$(locale)
+flavordir = $(module)_$(flavor)
+flavorl10ndir = $(module)_$(flavor)_l10n/$(locale)
podir = po
all: $(SOURCES)
diff --git a/make/rules.mk b/make/rules.mk
index 5369cd0..8da5f97 100644
--- a/make/rules.mk
+++ b/make/rules.mk
@@ -15,18 +15,18 @@ $(foreach source,$(SOURCES),$(eval $(call SOURCE_template,$(source),$($(source)_
# * Clone master branches from remote origin
# * Clone each non-master from local master
-# 1:moduledir 2:locale 3:mastermodule 4:source
+# 1:moduledir 2:locale 3:mastermodule 4:source 5:flavor
define MODULE_template
-$(3)_BRANCHES += $$(subst -LOCALE,$(2:%=-$(2)),$$($(4)_BRANCH))
+$(3)_BRANCHES += $$(subst -FLAVOR,$(5:%=-$(5)),$$(subst -LOCALE,$(2:%=-$(2)),$$($(4)_BRANCH)))
$(4): $(1)
ifneq ($(2),)
$(1): $$(subst module,$(3),$$(masterdir))
endif
-$(1): origin = $$(if $(2),$(3),$$(subst MODULE,$(3),$$($(4)_ORIGIN)))
-$(1): master = $$(subst -LOCALE,$(2:%=-$(2)),$$($(4)_BRANCH))
-$(1): branches = $$(if $(2),,$$(filter-out $$(master),$$($(3)_BRANCHES)))
+$(1): origin = $$(if $(2)$(5),$(3),$$(subst MODULE,$(3),$$($(4)_ORIGIN)))
+$(1): master = $$(subst -FLAVOR,$(5:%=-$(5)),$$(subst -LOCALE,$(2:%=-$(2)),$$($(4)_BRANCH)))
+$(1): branches = $$(if $(2)$(5),,$$(filter-out $$(master),$$($(3)_BRANCHES)))
$(1):
@[ -d "$$(dir $$@)" ] || ( echo mkdir -p "$$(dir $$@)" && mkdir -p "$$(dir $$@)" )
@[ -d "$$@" ] || ( echo git clone -o "$(4)" "$$(origin)" "$$@" && git clone -o "$(4)" "$$(origin)" "$$@" )
@@ -43,6 +43,10 @@ endif
endef
$(foreach source,$(SOURCES),$(foreach module,$($(source)_MODULES),$(eval $(call MODULE_template,$(masterdir),,$(module),$(source)))))
$(foreach source,$(SOURCES),$(foreach module,$($(source)_MODULES),$(foreach locale,$($(source)_LOCALES),$(eval $(call MODULE_template,$(l10ndir),$(locale),$(module),$(source))))))
+#$(foreach source,$(SOURCES),$(foreach module,$($(source)_MODULES),$(foreach flavor,$(patsubst $(module)-%,%,$($(source)_MODULEFLAVORS)),$(eval $(call MODULE_template,$(flavordir),,$(module),$(source),$(flavor))))))
+#$(foreach source,$(SOURCES),$(foreach module,$($(source)_MODULES),$(foreach flavor,$(patsubst $(module)-%,%,$($(source)_MODULEFLAVORS)),$(foreach locale,$($(source)_LOCALES),$(eval $(call MODULE_template,$(flavorl10ndir),$(locale),$(module),$(source),$(flavor)))))))
+$(foreach source,$(SOURCES),$(foreach module,$($(source)_MODULES),$(foreach flavor,$($(source)_$(module)_FLAVORS),$(eval $(call MODULE_template,$(flavordir),,$(module),$(source),$(flavor))))))
+$(foreach source,$(SOURCES),$(foreach module,$($(source)_MODULES),$(foreach flavor,$($(source)_$(module)_FLAVORS),$(foreach locale,$($(source)_LOCALES),$(eval $(call MODULE_template,$(flavorl10ndir),$(locale),$(module),$(source),$(flavor)))))))