Add uninstall rules for translations
authorDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 24 Nov 2011 20:31:13 +0000 (20:31 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 24 Nov 2011 20:31:13 +0000 (20:31 +0000)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
po/Makefile.am

index 501d878..73f218c 100644 (file)
@@ -22,6 +22,15 @@ install-data-hook: all
          $(INSTALL_DATA) $$l.mo $$dir/$(PACKAGE).mo; \
        done
 
+uninstall-hook:
+       linguas="$(LINGUAS)"; \
+       for l in $$linguas; do \
+         file="$(DESTDIR)$(localedir)/$$l/LC_MESSAGES/$(PACKAGE).mo"; \
+         if [ -r "$$file" ]; then \
+           echo "Removing $$file"; rm -f "$$file"; \
+         fi ; \
+       done
+
 # This is a GNUism but I don't care; it's not a default target.
 POTFILESIN = $(shell grep -v '^\#' $(srcdir)/POTFILES.in)
 POTFILES = $(POTFILESIN:%=$(top_srcdir)/%)