mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Improved the 'i18n' target in plugin Makefiles
This commit is contained in:
22
newplugin
22
newplugin
@@ -12,7 +12,7 @@
|
||||
# See the main source file 'vdr.c' for copyright information and
|
||||
# how to reach the author.
|
||||
#
|
||||
# $Id: newplugin 1.38 2007/10/14 09:13:17 kls Exp $
|
||||
# $Id: newplugin 1.39 2007/11/04 10:42:52 kls Exp $
|
||||
|
||||
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
|
||||
|
||||
@@ -131,25 +131,25 @@ DEPFILE = .dependencies
|
||||
PODIR = po
|
||||
LOCALEDIR = \$(VDRDIR)/locale
|
||||
I18Npo = \$(wildcard \$(PODIR)/*.po)
|
||||
I18Nmo = \$(addsuffix .mo, \$(foreach file, \$(I18Npo), \$(basename \$(file))))
|
||||
I18Ndirs = \$(notdir \$(foreach file, \$(I18Npo), \$(basename \$(file))))
|
||||
I18Nmsgs = \$(addprefix \$(LOCALEDIR)/, \$(addsuffix /LC_MESSAGES/vdr-\$(PLUGIN).mo, \$(notdir \$(foreach file, \$(I18Npo), \$(basename \$(file))))))
|
||||
I18Npot = \$(PODIR)/\$(PLUGIN).pot
|
||||
|
||||
%.mo: %.po
|
||||
msgfmt -c -o \$\@ \$<
|
||||
|
||||
\$(I18Npot): \$(wildcard *.c)
|
||||
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<see README>' -o \$\@ \$(wildcard *.c)
|
||||
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<see README>' -o \$\@ \$^
|
||||
|
||||
\$(I18Npo): \$(I18Npot)
|
||||
%.po: \$(I18Npot)
|
||||
msgmerge -U --no-wrap --no-location --backup=none -q \$\@ \$<
|
||||
\@touch \$\@
|
||||
|
||||
i18n: \$(I18Npot) \$(I18Nmo)
|
||||
\@mkdir -p \$(LOCALEDIR)
|
||||
for i in \$(I18Ndirs); do\\
|
||||
mkdir -p \$(LOCALEDIR)/\$\$i/LC_MESSAGES;\\
|
||||
cp \$(PODIR)/\$\$i.mo \$(LOCALEDIR)/\$\$i/LC_MESSAGES/vdr-\$(PLUGIN).mo;\\
|
||||
done
|
||||
\$(I18Nmsgs): \$(LOCALEDIR)/%/LC_MESSAGES/vdr-\$(PLUGIN).mo: \$(PODIR)/%.mo
|
||||
\@mkdir -p \$(dir \$@)
|
||||
cp \$< \$\@
|
||||
|
||||
.PHONY: i18n
|
||||
i18n: \$(I18Nmsgs)
|
||||
|
||||
### Targets:
|
||||
|
||||
|
Reference in New Issue
Block a user