summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-07-11 19:35:38 +0200
committerJonas Smedegaard <dr@jones.dk>2010-07-11 19:35:38 +0200
commit231ffc619a287ec49921e99488bd9fbc733a3c3a (patch)
tree8c5091c9872174f29b123e788fdbf50f62bf2d97
parent60bbb21fa84ed7593f9132229cfe1e458587e72f (diff)
Rewrite Makefiles and README to reflect use of Git submodule (not multi-layered Gits).
-rw-r--r--Makefile18
-rw-r--r--README10
-rw-r--r--make/rules.mk41
3 files changed, 9 insertions, 60 deletions
diff --git a/Makefile b/Makefile
index 2399e70..d9fb135 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,9 @@
SOURCES = ikiwiki
ikiwiki_VERSION = 2.62.1
-# Git origin (with capital MOULE replaced or stripped as needed)
-ikiwiki_ORIGIN = git://source.jones.dk/ikiwiki_MODULE
-# Git branch (with capital FLAVOR and LOCALE replaced or stripped as needed)
-ikiwiki_BRANCH = master-FLAVOR-LOCALE
-# modules (subproject extension names) used. Expands Git ORIGINs
+# modules (subproject extension names) used. Expands SOURCES
ikiwiki_MODULES = templates basewiki smiley directives
-# flavors used. Expands Git BRANCHes
-#ikiwiki_basewiki_FLAVORS = nonedit
-#ikiwiki_templates_FLAVORS = nonedit
-# locales used. Expands Git BRANCHes
+# locales used. Expands SOURCES
#ikiwiki_LOCALES = da nb
# gettext-based modules and locales used
#ikiwiki_POMODULES = basewiki smiley directives
@@ -30,7 +23,12 @@ flavordir = $(module)_$(flavor)
flavorl10ndir = $(module)_$(flavor)_l10n/$(locale)
podir = po
-all: $(SOURCES)
+all: init $(SOURCES)
+
+init:
+ git submodule init
+ git submodule update
+ touch init
install::
ifeq ($(strip $(CONFIGS)),)
diff --git a/README b/README
index 3becd90..5f4302c 100644
--- a/README
+++ b/README
@@ -25,16 +25,6 @@ To pull in all translatable and translated parts, do this:
make
-If you have write access to one or more GIT repositories, you can override
-their locations like this:
-
- make ikiwiki_ORIGIN=debian@source.jones.dk:/srv/git/source.jones.dk/ikiwiki_MODULE.git
-
-To remove all translatable and translated parts, and anything else below those
-directories without warning, do this:
-
- make ultraclean
-
Customizing
-----------
diff --git a/make/rules.mk b/make/rules.mk
index 38fdbff..226d37d 100644
--- a/make/rules.mk
+++ b/make/rules.mk
@@ -3,7 +3,7 @@ HTMLTEMPLATE = text
# 1:source 2:locales
define SOURCE_template
-$(1): $$($(1)_MODULES) $(dummy_MODULES)
+$(1): init $$($(1)_MODULES) $(dummy_MODULES)
.PHONY: $(1)
endef
@@ -11,45 +11,6 @@ $(foreach source,$(SOURCES),$(eval $(call SOURCE_template,$(source),$($(source)_
-# Initially clone, and later pull, all Git repositories:
-# * Clone master branches from remote origin
-# * Clone each non-master from local master
-
-# 1:moduledir 2:locale 3:mastermodule 4:source 5:flavor
-define MODULE_template
-$(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)$(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)" "$$@" )
- @$(MAKE) -f "$$(CURDIR)/make/git.mk" -C "$$@" master="$$(master)" branches="$$(branches)" origin="$(4)" update
-
-# WARNING: this may wipe unrelated files too!
-ultraclean::
- rm -rf "$(1)"
-ifneq ($(2),)
- rm -rf "$(dir $(1))"
-endif
-
-.PHONY: $(1)
-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)))))))
-
-
-
# Override po4a with local Markdown-supportive text module
export PERL5LIB = $(CURDIR)/perl