]> git.draconx.ca Git - cdecl99.git/commitdiff
Add uninstall rule for .mo files.
authorNick Bowler <nbowler@draconx.ca>
Thu, 22 Sep 2011 22:58:45 +0000 (18:58 -0400)
committerNick Bowler <nbowler@draconx.ca>
Thu, 22 Sep 2011 22:58:45 +0000 (18:58 -0400)
This was apparently forgotten because distcheck seems to not notice when
you leave crap in the install tree.

Makefile.am

index 604802983aaed2754949667ec9bdcd26e6ea2968..1bf6490ead24b6fb80fa5ad422543fed3c87aec7 100644 (file)
@@ -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...