]> git.sesse.net Git - vlc/commitdiff
"toolbox --update-po" becomes "make update-po"
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 13 Aug 2005 13:14:19 +0000 (13:14 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 13 Aug 2005 13:14:19 +0000 (13:14 +0000)
Now can update PO when compiling from subdir

Makefile.am
toolbox

index 8984940bcd7d9aa75578ca3fc22b5834e49e6ef8..4e608f1eba51a7ef1620373bed42306f93e99e9a 100644 (file)
@@ -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
 ###############################################################################
diff --git a/toolbox b/toolbox
index b488003d129191237b3ba5b2b7d037e213b09432..5911747227232a1d23c83e89ed9803bedd847dd2 100755 (executable)
--- a/toolbox
+++ b/toolbox
@@ -138,7 +138,8 @@ then
   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`
@@ -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
 
 ##