## toolbox for the VLC media player
## $Id$
##
+## Copyright (C) 2005 the VideoLAN team
+##
## Authors: Samuel Hocevar <sam@zoy.org>
+## RĂ©mi Denis-Courmont <rem # videolan.org>
###
### Get a sane environment, just in case
--update-glade2 generate and fix Glade 2 code
--update-flexml generate and fix flexml and flex code
--distclean "make distclean" on steroids
+ --dist-contrib add the contrib dir to MAKE_DIST
--make-woody <dir> change distdir <dir> to a woody distdir
EOF
exit 1
--add-include)
action=include
;;
+ --dist-contrib)
+ action=contrib
+ ;;
--help)
help
;;
if test -z "${srcdir}"; then
srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
fi
- LIBVLC_HEADERS=`getfiles HEADERS_include`
- BUILTINS=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' vlc-config`
-
- file="${srcdir}/include/vlc_symbols.h"
-
- rm -f ${file}.in
- echo '/* DO NOT EDIT THIS FILE! See Makefile.am */' >> ${file}.in
- echo 'struct module_symbols_t {' >> ${file}.in
- cat ${LIBVLC_HEADERS} | grep '^ *VLC_EXPORT.*;' | sed -e 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ \1 (* \2_inner) \3;/' >> ${file}.in
- echo '};' >> ${file}.in
- 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 >/dev/null 2>&1 ${file} ${file}.in
- then
- rm -f ${file}.in
- else
- echo "creating new ${file}"
- mv -f ${file}.in ${file}
- fi
-
- file="${srcdir}/src/misc/modules_plugin.h"
-
- rm -f ${file}.tmp && cp ${file}.in ${file}.tmp
- sed -e 's#.*\$[I][d]:.*# * Automatically generated from '${file}'.in by bootstrap#' < ${file}.in > ${file}.tmp
- 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 >/dev/null 2>&1 ${file} ${file}.tmp
- then
- rm -f ${file}.tmp
- else
- echo "creating new ${file}"
- mv -f ${file}.tmp ${file}
+ if test -z "${builddir}"; then
+ builddir="`sed -ne 's/^top_builddir *= *//p' < Makefile`"
fi
+ BUILTINS=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' vlc-config`
- file="${srcdir}/src/misc/modules_builtin.h"
+ file="${builddir}/src/misc/modules_builtin.h"
- rm -f ${file}.tmp && cp ${file}.in ${file}.tmp
+ rm -f ${file}.tmp && cp ${srcdir}/src/misc/modules_builtin.h.in ${file}.tmp
if test -n "${BUILTINS}"
then
for i in `echo ${BUILTINS}`
# a naive sanity check to make sure we are in a VLC tree
test -f vlc.spec.mdk -a -f debian/rules || exit 1
# let's rock!
- find . -type f '(' -name '*.[oa]' -o -name '*.so' -o -name '*.sl' -o -name '*.dylib' -o -name '*.dll' -o -name .dirstamp -o -name Makefile.in -o -name 'stamp-h*' -o -name '*~' -o -name '*.bak' -o -name '*.moc.cpp' ')' -exec rm -f '{}' ';'
+ find . -type f '(' -name '*.[oa]' -o -name '*.so' -o -name '*.sl' -o -name '*.dylib' -o -name '*.dll' -o -name .dirstamp -o '(' '(' ! -path '\./doc/developer/Makefile\.in' ')' -a -name Makefile.in ')' -o -name 'stamp-h*' -o -name '*~' -o -name '*.bak' -o -name '*.moc.cpp' ')' -exec rm -f '{}' ';'
(cd autotools && find . -name '[a-z]*' -maxdepth 1 -exec rm -f '{}' ';')
- (cd debian && find . -type d -name '[a-z]*' -maxdepth 1 -exec rm -Rf '{}' ';')
+ (cd debian && find . -type d '(' -name '[a-z]*' ! -name 'patches' ')' -maxdepth 1 -exec rm -Rf '{}' ';')
find msvc -type f -name '*.dsp' -exec rm -f '{}' ';'
find evc -type f -name '*.vcp' -exec rm -f '{}' ';'
#find . -type d -name '.deps' -exec rm -Rf '{}' ';'
# FIXME: a lot of Makefiles are still there
fi
+##
+## Add the extras/contrib dir to the distribution
+##
+if test "${action}" = "contrib"
+then
+ set -x
+ if test ! -d "${distdir}/extras"
+ then
+ mkdir "${distdir}/extras"
+ fi
+ if test ! -d "${distdir}/extras/contrib"
+ then
+ mkdir "${distdir}/extras/contrib"
+ fi
+ cp "${srcdir}/extras/contrib/Makefile" "${distdir}/extras/contrib/Makefile"
+ cp "${srcdir}/extras/contrib/README" "${distdir}/extras/contrib/README"
+ cp "${srcdir}/extras/contrib/bootstrap" "${distdir}/extras/contrib/bootstrap"
+ cp "${srcdir}/extras/contrib/change_prefix.sh" "${distdir}/extras/contrib/change_prefix.sh"
+ if test ! -d "${distdir}/extras/contrib/src"
+ then
+ mkdir "${distdir}/extras/contrib/src"
+ fi
+ cp "${srcdir}/extras/contrib/src/Makefile" "${distdir}/extras/contrib/src/Makefile"
+ cp "${srcdir}/extras/contrib/src/packages.mak" "${distdir}/extras/contrib/src/packages.mak"
+ if test ! -d "${distdir}/extras/contrib/src/Patches"
+ then
+ mkdir "${distdir}/extras/contrib/src/Patches"
+ fi
+ cp ${srcdir}/extras/contrib/src/Patches/* "${distdir}/extras/contrib/src/Patches/"
+fi
+
##
## Build a woody-friendly package
##