--files-from=$(PO)/POTFILES_$*.in -o $(PO)/domains/$*/c.pot
rm -f $(PO)/POTFILES_$*.in
$(MSGCOMM) --more-than=0 $(PO)/domains/$*/c.pot $(PO)/domains/$*/sh.pot --output=$@
+ # copy into the domain dirs to make rosetta happy
+ rm -f $(PO)/domains/$*/*.pot
+ cp $@ $(PO)/domains/$*
$(PACKAGE)-all.pot: $(POTFILES)
$(MSGCOMM) --more-than=0 $(POTFILES) --output=$@
stats:
for i in *.pot *.po; do echo -n "$$i: "; msgfmt --statistics $$i; done
-binary: $(POTFILES) $(PO)/$(PACKAGE)-all.pot $(MOFILES)
+binary: $(POTFILES) $(PACKAGE)-all.pot $(MOFILES) update-po
+
+.PHONY: update-po
+update-po: $(PACKAGE)-all.pot
+ for lang in ${LINGUAS}; do\
+ echo "Updating $$lang.po"; \
+ $(MSGMERGE) $$lang.po $(PACKAGE)-all.pot -o $$lang.new.po; \
+ cmp $$lang.new.po $$lang.po || cp $$lang.new.po $$lang.po; \
+ rm -f $$lang.new.po; \
+ done
clean: clean/local
clean/local: