1
# $Id: Make-po.rules 238 2006-11-15 09:22:15Z steve-beattie $
2
# ------------------------------------------------------------------
4
# Copyright (C) 2002-2005 Novell/SUSE
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of version 2 of the GNU General Public
8
# License published by the Free Software Foundation.
10
# ------------------------------------------------------------------
12
# The including makefile needs to define LANG, which lists the lang
13
# files to include; e.g. LANG=en_US de_DE, where en_US.po and de_DE.po
15
LOCALEDIR=/usr/share/locale
17
XGETTEXT_ARGS=--copyright-holder="NOVELL, Inc." --msgid-bugs-address=apparmor-general@forge.novell.com -d ${NAME}
19
# When making the .pot file, it's expected that the parent Makefile will
20
# pass in the list of sources in the SOURCES variable
21
PARENT_SOURCES=$(foreach source, ${SOURCES}, ../${source})
23
LANGS=$(patsubst %.po, %, $(wildcard *.po))
24
TARGET_MOS=$(foreach lang, $(filter-out $(DISABLED_LANGS),$(LANGS)), ${lang}.mo)
29
${NAME}.pot: ${PARENT_SOURCES}
30
xgettext ${XGETTEXT_ARGS} ${PARENT_SOURCES} -o $@
36
install: ${TARGET_MOS}
37
mkdir -p $(DESTDIR)/${LOCALEDIR}
38
for lang in ${LANGS} ; do \
39
mkdir -p ${DESTDIR}/${LOCALEDIR}/$${lang}/LC_MESSAGES ; \
40
install -m 644 $${lang}.mo ${DESTDIR}/${LOCALEDIR}/$${lang}/LC_MESSAGES/${NAME}.mo ; \