summaryrefslogtreecommitdiff
path: root/messages
diff options
context:
space:
mode:
authorbwarsaw2001-05-18 21:36:30 +0000
committerbwarsaw2001-05-18 21:36:30 +0000
commit701e48bedc9563807f5f5ea9d6b06f0063d8f110 (patch)
tree10ee3cac4a46508d3c7059aec09a19e94517b60f /messages
parent780fbb70ac15bd9f6839577e5bf920a5f98c5d8c (diff)
downloadmailman-701e48bedc9563807f5f5ea9d6b06f0063d8f110.tar.gz
mailman-701e48bedc9563807f5f5ea9d6b06f0063d8f110.tar.zst
mailman-701e48bedc9563807f5f5ea9d6b06f0063d8f110.zip
Diffstat (limited to 'messages')
-rw-r--r--messages/Makefile.in133
1 files changed, 133 insertions, 0 deletions
diff --git a/messages/Makefile.in b/messages/Makefile.in
new file mode 100644
index 000000000..c02259b1e
--- /dev/null
+++ b/messages/Makefile.in
@@ -0,0 +1,133 @@
+# Copyright (C) 2001 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.
+
+# Variables set by configure
+
+VPATH= @srcdir@
+srcdir= @srcdir@
+bindir= @bindir@
+prefix= @prefix@
+exec_prefix= @exec_prefix@
+
+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= es rot
+LANGDIRS= $(LANGUAGES:%=messages/%/LC_MESSAGES)
+# Global pygettext extracted po template file
+POTFILE= mailman.pot
+# 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= bin/pygettext.py
+
+.SUFFIXES: .po .mo
+.po.mo:
+ $(MSGFMT) -o $< $@
+
+# Rules
+
+all:
+
+catalogs: $(TARGETS)
+
+install: doinstall
+
+# we should depend on the .mo files instead of making them!
+doinstall:
+ @for d in $(LANGDIRS); \
+ do \
+ dir=$(prefix)/$$d; \
+ echo "Creating language directory $$dir"; \
+ ../mkinstalldirs $$dir; \
+ chmod $(DIRMODE) $$dir; \
+ $(DIRSETGID) $$dir; \
+ done
+ @for d in $(LANGUAGES); \
+ do \
+ readme=$$d/README.$$d; \
+ if test -f $$readme; \
+ then \
+ $(INSTALL) -m $(FILEMODE) $$readme $(prefix)/messages/$$d; \
+ fi; \
+ done
+ @for d in $(LANGUAGES); \
+ do \
+ po=$$d/LC_MESSAGES/mailman.po; \
+ mo=$$d/LC_MESSAGES/mailman.mo; \
+ dir=$(prefix)/messages/$$d/LC_MESSAGES; \
+ $(INSTALL) -m $(FILEMODE) $$po $$mo $$dir; \
+ done
+
+finish:
+
+clean:
+ -rm message.files $(POTFILE)
+
+distclean:
+ -rm Makefile */LC_MESSAGES/mailman.{mo,po.old} $(POTFILE)
+
+
+message.files: FORCE
+ @echo "Calculating input files for pygettext"
+ touch $@
+ (cd ..; find -path '*pythonlib' -prune -o -name '*.py' -print >> messages/$@)
+ (cd ..; grep -r -l '^#! /usr/bin/env python' `find bin` >> messages/$@)
+
+$(POTFILE): message.files
+ @echo "Running pygettext; this might take a while"
+ (cd ..; $(PROG) -p messages -d mailman -D `cat messages/$<`)
+
+# Update the individual mailman.po files with the new changes to the
+# .pot file
+%/LC_MESSAGES/mailman.po: $(POTFILE)
+ @echo "Merging new template file with existing translations"
+ -mv $@ $@.old && $(MSGMERGE) -o $@ $@.old $(POTFILE)
+
+# And convert the .mo to .po
+%/LC_MESSAGES/mailman.mo: %/LC_MESSAGES/mailman.po
+ @echo "Generating binary catalog"
+ msgfmt -o $@ $<
+
+FORCE: