Commit 30d347b8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove Modules.am support

parent 2ce951f0
...@@ -56,21 +56,6 @@ Otherwise, you will not be able to build a source tarball. ...@@ -56,21 +56,6 @@ Otherwise, you will not be able to build a source tarball.
EOF EOF
fi fi
###
### Generate the modules makefile, by parsing modules/**/Modules.am
###
echo "generating modules/**/Makefile.am"
for d in modules/*/*/Modules.am; do
d="${d#modules/}"
d="${d%/Modules.am}"
${CONFIG_SHELL-sh} modules/genmf "$d"
printf "."
done || true
printf "\n"
set -x
### ###
### classic bootstrap stuff ### classic bootstrap stuff
### ###
......
...@@ -15,7 +15,7 @@ endif ...@@ -15,7 +15,7 @@ endif
TESTS = TESTS =
dist_noinst_SCRIPTS = genmf list.sh module.rc.in dist_noinst_SCRIPTS = list.sh module.rc.in
dist_noinst_DATA = MODULES_LIST dist_noinst_DATA = MODULES_LIST
EXTRA_LTLIBRARIES = EXTRA_LTLIBRARIES =
......
#! /bin/sh
## genmf file for the VLC media player
##
## Copyright (C) 2005-2007 the VideoLAN team
##
## Authors: Sam Hocevar <sam@zoy.org>
## Rémi Denis-Courmont <rem # videolan # org>
cd $(dirname "$0")/.. || exit 1
while test "$1"
do
dir="$1"
modf="modules/${dir}/Modules.am"
if test ! -f "$modf"; then
echo "$modf does not exist!" >&2
exit 1
fi
makf="modules/${dir}/Makefile.am"
basedir="`echo "${dir}" | cut -f1 -d/`"
mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | sort | uniq | xargs`"
plugins="`sed -n -e 's/^.*lib\([^ ]*\)_plugin\.la.*/\1/p' < "${modf}" | sort | uniq | xargs`"
rm -f "${makf}" && cat > "${makf}" << EOF
# ${makf} automatically generated from ${modf} by $0
# DO NOT EDIT THIS FILE DIRECTLY! See Modules.am instead.
${basedir}dir = \$(pluginsdir)/${basedir}
${basedir}_LTLIBRARIES =
EXTRA_LTLIBRARIES =
EXTRA_DIST = Modules.am
include \$(top_srcdir)/modules/common.am
include \$(srcdir)/Modules.am
if MAINTAINER_MODE
\$(srcdir)/Makefile.am: \$(srcdir)/Modules.am \$(top_srcdir)/modules/genmf
\$(AM_V_GEN)cd \\\$(top_srcdir) && \\\$(SHELL) modules/genmf ${dir}
endif
EOF
for mod in $mods
do
cat >> "${makf}" << EOF
lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
lib${mod}_plugin_la_CPPFLAGS = \$(AM_CPPFLAGS) \$(CPPFLAGS_${mod}) \
-DMODULE_NAME_IS_${mod}
lib${mod}_plugin_la_CFLAGS = \$(AM_CFLAGS) \$(CFLAGS_${mod})
lib${mod}_plugin_la_CXXFLAGS = \$(AM_CXXFLAGS) \$(CXXFLAGS_${mod})
lib${mod}_plugin_la_OBJCFLAGS = \$(AM_OBJCFLAGS) \$(OBJCFLAGS_${mod})
lib${mod}_plugin_la_LIBADD = \$(LIBS_${mod})
lib${mod}_plugin_la_LDFLAGS = \$(AM_LDFLAGS) -rpath '\$(${basedir}dir)' \$(LDFLAGS_${mod})
EOF
case " ${plugins} " in
*\ ${mod}\ *)
;;
*)
cat >> "${makf}" << EOF
EXTRA_LTLIBRARIES += lib${mod}_plugin.la
${basedir}_LTLIBRARIES += \$(LTLIB${mod})
EOF
;;
esac
done
shift
done
...@@ -17,10 +17,9 @@ echo "------------------------------------" ...@@ -17,10 +17,9 @@ echo "------------------------------------"
i=0 i=0
for modfile in `find . -name "Modules.am" -o -name "Makefile.am"` for modfile in `find . -name "Makefile.am"`
do do
for module in `awk '/^SOURCES_/{sub(/SOURCES_/,"",$1); print $1}' "$modfile"`\ for module in `awk '/^lib.*_plugin_la_SOURCES/{sub(/lib/,""); sub(/_plugin_la_SOURCES/,"",$1); print $1}' "$modfile"`
`awk '/^lib.*_plugin_la_SOURCES/{sub(/lib/,""); sub(/_plugin_la_SOURCES/,"",$1); print $1}' "$modfile"`
do do
echo $module >> $TEMPFILE echo $module >> $TEMPFILE
if ! grep -q " \* $module:" $LISTFILE if ! grep -q " \* $module:" $LISTFILE
...@@ -66,6 +65,6 @@ grep " \* " $LISTFILE | LC_COLLATE=C LC_CTYPE=C sort -c && echo "OK" ...@@ -66,6 +65,6 @@ grep " \* " $LISTFILE | LC_COLLATE=C LC_CTYPE=C sort -c && echo "OK"
echo "" echo ""
echo "`sort -u $TEMPFILE | wc -l` modules listed in Modules.am files" echo "`sort -u $TEMPFILE | wc -l` modules listed in Makefiles"
rm -f $TEMPFILE rm -f $TEMPFILE
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