From e972aef95fe67ad2d6ed5ed7a53f89434b505148 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 21 Oct 2007 22:45:39 +0200 Subject: Add makefile with rules to clone and wipe GIT repositories of upstream and localized underlays. Ignore GIT repositories. --- .gitignore | 6 ++++++ Makefile | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..658803e --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/basewiki +/basewiki_l10n +/smiley +/smiley_l10n +/templates +/templates_l10n diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..09a99c4 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +sources = ikiwiki + +origin_ikiwiki = http://source.jones.dk/ikiwiki_$(underlay).git +underlays_ikiwiki = basewiki smiley templates +master_ikiwiki = master$(locale:%=-$(locale)) + +locales = danish + +underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales), $(patsubst %,%_l10n/$(locale),$(underlays_$(source))))) +underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l10n) + +source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source)))) +origin = $(origin_$(source_of_underlay)) +master = $(master_$(source_of_underlay)) + +all: $(underlays) + +$(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@)) +$(underlays): underlay=$(@:%_l10n/$(locale)=%) +$(underlays): + mkdir -p $@ + cd $@ && git init + cd $@ && git remote add -f -t $(master) -m $(master) origin $(origin) + cd $@ && git merge origin + +# WARNING: this may wipe unrelated files too! +ultraclean: + rm -rf $(underlays) + rm -rf $(dir $(underlays_l10n)) -- cgit v1.2.3