3 ## genmf file for the VLC media player
5 ## Copyright (C) 2005-2007 the VideoLAN team
7 ## Authors: Sam Hocevar <sam@zoy.org>
8 ## RĂ©mi Denis-Courmont <rem # videolan # org>
10 cd $(dirname "$0")/.. || exit 1
16 modf="modules/${dir}/Modules.am"
17 makf="modules/${dir}/Makefile.am"
18 basedir="`echo "${dir}" | cut -f1 -d/`"
19 # automake will not recurse for make dist if we don't define SUBDIRS = .
20 subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`"
21 mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | xargs`"
25 extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la"
27 rm -f "${makf}" && cat > "${makf}" << EOF
28 # ${makf} automatically generated from ${modf} by bootstrap
29 # DO NOT EDIT - edit Modules.am or \$(top_srcdir)/bootstrap instead
35 EXTRA_LTLIBRARIES = ${extra_ltlibs}
37 include \$(top_srcdir)/modules/common.am
42 if grep '^nodist_SOURCES_'${mod}'' < "${modf}" >/dev/null 2>&1; then
45 cat >> m4/private.m4 << EOF
46 ${mod}) list="\\\${list} ${dir}/lib${mod}" ;;
48 cat >> "${makf}" << EOF
51 cat >> "${makf}" << EOF
52 lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
54 if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
55 nodist_lib${mod}_plugin_la_SOURCES = \$(nodist_SOURCES_${mod})
56 CLEANFILES += \$(nodist_SOURCES_${mod})
59 cat >> "${makf}" << EOF
60 lib${mod}_plugin_la_CFLAGS = \$(AM_CFLAGS)
61 lib${mod}_plugin_la_CXXFLAGS = \$(AM_CXXFLAGS)
62 lib${mod}_plugin_la_OBJCFLAGS = \$(AM_OBJCFLAGS)
63 lib${mod}_plugin_la_LIBADD = \$(AM_LIBADD) \\
64 \`\$(VLC_CONFIG) -libs plugin ${mod}\`
65 # Automake does not understand \`...\` very well inside LIBADD...
66 lib${mod}_plugin_la_DEPENDENCIES = \$(AM_LIBADD)