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
23 translations = cs de es fi fr it ja
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))
57 EXTRA_DIST = $(pofiles) gnash.pot
67 for i in `find $(dirs) -name '*.cpp'`; do \
68 echo "$$i" >> po/POTFILES;\
70 $(XGETTEXT) --language=C++ --files-from=po/POTFILES \
71 -o $(srcdir)/gnash.pot \
72 --default-domain=gnash --force \
73 --flag=_:1:pass-c-format --keyword=_ --keyword=_q \
74 --copyright-holder='Free Software Foundation, Inc.'; \
78 rm -f $(srcdir)/gnash.pot # force rebuild of this
80 for i in $(pofiles); do \
81 echo "Merging $$i..." ; \
82 $(MSGMERGE) --update $(srcdir)/$$i $(srcdir)/gnash.pot; \
87 $(GMSGFMT) --statistics --directory=$(srcdir) -o $*.gmo $(@:%.gmo=%.po)
89 else # not HAS_GETTEXT
92 @echo "WARNING: can't compile $@ translations w/out gettext"
95 @echo "WARNING: can't update translation files (.po) w/out gettext"
97 endif # not HAS_GETTEXT
101 # install-hook: rename the .gmo files to gnash.mo at installation time
102 install-data-hook: $(gmofiles)
103 @for i in $(translations); do \
104 $(mkinstalldirs) "$(DESTDIR)$(datadir)/locale/$$i/LC_MESSAGES/"; \
105 if test -f $$i.gmo; then \
106 $(INSTALL_DATA) $$i.gmo $(DESTDIR)$(datadir)/locale/$$i/LC_MESSAGES/gnash.mo; \
111 for i in $(translations); do \
112 rm -f "$(DESTDIR)$(datadir)/locale/$$i/LC_MESSAGES/gnash.mo"; \