From: Nick Bowler Date: Thu, 22 Sep 2011 22:58:45 +0000 (-0400) Subject: Add uninstall rule for .mo files. X-Git-Tag: v1~96 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/811bff8f96a56e62fab1df9338490f454af7b3f6 Add uninstall rule for .mo files. This was apparently forgotten because distcheck seems to not notice when you leave crap in the install tree. --- diff --git a/Makefile.am b/Makefile.am index 6048029..1bf6490 100644 --- a/Makefile.am +++ b/Makefile.am @@ -90,7 +90,19 @@ install-mo: $(MOFILES) $(INSTALL_DATA) "$$mo" "$$inst/$(PACKAGE).mo" || exit $$?; \ set +x; \ done -.PHONY: install-mo + +uninstall-hook: uninstall-mo +uninstall-mo: + for mo in $(ALL_MOFILES); do \ + lang=`expr "$$mo" : '.*/\(.*\)\.mo' \| "$$mo" : '\(.*\)\.mo'`; \ + test x"$$lang" = x"" && exit 1; \ + inst="$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES"; \ + set -x; \ + cd "$$inst" && rm -f '$(PACKAGE).mo'; \ + set +x; \ + done + +.PHONY: install-mo uninstall-mo # These are required to prevent the builtin lex/yacc rules from # superseding ours...