$(POFILES): $(POTFILE)
- $(MSGMERGE) $(top_srcdir)/$@ $< -o $@
+ $(MSGMERGE) $(top_srcdir)/$@ $? -o $@
SUFFIXES += .po .gmo
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