diff options
author | Jonas Smedegaard <dr@jones.dk> | 2007-11-05 13:40:32 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2007-11-05 13:40:32 +0100 |
commit | f84ec8c42dbf3406bd4d16d13a66e8f145ca362e (patch) | |
tree | 64a04dc0a9b72b25eae21c95c8d04db33b9f3176 | |
parent | d1edd0ef291fe4bbac81c5895aebbe6b56e3c9dd (diff) |
Rename variables to prepare for using eval function in Makefile.
-rw-r--r-- | Makefile | 34 |
1 files changed, 18 insertions, 16 deletions
@@ -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) |