blob: 1021ab38a36607a3a5eb5c8b9d35a11a4e2b54e2 (
plain)
- sources = ikiwiki
- origin_ikiwiki = http://source.jones.dk/ikiwiki_$(underlay).git
- underlays_ikiwiki = basewiki smiley templates
- master_ikiwiki = master$(locale:%=-$(locale))
- locales_ikiwiki = da
- #dummies = content_dummy
- underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales_$(source)), $(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) $(dummies)
- $(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@))
- $(underlays): underlay=$(@:%_l10n/$(locale)=%)
- $(underlays):
- mkdir -p $@
- @if [ -d "$@/.git" ]; then \
- cd $@ && \
- git pull; \
- else \
- cd $@ && \
- git init && \
- git remote add -f -t $(master) -m $(master) origin $(origin) && \
- git merge origin; \
- fi
- $(dummies):
- mkdir -p $@
- install:
- $(error FIXME: you need to adjust ikiwiki.setup first!)
- # ikiwiki --setup ikiwiki.setup --rebuild
- # WARNING: this may wipe unrelated files too!
- ultraclean:
- rm -rf $(underlays)
- rm -rf $(dir $(underlays_l10n))
- rm -rf $(dummies)
- .PHONY: $(underlays)
|