$(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
| GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
+###############################################################################
+# PO translation files update
+###############################################################################
+.PHONY: update-po
+
+update-po:
+ rm -f $(top_srcdir)/po/POTFILES.in
+ { \
+ cd $(top_srcdir) ; \
+ echo "# automatically created by make update-po" ; \
+ echo "" ; \
+ echo "# main sources" ; \
+ find include src -name '*.[chm]' -o -name '*.[ch]pp' \
+ | grep -v '\(vlc_symbols\|misc/modules_\)' \
+ | sort ; \
+ echo "" ; \
+ echo "# modules" ; \
+ find modules -name '*.[chm]' -o -name '*.[ch]pp' \
+ | grep -v '\(\.moc\.\|gui/gtk2/\)' \
+ | sort ; \
+ } > $(top_srcdir)/po/POTFILES.in
+ rm -f $(top_srcdir)/po/vlc.pot
+ cd po && $(MAKE) POTFILES $(top_srcdir)/../po/vlc.pot update-po
+
+#cd po && $(MAKE) update-po
+
###############################################################################
# Stamp rules
###############################################################################
fi
# The evil ^M. printf '\r' does not work in Cygwin.
- M='\r'
+ M='
+'
# Variables we get from configure.ac
LIBVLC_VERSION=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac`
if test "${action}" = "po"
then
# find out the source files
- rm -f po/POTFILES.in
- echo "# automatically created by toolbox --update-po" > po/POTFILES.in
- echo "" >> po/POTFILES.in
- echo "# main sources" >> po/POTFILES.in
- find include src -name '*.[chm]' -o -name '*.[ch]pp' \
- | grep -v '\(vlc_symbols\|misc/modules_\)' \
- | sort >> po/POTFILES.in
- echo "" >> po/POTFILES.in
- echo "# modules" >> po/POTFILES.in
- find modules -name '*.[chm]' -o -name '*.[ch]pp' \
- | grep -v '\(\.moc\.\|gui/gtk2/\)' \
- | sort >> po/POTFILES.in
- # clean old potfiles
- cd po
- rm -f vlc.pot
- # update
- make vlc.pot || exit 1
- make update-po || exit 1
- cd ..
-
- exit 0
+ echo "WARNING: you should run \"make update-po\" instead!" >&2
+ make update-po
+ exit $?
fi
##