rewrite: update default dumb and smart prefixes
[elinks/elinks-j605.git] / src / intl / gettext / Makefile
blob14a7418ef1b7e956edb7bdbf795ceecb7615de1b
1 top_builddir=../../..
2 include $(top_builddir)/Makefile.config
4 localedir = $(datadir)/locale
5 builddir = $(top_builddir)/src/intl/gettext
7 CFLAGS += $(GETTEXT_CFLAGS)
9 OBJS = \
10 bindtextdom.o \
11 dcgettext.o \
12 dcigettext.o \
13 dcngettext.o \
14 dgettext.o \
15 dngettext.o \
16 explodename.o \
17 finddomain.o \
18 gettext.o \
19 intl-compat.o \
20 l10nflist.o \
21 libintl.o \
22 loadmsgcat.o \
23 localcharset.o \
24 localealias.o \
25 ngettext.o \
26 plural.o \
27 textdomain.o
30 # $(builddir)/charset.alias: $(srcdir)config.charset
31 $(builddir)/charset.alias: $(srcdir)config.charset
32 $(SHELL) $(srcdir)config.charset '$(host)' > $@.new
33 mv $@.new $@
35 # FIXME: Building plural.c from plural.y on the fly doesn't work
37 YACC = $(INTLBISON) -y -d
38 YFLAGS = --name-prefix=gettext__
39 plural.c: plural.y
40 .SUFFIXES: .y .c
41 .y.c:
42 $(YACC) $(YFLAGS) --output $@ $<
43 rm -f $*.h
45 install-local: $(builddir)/charset.alias all
46 @if test '$(CONFIG_NLS)' = yes; then \
47 temp=$(DESTDIR)$(libdir)/t-charset.alias; \
48 dest=$(DESTDIR)$(libdir)/charset.alias; \
49 if test -f $(DESTDIR)$(libdir)/charset.alias; then \
50 orig=$(DESTDIR)$(libdir)/charset.alias; \
51 sed -f ref-add.sed $$orig > $$temp; \
52 $(INSTALL_DATA) $$temp $$dest; \
53 rm -f $$temp; \
54 else \
55 if test $(GLIBC21) = no; then \
56 $(MKINSTALLDIRS) $(DESTDIR)$(libdir); \
57 orig=charset.alias; \
58 sed -f ref-add.sed $$orig > $$temp; \
59 $(INSTALL_DATA) $$temp $$dest; \
60 rm -f $$temp; \
61 fi; \
62 fi; \
63 $(MKINSTALLDIRS) $(DESTDIR)$(localedir); \
64 test -f $(DESTDIR)$(localedir)/locale.alias \
65 && orig=$(DESTDIR)$(localedir)/locale.alias \
66 || orig=$(srcdir)locale.alias; \
67 temp=$(DESTDIR)$(localedir)/t-locale.alias; \
68 dest=$(DESTDIR)$(localedir)/locale.alias; \
69 sed -f ref-add.sed $$orig > $$temp; \
70 $(INSTALL_DATA) $$temp $$dest; \
71 rm -f $$temp; \
72 else \
73 : ; \
76 uninstall-local:
77 @if test '$(CONFIG_NLS)' = yes; then \
78 if test -f $(DESTDIR)$(libdir)/charset.alias; then \
79 temp=$(DESTDIR)$(libdir)/t-charset.alias; \
80 dest=$(DESTDIR)$(libdir)/charset.alias; \
81 sed -f ref-del.sed $$dest > $$temp; \
82 if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
83 rm -f $$dest; \
84 else \
85 $(INSTALL_DATA) $$temp $$dest; \
86 fi; \
87 rm -f $$temp; \
88 fi; \
89 if test -f $(DESTDIR)$(localedir)/locale.alias; then \
90 temp=$(DESTDIR)$(localedir)/t-locale.alias; \
91 dest=$(DESTDIR)$(localedir)/locale.alias; \
92 sed -f ref-del.sed $$dest > $$temp; \
93 if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
94 rm -f $$dest; \
95 else \
96 $(INSTALL_DATA) $$temp $$dest; \
97 fi; \
98 rm -f $$temp; \
99 fi; \
100 else \
101 : ; \
104 include $(top_srcdir)/Makefile.lib