This patch makes it so that translations added to po/ directories are

automatically added to the set of languages to be built and installed
unless they are explicitly added to the set of disabled translations.
This eliminates the need to manually add a lang to the Makefile when a
new translation is submitted (svn add will still be necessary).
This commit is contained in:
Steve Beattie 2006-11-15 09:22:15 +00:00
parent e61bcba834
commit 4f16824434
6 changed files with 19 additions and 14 deletions

View file

@ -20,7 +20,8 @@ XGETTEXT_ARGS=--copyright-holder="NOVELL, Inc." --msgid-bugs-address=apparmor-ge
# pass in the list of sources in the SOURCES variable
PARENT_SOURCES=$(foreach source, ${SOURCES}, ../${source})
TARGET_MOS=$(foreach lang, ${LANGS}, ${lang}.mo)
LANGS=$(patsubst %.po, %, $(wildcard *.po))
TARGET_MOS=$(foreach lang, $(filter-out $(DISABLED_LANGS),$(LANGS)), ${lang}.mo)
.PHONY: all
all: ${TARGET_MOS}

View file

@ -10,10 +10,10 @@
# ------------------------------------------------------------------
all:
# As translations get added, add them to the LANGS variable to get
# made/installed.
LANGS=de_DE es_ES fr_FR hu_HU it_IT ja_JP nb_NO pt_BR pt_PT zh_CN zh_TW
# As translations get added, they will automatically be included, unless
# the lang is explicitly added to DISABLED_LANGS; e.g. DISABLED_LANGS=en es
DISABLED_LANGS=
include ../../common/Make-po.rules
../../common/Make-po.rules:

View file

@ -10,9 +10,10 @@
# ------------------------------------------------------------------
all:
# As translations get added, add them to the LANGS variable to get
# made/installed.
LANGS=en_US de_DE es_ES fr_FR hu_HU it_IT ja_JP nb_NO pt_BR pt_PT zh_CN zh_TW
# As translations get added, they will automatically be included, unless
# the lang is explicitly added to DISABLED_LANGS; e.g. DISABLED_LANGS=en es
DISABLED_LANGS=
include ../../common/Make-po.rules

View file

@ -8,11 +8,10 @@
# ----------------------------------------------------------------------
all:
# As translations get added, add them to the LANGS variable to get
# made/installed.
# As translations get added, they will automatically be included, unless
# the lang is explicitly added to DISABLED_LANGS; e.g. DISABLED_LANGS=en es
# DISABLED LANGS = ar
LANGS=ar bg bn bs ca cs cy da de el en_GB en_US es et fi fr gl he hi hr hu id it ja ka km ko lo lt mk nb nl pa pl pt_BR pt ro ru sk sl sr sv ta tr uk vi zh_CN zh_TW
DISABLED_LANGS=
include ../common/Make-po.rules
../common/Make-po.rules:

View file

@ -29,6 +29,9 @@ endif
TOOLS = genprof logprof autodep audit complain enforce \
unconfined aa-eventd apparmor_status
all:
make -C po all
# need some better way of determining this
DESTDIR=/
BINDIR=${DESTDIR}/usr/sbin

View file

@ -16,9 +16,10 @@
# ----------------------------------------------------------------------
all:
# As translations get added, add them to the LANGS variable to get
# made/installed.
LANGS=ar bg bn bs ca cs cy da de el en_GB en_US es et fi fr gl he hi hr hu id it ja ka km ko lo lt mk nb nl pa pl pt_BR pt_PT pt ro ru sk sl sr sv ta tr uk vi zh_CN zh_TW
# As translations get added, they will automatically be included, unless
# the lang is explicitly added to DISABLED_LANGS; e.g. DISABLED_LANGS=en es
DISABLED_LANGS=
include ../common/Make-po.rules
../common/Make-po.rules: