2005-10-19 22:00:35 -04:00
|
|
|
top_builddir=../../..
|
|
|
|
include $(top_builddir)/Makefile.config
|
2005-09-15 22:20:14 -04:00
|
|
|
|
|
|
|
localedir = $(datadir)/locale
|
|
|
|
builddir = $(top_builddir)/src/intl/gettext
|
|
|
|
|
2011-10-08 06:07:02 -04:00
|
|
|
CFLAGS += $(GETTEXT_CFLAGS)
|
|
|
|
|
2005-09-15 22:20:14 -04:00
|
|
|
OBJS = \
|
|
|
|
bindtextdom.o \
|
|
|
|
dcgettext.o \
|
|
|
|
dcigettext.o \
|
|
|
|
dcngettext.o \
|
|
|
|
dgettext.o \
|
|
|
|
dngettext.o \
|
|
|
|
explodename.o \
|
|
|
|
finddomain.o \
|
|
|
|
gettext.o \
|
|
|
|
intl-compat.o \
|
|
|
|
l10nflist.o \
|
|
|
|
libintl.o \
|
|
|
|
loadmsgcat.o \
|
|
|
|
localcharset.o \
|
|
|
|
localealias.o \
|
|
|
|
ngettext.o \
|
|
|
|
plural.o \
|
|
|
|
textdomain.o
|
|
|
|
|
|
|
|
|
2006-01-01 16:54:44 -05:00
|
|
|
# $(builddir)/charset.alias: $(srcdir)config.charset
|
2005-12-29 18:49:01 -05:00
|
|
|
$(builddir)/charset.alias: $(srcdir)config.charset
|
2006-01-01 16:54:44 -05:00
|
|
|
$(SHELL) $(srcdir)config.charset '$(host)' > $@.new
|
2005-09-23 14:30:56 -04:00
|
|
|
mv $@.new $@
|
2005-09-15 22:20:14 -04:00
|
|
|
|
|
|
|
# FIXME: Building plural.c from plural.y on the fly doesn't work
|
|
|
|
|
|
|
|
YACC = $(INTLBISON) -y -d
|
|
|
|
YFLAGS = --name-prefix=gettext__
|
|
|
|
plural.c: plural.y
|
|
|
|
.SUFFIXES: .y .c
|
|
|
|
.y.c:
|
|
|
|
$(YACC) $(YFLAGS) --output $@ $<
|
|
|
|
rm -f $*.h
|
|
|
|
|
2005-09-27 15:11:28 -04:00
|
|
|
install-local: $(builddir)/charset.alias all
|
2005-10-26 08:19:32 -04:00
|
|
|
@if test '$(CONFIG_NLS)' = yes; then \
|
2005-09-15 22:20:14 -04:00
|
|
|
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
|
|
|
|
dest=$(DESTDIR)$(libdir)/charset.alias; \
|
|
|
|
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
|
|
|
|
orig=$(DESTDIR)$(libdir)/charset.alias; \
|
|
|
|
sed -f ref-add.sed $$orig > $$temp; \
|
|
|
|
$(INSTALL_DATA) $$temp $$dest; \
|
|
|
|
rm -f $$temp; \
|
|
|
|
else \
|
2005-10-26 08:26:35 -04:00
|
|
|
if test $(GLIBC21) = no; then \
|
2005-09-23 03:08:47 -04:00
|
|
|
$(MKINSTALLDIRS) $(DESTDIR)$(libdir); \
|
2005-09-15 22:20:14 -04:00
|
|
|
orig=charset.alias; \
|
|
|
|
sed -f ref-add.sed $$orig > $$temp; \
|
|
|
|
$(INSTALL_DATA) $$temp $$dest; \
|
|
|
|
rm -f $$temp; \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
2005-09-23 03:08:47 -04:00
|
|
|
$(MKINSTALLDIRS) $(DESTDIR)$(localedir); \
|
2005-09-15 22:20:14 -04:00
|
|
|
test -f $(DESTDIR)$(localedir)/locale.alias \
|
|
|
|
&& orig=$(DESTDIR)$(localedir)/locale.alias \
|
2006-01-01 16:54:44 -05:00
|
|
|
|| orig=$(srcdir)locale.alias; \
|
2005-09-15 22:20:14 -04:00
|
|
|
temp=$(DESTDIR)$(localedir)/t-locale.alias; \
|
|
|
|
dest=$(DESTDIR)$(localedir)/locale.alias; \
|
|
|
|
sed -f ref-add.sed $$orig > $$temp; \
|
|
|
|
$(INSTALL_DATA) $$temp $$dest; \
|
|
|
|
rm -f $$temp; \
|
|
|
|
else \
|
|
|
|
: ; \
|
|
|
|
fi
|
2005-09-23 14:30:56 -04:00
|
|
|
|
2005-09-27 15:11:28 -04:00
|
|
|
uninstall-local:
|
2005-10-26 08:26:35 -04:00
|
|
|
@if test '$(CONFIG_NLS)' = yes; then \
|
2005-09-23 14:30:56 -04:00
|
|
|
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
|
2005-09-15 22:20:14 -04:00
|
|
|
|
2005-10-19 19:11:47 -04:00
|
|
|
include $(top_srcdir)/Makefile.lib
|