Check that merged po files are well formed.
[pspp] / po / automake.mk
index 828192a7caab6e31f4a697246f6a9216aecf9ffd..2f169f338fe6ce3971e90f502a96a1170e237247 100644 (file)
@@ -54,13 +54,13 @@ XGETTEXT_OPTIONS = \
        --add-comments='TRANSLATORS:' \
        --directory=$(top_srcdir)
 
-ALL_TRANSLATEABLE_FILES = \
-       $(TRANSLATEABLE_FILES) \
+ALL_TRANSLATABLE_FILES = \
+       $(TRANSLATABLE_FILES) \
        $(UI_FILES) \
        src/ui/gui/org.fsf.pspp.metainfo.xml.in \
        src/ui/gui/org.fsf.pspp.desktop.in
 
-$(POTFILE): $(ALL_TRANSLATABLE_FILES)
+$(POTFILE): $(ALL_TRANSLATABLE_FILES) Makefile
        @$(MKDIR_P) po
        $(AM_V_GEN)$(XGETTEXT) $(XGETTEXT_OPTIONS) $(TRANSLATABLE_FILES) --language=C --keyword=_ --keyword=N_ -o $@,tmp
        $(AM_V_at)$(XGETTEXT) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=Glade -o $@,tmp
@@ -68,7 +68,7 @@ $(POTFILE): $(ALL_TRANSLATABLE_FILES)
        $(AM_V_at)$(XGETTEXT) $(XGETTEXT_OPTIONS) -j src/ui/gui/org.fsf.pspp.desktop.in -o $@,tmp
        $(AM_V_at)$(SED) -e '/^"POT-Creation-Date: .*/d' $@,tmp > $@
 
-$(LOCALPOFILED) $(POFILES): $(POTFILE)
+$(LOCALPOFILES) $(POFILES): $(POTFILE)
        $(AM_V_GEN)$(MSGMERGE) --previous --quiet $(top_srcdir)/$@ $? -o $@,tmp
        $(AM_V_at)if test -e $(top_srcdir)/$@,aux ; then \
                touch $@,tmp ; \
@@ -76,6 +76,7 @@ $(LOCALPOFILED) $(POFILES): $(POTFILE)
        fi ;
        $(AM_V_at)$(SED) -e '/^"POT-Creation-Date: /d' $@,tmp > $@,tmp2
        $(RM) $@,tmp
+       $(MSGFMT) -c $@,tmp2
        mv $@,tmp2 $@
 
 SUFFIXES += .po .gmo