Don't delete .po files from source directory in "make clean". origin/makefiles fc11-i386-build20 lenny-x64-build41 sid-i386-build88
authorBen Pfaff <blp@gnu.org>
Mon, 12 Oct 2009 04:31:18 +0000 (21:31 -0700)
committerBen Pfaff <blp@gnu.org>
Tue, 13 Oct 2009 03:41:43 +0000 (20:41 -0700)
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

index e7b130963647ebf9e672570d381ae7d0b970269a..0b18ef80298d4cba7eeafa5b0413ba06c4840dd4 100644 (file)
@@ -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