From 4f6a8477ebd647fb96747790cc89ec5f26d68a07 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@gnu.org>
Date: Sun, 11 Oct 2009 21:31:18 -0700
Subject: [PATCH] Don't delete .po files from source directory in "make clean".

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.
---
 po/automake.mk | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/po/automake.mk b/po/automake.mk
index e7b13096..0b18ef80 100644
--- a/po/automake.mk
+++ b/po/automake.mk
@@ -52,5 +52,13 @@ uninstall-hook:
 
 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
-- 
2.30.2