Added the Catalan translation from http://translationproject.org
[pspp-builds.git] / po / automake.mk
index 95493a7d526fda28f8a235ae56a9fc6ed4cc6c99..ab26aaca1180165706ad360ce572764344c68bed 100644 (file)
@@ -4,7 +4,7 @@ XGETTEXT=xgettext
 MSGMERGE=msgmerge
 MSGFMT=msgfmt
 
-POFILES=po/en_GB.po po/nl.po po/pt_BR.po
+POFILES=po/ca.po po/en_GB.po po/nl.po po/pt_BR.po
 
 POTFILE=po/$(DOMAIN).pot
 
@@ -24,7 +24,7 @@ $(POTFILE): $(TRANSLATABLE_FILES) $(UI_FILES)
 
 
 $(POFILES): $(POTFILE)
-       $(MSGMERGE) $(top_srcdir)/$@ $< -o $@
+       $(MSGMERGE) $(top_srcdir)/$@ $? -o $@
 
 
 SUFFIXES += .po .gmo
@@ -46,11 +46,19 @@ install-data-hook: $(GMOFILES)
 uninstall-hook:
        for f in $(GMOFILES); do \
          lang=`echo $$f | sed -e 's%po/\(.*\)\.gmo%\1%' ` ; \
-         $(RM) $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
+         rm -f $(DESTDIR)$(prefix)/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo ; \
        done
 
 
 EXTRA_DIST += $(POFILES) $(POTFILE)
 
-CLEANFILES += $(POFILES) $(GMOFILES) $(POTFILE)
+CLEANFILES += $(GMOFILES) $(POTFILE)
 
+# Clean $(POFILES) from build directory but not if that's the same as
+# the source directory.
+po_CLEAN:
+       @if test "$(srcdir)" != .; then \
+               echo rm -f $(POFILES); \
+               rm -f $(POFILES); \
+       fi
+CLEAN_LOCAL += po_CLEAN