#! /bin/sh
## toolbox for the VLC media player
-## $Id: toolbox,v 1.39 2003/07/08 13:09:30 sam Exp $
+## $Id: toolbox,v 1.42 2003/07/16 15:52:04 sam Exp $
##
## Authors: Samuel Hocevar <sam@zoy.org>
--make-woody)
action=woody
;;
+ --add-include)
+ action=include
+ ;;
--help)
help
;;
esac
shift
+##
+## Add includes to help doxygen
+##
+if test "${action}" = "include"
+then
+ case "$1" in
+ */vlc_common.h|*/include/vlc/*);;
+ */include/*.h) echo "#include <vlc_common.h>" ;;
+ esac
+ cat $1
+ exit 0
+fi
+
##
## Update the CVS changelog
##
srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
fi
- # The evil ^M
- M="`printf '\r'`"
+ # The evil ^M. printf '\r' does not work in Cygwin.
+ M='\r'
# Variables we get from configure.ac
LIBVLC_VERSION=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac`
do
cat >> ${target} << EOF
# 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}
# End Source File${M}
EOF
then
cat >> ${target} << EOF
# 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}
!IF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Release"${M}
# PROP Output_Dir "MIPSRel\\${subdir}"${M}
else
cat >> ${target} << EOF
# 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}
!IF "\$(CFG)" == "libvlc - Win32 Release"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
do
cat >> ${target} << EOF
# Begin Source File${M}
-SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
+SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
# End Source File${M}
EOF
done
do
cat >> ${target} << EOF
# Begin Source File${M}
-SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
+SOURCE="..\\`echo ${file} | sed -e 's%/%\\\\%g'`"${M}
# End Source File${M}
EOF
done
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$'`
cfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep -v '\.h$'`
- for dir in evc msvc
+ for msdir in evc msvc
do
- test "${dir}" = "evc" && suf="vcp" || suf="dsp"
- source="${dir}/plugins.${suf}.in"
- target="${dir}/plugin_${mod}.${suf}"
+ test "${msdir}" = "evc" && suf="vcp" || suf="dsp"
+ source="${msdir}/plugins.${suf}.in"
+ target="${msdir}/plugin_${mod}.${suf}"
echo "${target}"
perl -pe 'if(/§SOURCES§/){last;} s/§PLUGIN§/'${mod}'/g' < ${source} > ${target}
for cfile in ${cfiles}
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' | sort >> 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 '\(gui/win32/\|\.moc\.\)' \
+ | grep -v '\(gui/win32/\)' \
| sort >> po/POTFILES.in
# clean old potfiles
cd po
# FIXME: a lot of Makefiles are still there
fi
+##
+## Build a woody-friendly package
+##
if test "${action}" = "woody"
then
set -ex