Running "make clean" when the source directory is configured as a build
directory shouldn't delete the .po files, but the rule as written did so.
This fixes the problem.
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