Commit c8c60216 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

"toolbox --update-po" becomes "make update-po"

Now can update PO when compiling from subdir
parent 653b115f
......@@ -1022,6 +1022,32 @@ package-translations:
$(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
###############################################################################
......
......@@ -138,7 +138,8 @@ then
fi
# The evil ^M. printf '\r' does not work in Cygwin.
M=' '
M='
'
# Variables we get from configure.ac
LIBVLC_VERSION=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac`
......@@ -370,27 +371,9 @@ fi
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
##
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment