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: ...@@ -1022,6 +1022,32 @@ package-translations:
$(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \ $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
| GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz | 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 # Stamp rules
############################################################################### ###############################################################################
......
...@@ -138,7 +138,8 @@ then ...@@ -138,7 +138,8 @@ then
fi fi
# The evil ^M. printf '\r' does not work in Cygwin. # The evil ^M. printf '\r' does not work in Cygwin.
M=' ' M='
'
# Variables we get from configure.ac # Variables we get from configure.ac
LIBVLC_VERSION=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac` LIBVLC_VERSION=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac`
...@@ -370,27 +371,9 @@ fi ...@@ -370,27 +371,9 @@ fi
if test "${action}" = "po" if test "${action}" = "po"
then then
# find out the source files # find out the source files
rm -f po/POTFILES.in echo "WARNING: you should run \"make update-po\" instead!" >&2
echo "# automatically created by toolbox --update-po" > po/POTFILES.in make update-po
echo "" >> po/POTFILES.in exit $?
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
fi 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