1 ## Process this file with automake to generate Makefile.in
3 # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 AUTOMAKE_OPTIONS = -Wno-portability
22 translations = cs da de en_GB es fi fr it ja el km ne ru zh_TW
25 # This is GNU make specific, so if you are building Gnash on a BSD
26 # machine, you probably want to install GNU make in additional to
28 pofiles := $(patsubst %,%.po,$(translations))
29 gmofiles := $(patsubst %,%.gmo,$(translations))
47 EXTRA_DIST = $(pofiles) gnash.pot
57 for i in `find $(dirs) -name '*.cpp'`; do \
58 echo "$$i" >> po/POTFILES;\
60 $(XGETTEXT) --language=C++ --files-from=po/POTFILES \
62 --default-domain=gnash --force \
63 --flag=_:1:pass-c-format --keyword=_ --keyword=_q \
64 --copyright-holder='Free Software Foundation, Inc.'; \
68 rm -f $(srcdir)/gnash.pot # force rebuild of this
70 for i in $(pofiles); do \
71 echo "Merging $$i..." ; \
72 $(MSGMERGE) --update $(srcdir)/$$i $(srcdir)/gnash.pot; \
77 $(GMSGFMT) --statistics --directory=$(srcdir) -o $*.gmo $(@:%.gmo=%.po)
79 else # not HAS_GETTEXT
82 @echo "WARNING: can't compile $@ translations w/out gettext"
85 @echo "WARNING: can't update translation files (.po) w/out gettext"
87 endif # not HAS_GETTEXT
91 # install-hook: rename the .gmo files to gnash.mo at installation time
92 install-data-hook: $(gmofiles)
93 @for i in $(translations); do \
94 $(mkinstalldirs) "$(DESTDIR)$(datadir)/locale/$$i/LC_MESSAGES/"; \
95 if test -f $$i.gmo; then \
96 $(INSTALL_DATA) $$i.gmo $(DESTDIR)$(datadir)/locale/$$i/LC_MESSAGES/gnash.mo; \
101 for i in $(translations); do \
102 rm -f "$(DESTDIR)$(datadir)/locale/$$i/LC_MESSAGES/gnash.mo"; \