]> git.sesse.net Git - vlc/blobdiff - toolbox
* configure.ac.in is no more, we can now use configure.ac like normal people,
[vlc] / toolbox
diff --git a/toolbox b/toolbox
index 73aa41f5bc5395f2e483b49fa06e2d1ba2df3702..dc75194a78f3fda429558aa68dfc109707ebe34b 100755 (executable)
--- a/toolbox
+++ b/toolbox
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 ##  toolbox for the VLC media player
-##  $Id: toolbox,v 1.22 2003/04/14 23:07:38 sam Exp $
+##  $Id: toolbox,v 1.26 2003/06/21 17:04:20 sam Exp $
 ##
 ##  Authors: Samuel Hocevar <sam@zoy.org>
 
@@ -109,9 +109,9 @@ then
   #  The evil ^M
   M='\r'
 
-  #  Variables we get from configure.ac.in
-  LIBVLC_VERSION=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac.in`
-  LIBVLC_CODENAME=`sed -ne '/CODENAME=/s/.*"\(.*\)"/\1/p' < configure.ac.in`
+  #  Variables we get from configure.ac
+  LIBVLC_VERSION=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac`
+  LIBVLC_CODENAME=`sed -ne '/CODENAME=/s/.*"\(.*\)"/\1/p' < configure.ac`
   LIBVLC_SYMBOL=`echo $LIBVLC_VERSION | sed -e 'y/.-/__/'`
 
   #  Sources that get built under Win32 - FIXME: anyone wanna deuglify this? :)
@@ -322,12 +322,21 @@ if test "${action}" = "po"
 then
   # create a fake file containing win32 strings
   rm -f modules/gui/win32/strings.cpp
-  printf "/* Automatically generated by 'toolbox --update-po', please don't compile */\n" > modules/gui/win32/strings.cpp
-  find modules/gui/win32 -name '*.dfm' | while read file
-  do
-    printf "\n/*\n * from $file:\n */\n\n" >> modules/gui/win32/strings.cpp
-    perl -ne 'chop; chop; if( / (Caption|Text|Hint) / || $buffer =~ /[+=] *$/ ) { $buffer =~ s/\+ *$//; $buffer .= $_; } if( $buffer =~ /'"'"' *$/) { $buffer =~ s/'"'"'/"/g; $buffer =~ s/\\/\\\\/g; $buffer =~ s/=/= _(/; print $buffer." );\n"; $buffer = "";}' < $file | grep -v '"-*"' | grep -v '"http://' | grep -v '"vlcs"' >> modules/gui/win32/strings.cpp || exit 1
-  done
+  #printf "/* Automatically generated by 'toolbox --update-po', please don't compile */\n" > modules/gui/win32/strings.cpp
+  #find modules/gui/win32 -name '*.dfm' | while read file
+  #do
+  #  printf "\n/*\n * from $file:\n */\n\n" >> modules/gui/win32/strings.cpp
+  #  perl -ne 'chop; chop; if( / (Caption|Text|Hint) / || $buffer =~ /[+=] *$/ ) { $buffer =~ s/\+ *$//; $buffer .= $_; } if( $buffer =~ /'"'"' *$/) { $buffer =~ s/'"'"'/"/g; $buffer =~ s/\\/\\\\/g; $buffer =~ s/=/= _(/; print $buffer." );\n"; $buffer = "";}' < $file | grep -v '"-*"' | grep -v '"http://' | grep -v '"vlcs"' >> modules/gui/win32/strings.cpp || exit 1
+  #done
+  # 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 '*.[hc]pp' | sort >> po/POTFILES.in
+  echo "" >> po/POTFILES.in
+  echo "# modules" >> po/POTFILES.in
+  find modules -name '*.[chm]' -o -name '*.[hc]pp' | grep -v 'gui/win32/' | sort >> po/POTFILES.in
   # clean old potfiles
   cd po
   rm -f vlc.pot
@@ -359,7 +368,7 @@ then
   echo '#ifdef __PLUGIN__' >> ${file}.in
   cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/#   define \2 p_symbols->\2_inner/' >> ${file}.in
   echo '#endif /* __PLUGIN__ */' >> ${file}.in
-  if diff -q ${file} ${file}.in
+  if diff 2>&1 >/dev/null ${file} ${file}.in
   then
     rm -f ${file}.in
   else
@@ -373,7 +382,7 @@ then
   echo '#define STORE_SYMBOLS( p_symbols ) \' >> ${file}.tmp
   cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/    (p_symbols)->\2_inner = \2; \\/' >> ${file}.tmp
   echo '' >> ${file}.tmp
-  if diff -q ${file} ${file}.tmp
+  if diff 2>&1 >/dev/null ${file} ${file}.tmp
   then
     rm -f ${file}.tmp
   else
@@ -403,7 +412,7 @@ then
   fi
   echo "    } while( 0 );" >> ${file}.tmp
   echo "" >> ${file}.tmp
-  if diff -q ${file} ${file}.tmp
+  if diff 2>&1 >/dev/null ${file} ${file}.tmp
   then
     rm -f ${file}.tmp
   else
@@ -509,7 +518,7 @@ then
   find evc -type f -name '*.vcp' -exec rm -f '{}' ';'
   #find . -type d -name '.deps' -exec rm -Rf '{}' ';'
   # there's some more cruft all around
-  rm -f configure.ac config.h config.log config.status
+  rm -f config.h config.log config.status
   rm -f vlc vlc-config Makefile Modules.am
   rm -Rf autom4te.cache
   rm -f mozilla/vlcintf.h mozilla/vlcintf.xpt