From 23497405cbdf88995d92f0dca3d266285911ba7f Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Fri, 23 Sep 2005 20:30:56 +0200 Subject: [PATCH] More installation fixes - Use the mkinstalldirs in $(top_srcdir)/config - Fix buggy scripting of srcdir which broke the local gettext install - Add the local uninstall stuff so we have it around --- Makefile.config.in | 2 +- src/intl/gettext/Makefile | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Makefile.config.in b/Makefile.config.in index e91a54975..7e92717ea 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -65,7 +65,7 @@ LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@ LOCALEDIR = @LOCALEDIR@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_LIBS = @LUA_LIBS@ -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ MSGFMT = @MSGFMT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ PACKAGE = @PACKAGE@ diff --git a/src/intl/gettext/Makefile b/src/intl/gettext/Makefile index 260b0842e..7dc3ee2b8 100644 --- a/src/intl/gettext/Makefile +++ b/src/intl/gettext/Makefile @@ -4,6 +4,9 @@ include $(path_to_top)/Makefile.config localedir = $(datadir)/locale builddir = $(top_builddir)/src/intl/gettext +# FIXME: Makefile.config gets this wrong +srcdir = $(top_srcdir)/src/intl/gettext + OBJS = \ bindtextdom.o \ dcgettext.o \ @@ -28,8 +31,10 @@ all-l: libintl.a libintl.a: $(OBJS) +# $(builddir)/charset.alias: $(srcdir)/config.charset $(builddir)/charset.alias: $(srcdir)/config.charset $(SHELL) $(srcdir)/config.charset '@host@' > $@.new + mv $@.new $@ # FIXME: Building plural.c from plural.y on the fly doesn't work @@ -71,6 +76,33 @@ install-l: $(builddir)/charset.alias all else \ : ; \ fi - mv $@.new $@ + +uninstall-l: + @if test '@USE_INCLUDED_LIBINTL@' = yes; then \ + if test -f $(DESTDIR)$(libdir)/charset.alias; then \ + temp=$(DESTDIR)$(libdir)/t-charset.alias; \ + dest=$(DESTDIR)$(libdir)/charset.alias; \ + sed -f ref-del.sed $$dest > $$temp; \ + if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ + rm -f $$dest; \ + else \ + $(INSTALL_DATA) $$temp $$dest; \ + fi; \ + rm -f $$temp; \ + fi; \ + if test -f $(DESTDIR)$(localedir)/locale.alias; then \ + temp=$(DESTDIR)$(localedir)/t-locale.alias; \ + dest=$(DESTDIR)$(localedir)/locale.alias; \ + sed -f ref-del.sed $$dest > $$temp; \ + if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ + rm -f $$dest; \ + else \ + $(INSTALL_DATA) $$temp $$dest; \ + fi; \ + rm -f $$temp; \ + fi; \ + else \ + : ; \ + fi include $(path_to_top)/Makefile.lib