Update.
[platform/upstream/glibc.git] / po / Makefile
1 # Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
3
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Library General Public License
6 # as published by the Free Software Foundation; either version 2 of
7 # the License, or (at your option) any later version.
8
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Library General Public License for more details.
13
14 # You should have received a copy of the GNU Library General Public
15 # License along with the GNU C Library; see the file COPYING.LIB.  If not,
16 # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
18
19 # Makefile for installing libc message catalogs.
20
21 subdir := po
22
23 # List of languages for which we have message catalogs of translations.
24 ALL_LINGUAS := $(basename $(wildcard *.po))
25
26 # You can override this in configparms or the make command line to limit
27 # the languages which get installed.
28 ifdef LINGUAS
29 LINGUAS := $(filter $(addsuffix %,$(LINGUAS)),$(ALL_LINGUAS))
30 else
31 LINGUAS = $(ALL_LINGUAS)
32 endif
33
34 # Text domain name to install under; must match ../locale/SYS_libc.c string.
35 domainname = libc
36
37 all: # Make this the default target; it will be defined in Rules.
38
39 include ../Makeconfig
40
41 # Pattern for where message catalog object for language % gets installed.
42 mo-installed = $(inst_msgcatdir)/%/LC_MESSAGES/$(domainname).mo
43
44 # Files to install: a $(domainname).mo file for each language.
45 install-others = $(LINGUAS:%=$(mo-installed))
46
47 # Files to distribute: all the source and compiled binary translation files.
48 distribute = $(ALL_LINGUAS:=.po) $(ALL_LINGUAS:=.mo) libc.pot header.pot
49
50
51 include ../Rules
52
53
54 .SUFFIXES: .mo .po .pot
55
56 # Compile the binary message object files from the portable object source
57 # files of translations for each language.
58 %.mo: %.po
59         $(MSGFMT) -o $@ $<
60
61 # Install the message object files as libc.po in the language directory.
62 $(mo-installed): %.mo $(+force); $(do-install) || exit 0
63
64 .PHONY: linguas linguas.mo
65 linguas: $(ALL_LINGUAS:=.po)
66 linguas.mo: $(ALL_LINGUAS:=.mo)
67
68 realclean:
69         rm -f $(ALL_LINGUAS:=.mo)
70 \f
71 # Copy the PO files from the translation coordinator's repository.
72
73 podir = /com/share/ftp/gnu/po/maint/glibc
74
75 pofiles := $(wildcard $(podir)/*.po)
76
77 ifneq (,$(pofiles))
78
79 %.po: $(podir)/%.po
80         cp -f $< $@
81         chmod 444 $@
82
83 linguas: $(pofiles:$(podir)/%=%)
84 ifeq ($(with-cvs),yes)
85         test ! -d CVS || cvs $(CVSOPTS) commit -m'Copied from $(podir)' $^
86 endif
87 linguas.mo: $(pofiles:$(podir)/%.po=%.mo)
88
89 endif