Commit e10b64a4 authored by Sam Hocevar's avatar Sam Hocevar

* bootstrap:

    + Removed a useless use of cut.
    + Do not fail in the "clean" rule if no targets were built.
  * Makefile.am:
    + Propagate $(srcdir) to toolbox.
  * toolbox:
    + Do not include .moc files in POTFILES.in.
    + Fixed the generation of MSVC project files (untested).
parent 26674bd9
...@@ -106,13 +106,13 @@ HEADERS_include_built = \ ...@@ -106,13 +106,13 @@ HEADERS_include_built = \
$(NULL) $(NULL)
include/vlc_symbols.h: Makefile $(HEADERS_include) include/vlc_symbols.h: Makefile $(HEADERS_include)
$(srcdir)/toolbox --update-includes srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include) src/misc/modules_plugin.h: Makefile src/misc/modules_plugin.h.in $(HEADERS_include)
$(srcdir)/toolbox --update-includes srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in
$(srcdir)/toolbox --update-includes srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
# These dependencies are mandatory # These dependencies are mandatory
$(SOURCES): include/vlc_symbols.h $(SOURCES): include/vlc_symbols.h
...@@ -208,7 +208,7 @@ EXTRA_DIST += \ ...@@ -208,7 +208,7 @@ EXTRA_DIST += \
dist-hook: dist-hook:
mv $(distdir)/vlc.ebuild $(distdir)/vlc-${VERSION}.ebuild mv $(distdir)/vlc.ebuild $(distdir)/vlc-${VERSION}.ebuild
cd $(distdir) && $(srcdir)/toolbox --update-vc cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc
############################################################################### ###############################################################################
# Building libvlc # Building libvlc
......
#! /bin/sh #! /bin/sh
## bootstrap file for the VLC media player ## bootstrap file for the VLC media player
## $Id: bootstrap,v 1.66 2003/07/07 16:53:48 sam Exp $ ## $Id: bootstrap,v 1.67 2003/07/08 13:09:30 sam Exp $
## ##
## Authors: Sam Hocevar <sam@zoy.org> ## Authors: Sam Hocevar <sam@zoy.org>
...@@ -60,7 +60,6 @@ AC_DEFUN([AX_VLC_CONFIG_HELPER], [ ...@@ -60,7 +60,6 @@ AC_DEFUN([AX_VLC_CONFIG_HELPER], [
EOF EOF
modules="" modules=""
count=0
rm -f modules/Makefile.am && cat > modules/Makefile.am << EOF rm -f modules/Makefile.am && cat > modules/Makefile.am << EOF
# Autogenerated by bootstrap - DO NOT EDIT # Autogenerated by bootstrap - DO NOT EDIT
...@@ -73,11 +72,9 @@ for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac` ...@@ -73,11 +72,9 @@ for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac`
do do
printf "." printf "."
mf="modules/${dir}/Modules.am" mf="modules/${dir}/Modules.am"
basedir="`echo ${dir} | cut -f1 -d/`" basedir="${dir%%\/*}"
# automake will not recurse for make dist if we don't define SUBDIRS = . # automake will not recurse for make dist if we don't define SUBDIRS = .
subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`" subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`"
#parent=`echo ${dir} | sed -e 's@[^/]*@..@g'`
#echo " modules/${dir}/Makefile" >> m4/private.m4-tmp3
rm -f modules/${dir}/Makefile.am && cat > modules/${dir}/Makefile.am << EOF rm -f modules/${dir}/Makefile.am && cat > modules/${dir}/Makefile.am << EOF
# Autogenerated by bootstrap - DO NOT EDIT - edit Modules.am instead # Autogenerated by bootstrap - DO NOT EDIT - edit Modules.am instead
...@@ -95,12 +92,11 @@ include Modules.am ...@@ -95,12 +92,11 @@ include Modules.am
clean: clean-local clean: clean-local
clean-local: clean-local:
rm -f *.a *.so *.dll *.sl *.dylib -rm -f *.a *.so *.dll *.sl *.dylib
EOF EOF
for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}` for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}`
do do
count="`expr ${count} + 1`"
if grep '^SOURCES_'${mod}'.*=.*PRIVATE' < ${mf} >/dev/null 2>&1; then if grep '^SOURCES_'${mod}'.*=.*PRIVATE' < ${mf} >/dev/null 2>&1; then
PRIVATE='#'; else PRIVATE='#'; else
PRIVATE=''; fi PRIVATE=''; fi
...@@ -129,7 +125,7 @@ all: all-${mod} ...@@ -129,7 +125,7 @@ all: all-${mod}
EOF EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF
clean-${mod}: clean-${mod}:
rm -f \$(nodist_SOURCES_${mod}) -test -z "\$(nodist_SOURCES_${mod})" || rm -f \$(nodist_SOURCES_${mod})
EOF EOF
fi fi
...@@ -164,13 +160,13 @@ else ...@@ -164,13 +160,13 @@ else
endif endif
if UNTRUE if UNTRUE
L${count}p = lib${mod}_plugin.a L${mod}-p = lib${mod}_plugin.a
D${count}p = lib${mod}_plugin\$(LIBEXT) D${mod}-p = lib${mod}_plugin\$(LIBEXT)
L${count}b = lib${mod}.a L${mod}-b = lib${mod}.a
L${count}pic = lib${mod}_pic.a L${mod}-pic = lib${mod}_pic.a
EOF EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF
B${count} = \$(nodist_SOURCES_${mod}) B${mod} = \$(nodist_SOURCES_${mod})
EOF EOF
fi fi
cat >> modules/${dir}/Makefile.am << EOF cat >> modules/${dir}/Makefile.am << EOF
...@@ -178,7 +174,7 @@ endif ...@@ -178,7 +174,7 @@ endif
EOF EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF
${PRIVATE}BUILT_SOURCES += \$(B${count}) ${PRIVATE}BUILT_SOURCES += \$(B${mod})
EOF EOF
fi fi
cat >> modules/${dir}/Makefile.am << EOF cat >> modules/${dir}/Makefile.am << EOF
...@@ -215,11 +211,11 @@ lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\` ...@@ -215,11 +211,11 @@ lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\`
lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\` lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\`
lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\` lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\`
libvlc_LIBRARIES += \$(L${count}b) \$(L${count}pic) libvlc_LIBRARIES += \$(L${mod}-b) \$(L${mod}-pic)
lib${mod}_DATA = \$(D${count}p) lib${mod}_DATA = \$(D${mod}-p)
lib${mod}dir = \$(libdir)/vlc/${topdir} lib${mod}dir = \$(libdir)/vlc/${topdir}
${PRIVATE}noinst_LIBRARIES += \$(L${count}p) ${PRIVATE}noinst_LIBRARIES += \$(L${mod}-p)
${PRIVATE}lib${mod}_plugin\$(LIBEXT): \$(lib${mod}_plugin_a_OBJECTS) ${PRIVATE}lib${mod}_plugin\$(LIBEXT): \$(lib${mod}_plugin_a_OBJECTS)
${PRIVATE} @case \`\$(VLC_CONFIG) --linkage ${mod}\` in \\ ${PRIVATE} @case \`\$(VLC_CONFIG) --linkage ${mod}\` in \\
${PRIVATE} c++) echo \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\ ${PRIVATE} c++) echo \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \\\`\$(VLC_CONFIG) --libs plugin ${mod}\\\` ; \$(CXXLINK) \$(lib${mod}_plugin_a_OBJECTS) \`\$(VLC_CONFIG) --libs plugin ${mod}\` ;; \\
......
#! /bin/sh #! /bin/sh
## toolbox for the VLC media player ## toolbox for the VLC media player
## $Id: toolbox,v 1.38 2003/07/05 14:47:53 sam Exp $ ## $Id: toolbox,v 1.39 2003/07/08 13:09:30 sam Exp $
## ##
## Authors: Samuel Hocevar <sam@zoy.org> ## Authors: Samuel Hocevar <sam@zoy.org>
...@@ -27,7 +27,7 @@ recognized flags are: ...@@ -27,7 +27,7 @@ recognized flags are:
--update-glade2 generate and fix Glade 2 code --update-glade2 generate and fix Glade 2 code
--update-flexml generate and fix flexml and flex code --update-flexml generate and fix flexml and flex code
--changelog update the CVS changelog --changelog update the CVS changelog
--distclean "make distclean" --distclean "make distclean" on steroids
--make-woody <dir> change distdir <dir> to a woody distdir --make-woody <dir> change distdir <dir> to a woody distdir
EOF EOF
exit 1 exit 1
...@@ -120,7 +120,9 @@ if test "${action}" = "vc" ...@@ -120,7 +120,9 @@ if test "${action}" = "vc"
then then
echo "generating Visual Studio files..." echo "generating Visual Studio files..."
if test -z "${srcdir}"; then
srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`" srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
fi
# The evil ^M # The evil ^M
M="`printf '\r'`" M="`printf '\r'`"
...@@ -260,29 +262,30 @@ EOF ...@@ -260,29 +262,30 @@ EOF
done done
# plugins files # plugins files
grep '^L_[^ ]*_pic =' Modules.am | while read a b c for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' ${srcdir}/configure.ac`
do
mf="${srcdir}/modules/${dir}/Modules.am"
for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}`
do do
makefile="`echo $c | sed -e 's@/[^/]*$@/Modules.am@'`"
plugin="`echo $a | sed 's/L_\(.*\)_pic/\1/'`"
# this is an attempt at getting a list of plugin sources... we take the # this is an attempt at getting a list of plugin sources... we take the
# production and remove everything that does not contain "module", which # production and remove everything that does not contain "module", which
# means you miss $(NULL), but other variables too. # means you miss $(NULL), but other variables too.
cfiles=`grep -v '[^-_a-zA-Z0-9]*#' ${makefile} | awk 'BEGIN{a=0}{if(!a&&$0~/^SOURCES_'${plugin}'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if($0~/^[a-zA-Z]/){exit;}print $0}}' | tr '\\ ' '\n\n' | sed -ne 's,/,\\\\,g; s/.*modules/modules/p'` 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 ${cfiles} ; do echo $i ; done | grep '\.h$'` hfiles=`for i in ${allfiles} ; do echo "$i" ; done | grep '\.h$'`
cfiles=`for i in ${cfiles} ; 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 dir in evc msvc
do do
test "${dir}" = "evc" && suf="vcp" || suf="dsp" test "${dir}" = "evc" && suf="vcp" || suf="dsp"
source="${dir}/plugins.${suf}.in" source="${dir}/plugins.${suf}.in"
target="${dir}/plugin_${plugin}.${suf}" target="${dir}/plugin_${mod}.${suf}"
echo "${target}" echo "${target}"
perl -pe 'if(/SOURCES/){last;} s/PLUGIN/'${plugin}'/g' < ${source} > ${target} perl -pe 'if(/SOURCES/){last;} s/PLUGIN/'${mod}'/g' < ${source} > ${target}
for cfile in ${cfiles} for cfile in ${cfiles}
do do
cat >> ${target} << EOF cat >> ${target} << EOF
# Begin Source File${M} # Begin Source File${M}
SOURCE="..\\${cfile}"${M} SOURCE="..\\modules\\`echo ${dir}/${cfile} | sed 's,/,\\\\,g'`"${M}
# ADD CPP /D "__VLC__" /D "__PLUGIN__" /D "MODULE_NAME=${plugin}" /D "MODULE_NAME_IS_${plugin}" ${M} # ADD CPP /D "__VLC__" /D "__PLUGIN__" /D "MODULE_NAME=${mod}" /D "MODULE_NAME_IS_${mod}" ${M}
# End Source File${M} # End Source File${M}
EOF EOF
done done
...@@ -293,7 +296,7 @@ EOF ...@@ -293,7 +296,7 @@ EOF
do do
cat >> ${target} << EOF cat >> ${target} << EOF
# Begin Source File${M} # Begin Source File${M}
SOURCE="..\\${hfile}"${M} SOURCE="..\\modules\\`echo ${dir}/${hfile} | sed 's,/,\\\\,g'`"${M}
# End Source File${M} # End Source File${M}
EOF EOF
done done
...@@ -301,6 +304,7 @@ EOF ...@@ -301,6 +304,7 @@ EOF
perl -e 'while(<>){if(/HEADERS/){last;}}while(<>){print $_}' < ${source} >> ${target} perl -e 'while(<>){if(/HEADERS/){last;}}while(<>){print $_}' < ${source} >> ${target}
done done
done done
done
# vlc files # vlc files
for target in evc/vlc.vcp msvc/vlc.dsp for target in evc/vlc.vcp msvc/vlc.dsp
...@@ -352,7 +356,9 @@ then ...@@ -352,7 +356,9 @@ then
find include src -name '*.[chm]' -o -name '*.[ch]pp' | sort >> po/POTFILES.in find include src -name '*.[chm]' -o -name '*.[ch]pp' | sort >> po/POTFILES.in
echo "" >> po/POTFILES.in echo "" >> po/POTFILES.in
echo "# modules" >> po/POTFILES.in echo "# modules" >> po/POTFILES.in
find modules -name '*.[chm]' -o -name '*.[ch]pp' | grep -v 'gui/win32/' | sort >> po/POTFILES.in find modules -name '*.[chm]' -o -name '*.[ch]pp' \
| grep -v '\(gui/win32/\|\.moc\.\)' \
| sort >> po/POTFILES.in
# clean old potfiles # clean old potfiles
cd po cd po
rm -f vlc.pot rm -f vlc.pot
...@@ -371,7 +377,9 @@ if test "${action}" = "includes" ...@@ -371,7 +377,9 @@ if test "${action}" = "includes"
then then
#set -x #set -x
if test -z "${srcdir}"; then
srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`" srcdir="`sed -ne 's/^srcdir *= *//p' < Makefile`"
fi
LIBVLC_HEADERS=`getfiles HEADERS_include` LIBVLC_HEADERS=`getfiles HEADERS_include`
BUILTINS=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' vlc-config` BUILTINS=`sed -ne 's/.*builtins *= *" *\([^"]*\)".*/\1/p' vlc-config`
......
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