summaryrefslogtreecommitdiff
path: root/Makefile
blob: c8d525e3e6736502611ed3c5de12456ae63bc6b7 (plain)
  1. sources ikiwiki
  2. origin_ikiwiki http://source.jones.dk/ikiwiki_$(underlay).git
  3. underlays_ikiwiki basewiki smiley templates
  4. master_ikiwiki master$(locale:%=-$(locale))
  5. locales da
  6. underlays_l10n = $(foreach source, $(sources), $(foreach locale, $(locales), $(patsubst %,%_l10n/$(locale),$(underlays_$(source)))))
  7. underlays = $(foreach source, $(sources), $(underlays_$(source))) $(underlays_l10n)
  8. source_of_underlay = $(firstword $(foreach source, $(sources), $(if $(filter $(underlay),$(underlays_$(source))),$(source))))
  9. origin = $(origin_$(source_of_underlay))
  10. master = $(master_$(source_of_underlay))
  11. all: $(underlays)
  12. $(underlays): locale=$(if $(filter l10n/,$(lastword $(subst _, ,$(dir $@)))),$(notdir $@))
  13. $(underlays): underlay=$(@:%_l10n/$(locale)=%)
  14. $(underlays):
  15.     mkdir -$@
  16.     cd $&& git init
  17.     cd $&& git remote add --$(master) -$(masterorigin $(origin)
  18.     cd $&& git merge origin
  19. # WARNING: this may wipe unrelated files too!
  20. ultraclean:
  21.     rm -rf $(underlays)
  22.     rm -rf $(dir $(underlays_l10n))