@ -1,7 +1,7 @@
#! /bin/sh
## bootstrap file for the VLC media player
## $Id: bootstrap,v 1.55 2003/07/01 14:25:47 sam Exp $
## $Id: bootstrap,v 1.56 2003/07/01 16:25:24 sam Exp $
##
## Authors: Sam Hocevar <sam@zoy.org>
@ -36,8 +36,7 @@ INSTALLSUCKS=no
printf "generating modules/**/Makefile.am and m4/private.m4"
# Prepare Modules.am and m4/private.m4
rm -f Modules.am && echo > Modules.am
# Prepare m4/private.m4
rm -f m4/private.m4 && cat > m4/private.m4 << EOF
dnl Private VLC macros - generated by bootstrap
@ -72,16 +71,16 @@ SUBDIRS = `sed -ne 's,modules/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`
#DIST_SUBDIRS = \$(SUBDIRS)
EOF
for dir in `sed -ne 's,\( modules/.*\)/Makefile,\1,p' configure.ac`
for dir in `sed -ne 's,modules/\( .*\)/Makefile,\1,p' configure.ac`
do
printf "."
mf="${dir}/Modules.am"
basedir="`echo ${dir} | cut -f2 -d/`"
mf="modules/ ${dir}/Modules.am"
basedir="`echo ${dir} | cut -f1 -d/`"
# automake will not recurse for make dist if we don't define SUBDIRS = .
subdirs="`sed -ne 's,'${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 " ${dir}/Makefile" >> m4/private.m4-tmp3
rm -f ${dir}/Makefile.am && cat > ${dir}/Makefile.am << EOF
#echo " modules/ ${dir}/Makefile" >> m4/private.m4-tmp3
rm -f modules/ ${dir}/Makefile.am && cat > modules/ ${dir}/Makefile.am << EOF
# Autogenerated by bootstrap - DO NOT EDIT - edit Modules.am instead
@ -109,16 +108,6 @@ EOF
#dnl AM_CONDITIONAL(${mod}_p, test x\$${mod}_p = xyes)
#dnl AM_CONDITIONAL(${mod}_b, test x\$${mod}_b = xyes)
#EOF
cat >> Modules.am << EOF
${dir}/lib${mod}_plugin: ${dir}/lib${mod}_plugin\$(LIBEXT)
${dir}/lib${mod}_plugin\$(LIBEXT): include/vlc_symbols.h FORCE
cd ${dir} && \$(MAKE) lib${mod}_plugin\$(LIBEXT)
${dir}/lib${mod}.a: include/vlc_symbols.h FORCE
cd ${dir} && \$(MAKE) lib${mod}.a
${dir}/lib${mod}_pic.a: include/vlc_symbols.h FORCE
cd ${dir} && \$(MAKE) lib${mod}_pic.a
EOF
cat >> m4/private.m4-tmp4 << EOF
${mod}) list="\\\${list} ${dir}/lib${mod}" ;;
EOF
@ -129,7 +118,7 @@ EOF
# the resulting file size.
# - *_CFLAGS, *_CXXFLAGS etc. because per-object CPPFLAGS does not seem to
# work properly with any automake version I tested.
cat >> ${dir}/Makefile.am << EOF
cat >> modules/ ${dir}/Makefile.am << EOF
# The ${mod} plugin
all: all-${mod}
@ -147,49 +136,49 @@ D${count}p = lib${mod}_plugin\$(LIBEXT)
L${count}b = lib${mod}.a
L${count}pic = lib${mod}_pic.a
EOF
if [ "${NODIST}" != "#" ]; then cat >> ${dir}/Makefile.am << EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/ ${dir}/Makefile.am << EOF
B${count}p = \$(nodist_SOURCES_${mod})
B${count}b = \$(nodist_SOURCES_${mod})
EOF
fi
cat >> ${dir}/Makefile.am << EOF
cat >> modules/ ${dir}/Makefile.am << EOF
endif
EOF
if [ "${NODIST}" != "#" ]; then cat >> ${dir}/Makefile.am << EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/ ${dir}/Makefile.am << EOF
${PRIVATE}BUILT_SOURCES += \$(B${count}p) \$(B${count}b)
EOF
fi
cat >> ${dir}/Makefile.am << EOF
cat >> modules/ ${dir}/Makefile.am << EOF
${PRIVATE}lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod})
EOF
if [ "${NODIST}" != "#" ]; then cat >> ${dir}/Makefile.am << EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/ ${dir}/Makefile.am << EOF
${PRIVATE}nodist_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod})
EOF
fi
cat >> ${dir}/Makefile.am << EOF
cat >> modules/ ${dir}/Makefile.am << EOF
lib${mod}_plugin_a_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\`
lib${mod}_plugin_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\`
lib${mod}_plugin_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\`
lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
EOF
if [ "${NODIST}" != "#" ]; then cat >> ${dir}/Makefile.am << EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/ ${dir}/Makefile.am << EOF
nodist_lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
EOF
fi
cat >> ${dir}/Makefile.am << EOF
cat >> modules/ ${dir}/Makefile.am << EOF
lib${mod}_pic_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin pic ${mod}\`
lib${mod}_pic_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin pic ${mod}\`
lib${mod}_pic_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin pic ${mod}\`
lib${mod}_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
EOF
if [ "${NODIST}" != "#" ]; then cat >> ${dir}/Makefile.am << EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/ ${dir}/Makefile.am << EOF
nodist_lib${mod}_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
EOF
fi
cat >> ${dir}/Makefile.am << EOF
cat >> modules/ ${dir}/Makefile.am << EOF
lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\`
lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\`
lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\`
@ -238,7 +227,7 @@ echo "done."
set -x
# remove autotools cruft
rm -f aclocal.m4 configure configure.ac.in config.log
rm -f aclocal.m4 configure configure.ac.in config.log Modules.am
# remove old autotools extra cruft
rm -f config.guess config.sub missing mkinstalldirs compile depcomp install-sh
# remove new autotools extra cruft