1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
# Copyright (C) 2001-2003 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# NOTE: Makefile.in is converted into Makefile by the configure script
# in the parent directory. Once configure has run, you can recreate
# the Makefile by running just config.status.
#
# NOTE: You should ordinarily never need to run "make catalogs", but
# if you find you do, you will need GNU make, and the GNU gettext
# suite (e.g. msgfmt, msgmerge).
# Variables set by configure
VPATH= @srcdir@
srcdir= @srcdir@
bindir= @bindir@
prefix= @prefix@
exec_prefix= @exec_prefix@
DESTDIR=
CC= @CC@
CHMOD= @CHMOD@
INSTALL= @INSTALL@
DEFS= @DEFS@
# Customizable but not set by configure
OPT= @OPT@
CFLAGS= $(OPT) $(DEFS)
PACKAGEDIR= $(prefix)/messages
SHELL= /bin/sh
DIRSETGID= chmod g+s
MSGFMT= msgfmt
MSGMERGE= msgmerge
# CVS available languages
LANGUAGES= cs de es et fi fr hu it ja ko lt nl no pt pt_BR ru sv
LANGDIRS= $(LANGUAGES:%=messages/%/LC_MESSAGES)
# Human readable po file
POFILES= $(LANGUAGES:%=%/LC_MESSAGES/mailman.po)
# Binary generated mo file
MOFILES= $(LANGUAGES:%=%/LC_MESSAGES/mailman.mo)
TARGETS= $(MOFILES)
# Modes for directories and executables created by the install
# process. Default to group-writable directories but
# user-only-writable for executables.
DIRMODE= 775
EXEMODE= 755
FILEMODE= 644
INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
PROG= @PYTHON@ build/bin/pygettext.py
.SUFFIXES: .po .mo
.po.mo:
-$(MSGFMT) -o $@ $<
# Rules
all:
catalogs: $(TARGETS)
check:
@for file in $(POFILES); \
do \
echo "Checking $$file"; \
msgfmt -o /dev/null --statistics -v $$file; \
done
install: doinstall
# we should depend on the .mo files instead of making them!
doinstall:
@for d in $(LANGDIRS); \
do \
dir=$(DESTDIR)$(prefix)/$$d; \
echo "Creating language directory $$dir"; \
$(srcdir)/../mkinstalldirs $$dir; \
chmod $(DIRMODE) $$dir; \
$(DIRSETGID) $$dir; \
done
@for d in $(LANGUAGES); \
do \
readme=$(srcdir)/$$d/README.$$d; \
if test -f $$readme; \
then \
$(INSTALL) -m $(FILEMODE) $$readme $(DESTDIR)$(prefix)/messages/$$d; \
fi; \
done
@for d in $(LANGUAGES); \
do \
po=$(srcdir)/$$d/LC_MESSAGES/mailman.po; \
mo=$(srcdir)/$$d/LC_MESSAGES/mailman.mo; \
dir=$(DESTDIR)$(prefix)/messages/$$d/LC_MESSAGES; \
$(INSTALL) -m $(FILEMODE) $$po $$mo $$dir; \
done
finish:
clean:
-rm -f marked.files docstring.files
distclean: clean
-rm -f Makefile
catclean:
-rm -f Makefile */LC_MESSAGES/mailman.mo */LC_MESSAGES/mailman.po.old $(POTFILE)
-rm *.pot
marked.files:
@echo "Calculating marked input files for pygettext"
(cd ..; find Mailman -path '*pythonlib' -prune -o -path '*Commands/cmd_*.py' -prune -o -name '*.py' -print >| messages/$@)
docstring.files:
@echo "Calculating script input files for pygettext"
(cd ..; grep -d skip -l -i '^#! .*python.*' `find bin cron scripts -name ".#*" -prune -o -print` | grep -v pygettext >| messages/$@)
(cd ..; ls Mailman/Commands/cmd_*.py >> messages/$@)
mailman.pot: marked.files docstring.files
@echo "Running pygettext on $@; this make take a while."
(cd ..; $(PROG) -p messages -d mailman -D -X messages/marked.files `cat messages/marked.files messages/docstring.files`)
# Update the individual mailman.po files with the new changes to the
# .pot file
%/LC_MESSAGES/mailman.po: mailman.pot
@echo "Merging new template file with existing translations"
-mv $@ $@.old && $(MSGMERGE) -o $@ $@.old mailman.pot
FORCE:
|