]> sourceware.org Git - glibc.git/blob - po/Makefile
8680be0fc5bdd2ef1b86c8a1d60174d467dc33c0
[glibc.git] / po / Makefile
1 # Makefile for installing libc message catalogs.
2
3 # Copyright (C) 1996 Free Software Foundation, Inc.
4 # This file is part of the GNU C Library.
5
6 # The GNU C Library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Library General Public License
8 # as published by the Free Software Foundation; either version 2 of
9 # the License, or (at your option) any later version.
10
11 # The GNU C Library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Library General Public License for more details.
15
16 # You should have received a copy of the GNU Library General Public
17 # License along with the GNU C Library; see the file COPYING.LIB. If
18 # not, write to the Free Software Foundation, Inc., 675 Mass Ave,
19 # Cambridge, MA 02139, USA.
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 = SYS_GNU_libc-$(version)
36
37 # Get $(version) defined.
38 include ../Makeconfig
39 -include $(common-objpfx)version.mk
40
41 # Pattern for where message catalog object for language % gets installed.
42 mo-installed = $(localedir)/%/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)
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 SYS_libc.po in the language directory.
62 $(mo-installed): %.mo; $(do-install)
63
64 .PHONY: linguas linguas.mo
65 linguas: $(ALL_LINGUAS:=.po)
66 linguas.mo: $(ALL_LINGUAS:=.mo)
67 \f
68 # Copy the PO files from the translation coordinator's repository.
69
70 podir = /com/share/ftp/gnu/po/maint/glibc
71
72 pofiles := $(wildcard $(podir)/*.po)
73
74 ifneq (,$(pofiles))
75
76 %.po: $(podir)/%.po
77 cp -f $< $@
78 chmod 444 $@
79
80 linguas: $(pofiles:$(podir)/%=%)
81 test ! -d CVS || cvs commit -m'Copied from $(podir)' $^
82 linguas.mo: $(pofiles:$(podir)/%.po=%.mo)
83 test ! -d CVS || cvs commit -m'Compiled translations' $^
84
85 endif
This page took 0.039142 seconds and 4 git commands to generate.