Commit 56dd78bd authored by Sam Hocevar's avatar Sam Hocevar

* toolbox: we cannot use `printf '\r'` under Cygwin; use a real ^M character

    instead.
parent 31f0666a
#! /bin/sh #! /bin/sh
## toolbox for the VLC media player ## toolbox for the VLC media player
## $Id: toolbox,v 1.39 2003/07/08 13:09:30 sam Exp $ ## $Id: toolbox,v 1.40 2003/07/08 16:21:00 sam Exp $
## ##
## Authors: Samuel Hocevar <sam@zoy.org> ## Authors: Samuel Hocevar <sam@zoy.org>
...@@ -124,8 +124,8 @@ then ...@@ -124,8 +124,8 @@ then
srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`" srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
fi fi
# The evil ^M # The evil ^M. printf '\r' does not work in Cygwin.
M="`printf '\r'`" 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`
...@@ -163,7 +163,7 @@ then ...@@ -163,7 +163,7 @@ then
do do
cat >> ${target} << EOF cat >> ${target} << EOF
# Begin Source File${M} # Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M} SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M} # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
# End Source File${M} # End Source File${M}
EOF EOF
...@@ -179,7 +179,7 @@ EOF ...@@ -179,7 +179,7 @@ EOF
then then
cat >> ${target} << EOF cat >> ${target} << EOF
# Begin Source File${M} # Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M} SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M} # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Release"${M} !IF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Release"${M}
# PROP Output_Dir "MIPSRel\\${subdir}"${M} # PROP Output_Dir "MIPSRel\\${subdir}"${M}
...@@ -217,7 +217,7 @@ EOF ...@@ -217,7 +217,7 @@ EOF
else else
cat >> ${target} << EOF cat >> ${target} << EOF
# Begin Source File${M} # Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M} SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M} # ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "libvlc - Win32 Release"${M} !IF "\$(CFG)" == "libvlc - Win32 Release"${M}
# PROP Output_Dir "Release\\${subdir}"${M} # PROP Output_Dir "Release\\${subdir}"${M}
...@@ -240,7 +240,7 @@ EOF ...@@ -240,7 +240,7 @@ EOF
do do
cat >> ${target} << EOF cat >> ${target} << EOF
# Begin Source File${M} # Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M} SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
# End Source File${M} # End Source File${M}
EOF EOF
done done
...@@ -251,7 +251,7 @@ EOF ...@@ -251,7 +251,7 @@ EOF
do do
cat >> ${target} << EOF cat >> ${target} << EOF
# Begin Source File${M} # Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M} SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
# End Source File${M} # End Source File${M}
EOF EOF
done done
...@@ -273,11 +273,11 @@ EOF ...@@ -273,11 +273,11 @@ EOF
allfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${mf} | awk 'BEGIN{a=0}{if(!a&&$0~/^SOURCES_'${mod}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | grep '\.'` allfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${mf} | awk 'BEGIN{a=0}{if(!a&&$0~/^SOURCES_'${mod}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | grep '\.'`
hfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep '\.h$'` hfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep '\.h$'`
cfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep -v '\.h$'` cfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep -v '\.h$'`
for dir in evc msvc for msdir in evc msvc
do do
test "${dir}" = "evc" && suf="vcp" || suf="dsp" test "${msdir}" = "evc" && suf="vcp" || suf="dsp"
source="${dir}/plugins.${suf}.in" source="${msdir}/plugins.${suf}.in"
target="${dir}/plugin_${mod}.${suf}" target="${msdir}/plugin_${mod}.${suf}"
echo "${target}" echo "${target}"
perl -pe 'if(/SOURCES/){last;} s/PLUGIN/'${mod}'/g' < ${source} > ${target} perl -pe 'if(/SOURCES/){last;} s/PLUGIN/'${mod}'/g' < ${source} > ${target}
for cfile in ${cfiles} for cfile in ${cfiles}
......
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