Index: GNUmakefile.team =================================================================== RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile.team,v retrieving revision 1.27 diff -U 2 -r1.27 GNUmakefile.team --- GNUmakefile.team 6 Jan 2013 16:50:24 -0000 1.27 +++ GNUmakefile.team 7 Jan 2013 09:22:51 -0000 @@ -216,4 +216,23 @@ endif +sync-master := +# Sync master compendium when present. +ifneq (,$(master)) +team-master := $(wildcard server/gnun/compendia/master.$(TEAM).po) +ifneq (,$(team-master)) +.PHONY: sync-master +sync-master: + @if $(call cmp-POs,$(master),$(team-master)); then \ + echo "$(team-master): Already in sync."; \ + else \ + echo "$(team-master): Copying from \`www'."; \ + cp $(master) $(team-master); \ + fi + @$(call echo-statistics,$(team-master)) +sync: sync-master +sync-master := sync-master +endif +endif + # The command to compare PO files; comments and dates are generally # considered insignificant. The msgfmt output is compared @@ -255,5 +274,5 @@ define sync-file .PNONY: sync-$(1) -sync-$(1): +sync-$(1): $(sync-master) @file=$(1); \ pot=$(wwwdir)`dirname $1`/po/`basename $$$${file%.$(TEAM).po}.pot`; \ @@ -264,4 +283,5 @@ www_po=$(wwwdir)`dirname $1`/po/`basename $1`; \ if test -f $$$${www_po}; then \ + $$(if $(master), test $$$$file -nt $(master) && ) \ $$(call cmp-POs,$1,$$$${www_po}) \ && echo "$$$${file#./}: Already in sync." \ @@ -291,21 +311,4 @@ $(eval $(call sync-file,$(file)))) -# Sync master compendium when present. -ifneq (,$(master)) -team-master := $(wildcard server/gnun/compendia/master.$(TEAM).po) -ifneq (,$(team-master)) -.PHONY: sync-master -sync-master: - @if $(call cmp-POs,$(master),$(team-master)); then \ - echo "$(team-master): Already in sync."; \ - else \ - echo "$(team-master): Copying from \`www'."; \ - cp $(master) $(team-master); \ - fi - @$(call echo-statistics,$(team-master)) -sync: sync-master -endif -endif - # Import translated file lists from www. -include $(www_gnun_dir)gnun.mk