]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/po/Makefile.am
Makefile.am: Remove trailing whitespace.
[thirdparty/gcc.git] / libstdc++-v3 / po / Makefile.am
CommitLineData
33590f13
BK
1## Makefile for the po subdirectory of the GNU C++ Standard library.
2##
0df3f383 3## Copyright (C) 2001, 2003 Free Software Foundation, Inc.
33590f13
BK
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 2, 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 COPYING. If not, write to the Free
21## Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
22## USA.
23
82ba99d5 24include $(top_srcdir)/fragment.am
33590f13 25
33590f13
BK
26# Location of installation directories.
27locale_installdir = $(DESTDIR)$(datadir)/locale
ca618b60 28locale_builddir = $(glibcxx_localedir)
33590f13
BK
29
30# Tell automake that foo.po makes foo.mo
31SUFFIXES = .po .mo
32
ca618b60
PE
33LOCALE_IN = $(glibcxx_POFILES)
34LOCALE_OUT = $(glibcxx_MOFILES)
33590f13 35
4e10943d
BK
36MSGFMT = msgfmt
37
38# Necessary files.
39DISTFILES = \
40 Makefile.am Makefile.in string_literals.cc POTFILES.in $(PACKAGE).pot \
ca618b60 41 $(LOCALE_IN)
4e10943d 42
33590f13 43.po.mo:
ddff0393 44 $(MSGFMT) -o $@ $<
33590f13 45
ca618b60
PE
46all-local: all-local-$(USE_NLS)
47all-local-no:
48all-local-yes: $(LOCALE_OUT)
58b08ac3
BK
49
50# 'make check' needs the catalogs constructed in build directory.
ca618b60 51check: check-$(USE_NLS)
0b293f29
BK
52check-no:
53check-yes:
ca618b60 54 $(mkinstalldirs) $(locale_builddir)
0df3f383 55 catalogs='$(LOCALE_OUT)'; \
58b08ac3
BK
56 for cat in $$catalogs; do \
57 cat=`basename $$cat`; \
58 lang=`echo $$cat | sed 's/\.mo$$//'`; \
59 install_dir=$(locale_builddir)/$$lang/LC_MESSAGES; \
60 $(mkinstalldirs) $$install_dir; \
61 $(INSTALL_DATA) $$cat $$install_dir/$(PACKAGE).mo; \
ca618b60 62 done
33590f13 63
ca618b60 64# Install rules here.
33590f13 65# Wish install could just `cp -R ./share $(locale_installdir)` ...
ca618b60 66install-data-local: install-data-local-$(USE_NLS)
33590f13
BK
67install-data-local-no:
68install-data-local-yes: all-local-yes
ca618b60 69 $(mkinstalldirs) $(locale_installdir)
0df3f383 70 catalogs='$(LOCALE_OUT)'; \
33590f13
BK
71 for cat in $$catalogs; do \
72 cat=`basename $$cat`; \
73 lang=`echo $$cat | sed 's/\.mo$$//'`; \
74 install_dir=$(locale_installdir)/$$lang/LC_MESSAGES; \
75 $(mkinstalldirs) $$install_dir; \
0b293f29 76 $(INSTALL_DATA) $$cat $$install_dir/$(PACKAGE).mo; \
33590f13
BK
77 done
78
ad414290
PE
79# Maintainence of the .po template file. This rule is never run automatically,
80# and updates the source directory.
81pot:
3d7c150e 82 cd $(glibcxx_srcdir); \
ad414290
PE
83 xgettext --default-domain=$(PACKAGE) --add-comments --c++ --debug \
84 --join-existing -o po/$(PACKAGE).pot --keyword=__N \
85 `grep -r -l '__N(".*")' .`
86
33590f13 87# Specify what gets cleaned up on a 'make clean'
ca618b60 88CLEANFILES = $(LOCALE_OUT)