tuxpaint-pencil-sharpener/Makefile-i18n

92 lines
1.9 KiB
Text

# Makefile-i18n for tuxpaint
# $Id$
# Tux Paint - A simple drawing program for children.
# Copyright (c) 2002-2008 by Bill Kendrick and others
# bill@newbreedsoftware.com
# http://www.tuxpaint.org/
# June 14, 2002 - April 5, 2008
# Locale files
LOCALE_PREFIX=$(DESTDIR)$(PREFIX)/share/locale
# IM files
IM_PREFIX=$(DESTDIR)$(PREFIX)/share/tuxpaint/im
# A default target, in case someone tries using this makefile directly...
all-i18n:
@echo "This is Makefile-i18n; don't use it directly, it's used by Makefile"
POFILES:=$(wildcard src/po/*.po)
MOFILES:=$(patsubst src/po/%.po,trans/%.mo,$(POFILES))
INSTALLED_MOFILES:=$(patsubst trans/%.mo,$(LOCALE_PREFIX)/%/LC_MESSAGES/tuxpaint.mo,$(MOFILES))
$(INSTALLED_MOFILES): $(LOCALE_PREFIX)/%/LC_MESSAGES/tuxpaint.mo: trans/%.mo
mkdir -p $(@D)
cp $< $@
chmod 644 $@
uninstall-i18n:
-rm $(LOCALE_PREFIX)/*/LC_MESSAGES/tuxpaint.mo
-rm $(IM_PREFIX)/ja.im
-rm $(IM_PREFIX)/ko.im
-rm $(IM_PREFIX)/th.im
-rm $(IM_PREFIX)/zh_tw.im
# Install the translated text:
install-gettext: $(INSTALLED_MOFILES)
# Install the Input Method files:
ifneq ($(IM_PREFIX),)
install-im:
@echo
@echo "...Installing Input Method files..."
@#
@install -d $(IM_PREFIX)
@#
@echo " ja ...Japanese..."
@cp im/ja.im $(IM_PREFIX)/ja.im
@chmod 644 $(IM_PREFIX)/ja.im
@#
@echo " ko ...Korean..."
@cp im/ko.im $(IM_PREFIX)/ko.im
@chmod 644 $(IM_PREFIX)/ko.im
@#
@echo " th ...Thai..."
@cp im/th.im $(IM_PREFIX)/th.im
@chmod 644 $(IM_PREFIX)/th.im
@#
@echo " zh_tw ...Traditional Chinese..."
@cp im/zh_tw.im $(IM_PREFIX)/zh_tw.im
@chmod 644 $(IM_PREFIX)/zh_tw.im
else
install-im:
@echo
@echo "...Not Installing Input Method files (no IM_PREFIX defined)..."
endif
# Build the translation files for gettext
$(MOFILES): trans/%.mo: src/po/%.po
msgfmt -o $@ $<
translations: trans $(MOFILES)
trans:
@echo
@echo "...Preparing translation files..."
@mkdir trans