#! /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>
# 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? :)
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
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
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
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
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