summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2007-11-05 13:40:32 +0100
committerJonas Smedegaard <dr@jones.dk>2007-11-05 13:40:32 +0100
commitf84ec8c42dbf3406bd4d16d13a66e8f145ca362e (patch)
tree64a04dc0a9b72b25eae21c95c8d04db33b9f3176 /Makefile
parentd1edd0ef291fe4bbac81c5895aebbe6b56e3c9dd (diff)
Rename variables to prepare for using eval function in Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 18 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index a4ca54a..daa7aca 100644
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,26 @@
-sources = ikiwiki
+SOURCES = ikiwiki
-origin_ikiwiki = http://source.jones.dk/ikiwiki_$(underlay).git
-underlays_ikiwiki = basewiki smiley templates
-master_ikiwiki = master$(locale:%=-$(locale))
-locales_ikiwiki = da
+ikiwiki_ORIGIN = http://source.jones.dk/ikiwiki_MODULE.git
+ikiwiki_UNDERLAYS = basewiki smiley templates
+ikiwiki_BRANCH = master-LOCALE
+ikiwiki_LOCALES = da
-#dummies = content_dummy
+#dummy_UNDERLAYS = content_dummy
-underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(patsubst %,%_l10n/$(locale),$(underlays_$(source)))))
-underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l10n)
+# Everything after this is generic
+
+underlays_l10n = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(patsubst %,%_l10n/$(locale),$($(source)_UNDERLAYS))))
+underlays = $(foreach source, $(SOURCES), $($(source)_UNDERLAYS)) $(underlays_l10n)
# FIXME: Handle translation of templates (needs po4a parser for HTML::Template markup)
-#potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(underlays_$(source))))
-potfiles = $(foreach source, $(sources), $(patsubst %,po/%.pot,$(filter-out templates,$(underlays_$(source)))))
-pofiles = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(patsubst %.pot,%.$(locale).po,$(potfiles))))
-l10nfiles = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(foreach underlay,$(patsubst po/%.$(locale).po,%,$(pofiles)), $(patsubst %,$(l10ndir)/%,$(l10nfiles_in_underlay)))))
-
-source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source))))
-origin = $(origin_$(source_of_underlay))
-master = $(master_$(source_of_underlay))
+#potfiles = $(foreach source, $(SOURCES), $(patsubst %,po/%.pot,$($(source)_UNDERLAYS)))
+potfiles = $(foreach source, $(SOURCES), $(patsubst %,po/%.pot,$(filter-out templates,$($(source)_UNDERLAYS))))
+pofiles = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(patsubst %.pot,%.$(locale).po,$(potfiles))))
+l10nfiles = $(foreach source, $(SOURCES), $(foreach locale, $($(source)_LOCALES), $(foreach underlay,$(patsubst po/%.$(locale).po,%,$(pofiles)), $(patsubst %,$(l10ndir)/%,$(l10nfiles_in_underlay)))))
+
+source_of_underlay = $(firstword $(foreach source, $(SOURCES), $(if $(filter $(underlay),$($(source)_UNDERLAYS)),$(source))))
+origin = $(subst MODULE,$(underlay),$($(source_of_underlay)_ORIGIN))
+master = $(subst -LOCALE,$(locale:%=-$(locale)),$($(source_of_underlay)_BRANCH))
masterdir = $(underlay)
l10ndir = $(underlay)_l10n/$(locale)