On Fri, Oct 03, 2008 at 11:10:22AM +0200, strk wrote:
> My proposal is as follows:
>
> 1) Don't distribute .gmo files.
> 2) Don't install .gmo files if gettext isn't found.
> 3) Don't update .po files on 'make dist'.
> 4) Keep the update-po rule to explicitly update gnash.pot and .po files,
> to be used periodically with a subsequent commit.
Attached is a patch for testing this.
--strk;
=== modified file 'po/Makefile.am'
--- po/Makefile.am 2008-07-22 21:24:49 +0000
+++ po/Makefile.am 2008-10-03 09:29:59 +0000
@@ -20,12 +20,6 @@
POFILES = AUTO
-MAINTAINERCLEANFILES = \
- *.gmo \
- gnash.pot \
- POTFILES \
- update-po
-
translations = cs de es fi fr it ja sv
# This is GNU make specific, so if you are building Gnash on a BSD
@@ -34,6 +28,13 @@
pofiles := $(patsubst %,%.po,$(translations))
gmofiles := $(patsubst %,%.gmo,$(translations))
+MAINTAINERCLEANFILES = \
+ gnash.pot
+
+CLEANFILES = \
+ $(gmofiles) \
+ POTFILES
+
dirs = $(top_srcdir)/libbase \
$(top_srcdir)/backend \
$(top_srcdir)/libamf \
@@ -59,12 +60,10 @@
srcfiles := $(foreach dir,$(dirs),$(wildcard $(dir)/*.cpp))
-EXTRA_DIST = $(gmofiles) $(pofiles) gnash.pot POTFILES update-po
+EXTRA_DIST = $(pofiles) gnash.pot
all: $(gmofiles)
-if HAS_GETTEXT
-
POTFILES: $(srcfiles)
@echo "Building POTFILES..."
@rm -f POTFILES
@@ -72,8 +71,10 @@
echo "$$i" >> POTFILES;\
done
+if HAS_GETTEXT
+
gnash.pot: POTFILES
- $(XGETTEXT) --language=C++ --files-from=POTFILES -o gnash.pot \
+ $(XGETTEXT) --language=C++ --files-from=POTFILES -o $(srcdir)/gnash.pot
\
--default-domain=gnash --force \
--flag=_:1:pass-c-format --keyword=_ \
--copyright-holder='Free Software Foundation, Inc.'
@@ -81,9 +82,8 @@
update-po: gnash.pot
@for i in $(pofiles); do \
echo "Merging $$i..." ; \
- $(MSGMERGE) --update $(srcdir)/$$i gnash.pot; \
+ $(MSGMERGE) --update $(srcdir)/$$i $(srcdir)/gnash.pot; \
done
- touch update-po
$(gmofiles): #update-po
@@ -94,17 +94,10 @@
else # not HAS_GETTEXT
$(gmofiles): force
- @for i in $(gmofiles); do \
- ln -fs $(srcdir)/$$i $$i; \
- done
-
-$(pofiles): force
- @for i in $(pofiles); do \
- ln -fs $(srcdir)/$$i $$i; \
- done
-
-POTFILES gnash.pot update-po: force
- ln -fs $(srcdir)/$@ $@
+ @echo "WARNING: can't compile $@ translations w/out gettext"
+
+update-po: force
+ @echo "WARNING: can't update translation files (.po) w/out gettext"
endif # not HAS_GETTEXT
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev