1 |
424 |
jeremybenn |
## Makefile for the po subdirectory of the GNU C++ Standard library.
|
2 |
|
|
##
|
3 |
|
|
## Copyright (C) 2001, 2003, 2004, 2009 Free Software Foundation, Inc.
|
4 |
|
|
##
|
5 |
|
|
## This file is part of the libstdc++ version 3 distribution.
|
6 |
|
|
## Process this file with automake to produce Makefile.in.
|
7 |
|
|
|
8 |
|
|
## This file is part of the GNU ISO C++ Library. This library is free
|
9 |
|
|
## software; you can redistribute it and/or modify it under the
|
10 |
|
|
## terms of the GNU General Public License as published by the
|
11 |
|
|
## Free Software Foundation; either version 3, or (at your option)
|
12 |
|
|
## any later version.
|
13 |
|
|
|
14 |
|
|
## This library is distributed in the hope that it will be useful,
|
15 |
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
|
|
## GNU General Public License for more details.
|
18 |
|
|
|
19 |
|
|
## You should have received a copy of the GNU General Public License along
|
20 |
|
|
## with this library; see the file COPYING3. If not see
|
21 |
|
|
## .
|
22 |
|
|
|
23 |
|
|
include $(top_srcdir)/fragment.am
|
24 |
|
|
|
25 |
|
|
# Location of installation directories.
|
26 |
|
|
locale_installdir = $(DESTDIR)$(datadir)/locale
|
27 |
|
|
locale_builddir = $(glibcxx_localedir)
|
28 |
|
|
|
29 |
|
|
# Tell automake that foo.po makes foo.mo
|
30 |
|
|
SUFFIXES = .po .mo
|
31 |
|
|
|
32 |
|
|
LOCALE_IN = $(glibcxx_POFILES)
|
33 |
|
|
LOCALE_OUT = $(glibcxx_MOFILES)
|
34 |
|
|
|
35 |
|
|
MSGFMT = msgfmt
|
36 |
|
|
|
37 |
|
|
# Necessary files.
|
38 |
|
|
EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN)
|
39 |
|
|
|
40 |
|
|
.po.mo:
|
41 |
|
|
$(MSGFMT) -o $@ $<
|
42 |
|
|
|
43 |
|
|
all-local: all-local-$(USE_NLS)
|
44 |
|
|
all-local-no:
|
45 |
|
|
all-local-yes: $(LOCALE_OUT)
|
46 |
|
|
|
47 |
|
|
# 'make check' needs the catalogs constructed in build directory.
|
48 |
|
|
check: check-$(USE_NLS)
|
49 |
|
|
check-no:
|
50 |
|
|
check-yes:
|
51 |
|
|
$(mkinstalldirs) $(locale_builddir)
|
52 |
|
|
catalogs='$(LOCALE_OUT)'; \
|
53 |
|
|
for cat in $$catalogs; do \
|
54 |
|
|
cat=`basename $$cat`; \
|
55 |
|
|
lang=`echo $$cat | sed 's/\.mo$$//'`; \
|
56 |
|
|
install_dir=$(locale_builddir)/$$lang/LC_MESSAGES; \
|
57 |
|
|
$(mkinstalldirs) $$install_dir; \
|
58 |
|
|
$(INSTALL_DATA) $$cat $$install_dir/$(PACKAGE).mo; \
|
59 |
|
|
done
|
60 |
|
|
|
61 |
|
|
# Install rules here.
|
62 |
|
|
# Wish install could just `cp -R ./share $(locale_installdir)` ...
|
63 |
|
|
install-data-local: install-data-local-$(USE_NLS)
|
64 |
|
|
install-data-local-no:
|
65 |
|
|
install-data-local-yes: all-local-yes
|
66 |
|
|
$(mkinstalldirs) $(locale_installdir)
|
67 |
|
|
catalogs='$(LOCALE_OUT)'; \
|
68 |
|
|
for cat in $$catalogs; do \
|
69 |
|
|
cat=`basename $$cat`; \
|
70 |
|
|
lang=`echo $$cat | sed 's/\.mo$$//'`; \
|
71 |
|
|
install_dir=$(locale_installdir)/$$lang/LC_MESSAGES; \
|
72 |
|
|
$(mkinstalldirs) $$install_dir; \
|
73 |
|
|
$(INSTALL_DATA) $$cat $$install_dir/$(PACKAGE).mo; \
|
74 |
|
|
done
|
75 |
|
|
|
76 |
|
|
# Maintainence of the .po template file. This rule is never run automatically,
|
77 |
|
|
# and updates the source directory.
|
78 |
|
|
pot:
|
79 |
|
|
cd $(glibcxx_srcdir); \
|
80 |
|
|
xgettext --default-domain=$(PACKAGE) --add-comments --c++ --debug \
|
81 |
|
|
--join-existing -o po/$(PACKAGE).pot --keyword=__N \
|
82 |
|
|
`grep -r -l '__N(".*")' .`
|
83 |
|
|
|
84 |
|
|
# Specify what gets cleaned up on a 'make clean'
|
85 |
|
|
CLEANFILES = $(LOCALE_OUT)
|