1
1
# Makefile for PO directory in any package using GNU gettext.
2
# Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
2
# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
4
4
# This file can be copied and used freely without restrictions. It can
5
5
# be used in projects which are not available under the GNU General Public
25
25
exec_prefix = @exec_prefix@
26
datarootdir = @datarootdir@
26
27
datadir = @datadir@
27
localedir = $(datadir)/locale
28
localedir = @localedir@
28
29
gettextsrcdir = $(datadir)/gettext/po
30
31
INSTALL = @INSTALL@
31
32
INSTALL_DATA = @INSTALL_DATA@
32
MKINSTALLDIRS = @MKINSTALLDIRS@
33
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
35
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
36
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
37
# @install_sh@ does not start with $(SHELL), so we add it.
38
# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
39
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
40
# versions, $(mkinstalldirs) and $(install_sh) are unused.
41
mkinstalldirs = $(SHELL) @install_sh@ -d
42
install_sh = $(SHELL) @install_sh@
47
GMSGFMT_no = @GMSGFMT@
48
GMSGFMT_yes = @GMSGFMT_015@
49
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
52
MSGFMT_yes = @MSGFMT_015@
53
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
54
XGETTEXT_ = @XGETTEXT@
55
XGETTEXT_no = @XGETTEXT@
56
XGETTEXT_yes = @XGETTEXT_015@
57
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
38
58
MSGMERGE = msgmerge
39
59
MSGMERGE_UPDATE = @MSGMERGE@ --update
159
179
install-data: install-data-@USE_NLS@
160
180
if test "$(PACKAGE)" = "gettext-tools"; then \
161
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
181
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
162
182
for file in $(DISTFILES.common) Makevars.template; do \
163
183
$(INSTALL_DATA) $(srcdir)/$$file \
164
184
$(DESTDIR)$(gettextsrcdir)/$$file; \
172
192
install-data-no: all
173
193
install-data-yes: all
174
$(mkinstalldirs) $(DESTDIR)$(datadir)
194
$(mkdir_p) $(DESTDIR)$(datadir)
175
195
@catalogs='$(CATALOGS)'; \
176
196
for cat in $$catalogs; do \
177
197
cat=`basename $$cat`; \
178
198
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
179
199
dir=$(localedir)/$$lang/LC_MESSAGES; \
180
$(mkinstalldirs) $(DESTDIR)$$dir; \
200
$(mkdir_p) $(DESTDIR)$$dir; \
181
201
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
182
202
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
183
203
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
217
237
installdirs-exec:
218
238
installdirs-data: installdirs-data-@USE_NLS@
219
239
if test "$(PACKAGE)" = "gettext-tools"; then \
220
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
240
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
224
244
installdirs-data-no:
225
245
installdirs-data-yes:
226
$(mkinstalldirs) $(DESTDIR)$(datadir)
246
$(mkdir_p) $(DESTDIR)$(datadir)
227
247
@catalogs='$(CATALOGS)'; \
228
248
for cat in $$catalogs; do \
229
249
cat=`basename $$cat`; \
230
250
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
231
251
dir=$(localedir)/$$lang/LC_MESSAGES; \
232
$(mkinstalldirs) $(DESTDIR)$$dir; \
252
$(mkdir_p) $(DESTDIR)$$dir; \
233
253
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
234
254
if test -n "$$lc"; then \
235
255
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \