X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fgenmf;h=4969410018bf87ff260c15fce843d3928d1fbc86;hb=d6a00d75dfb4eb0c2bfaf83ae0734124c9cc72ff;hp=f1a743c103ae364a1b4fd8242e498a488ec4ab46;hpb=0ba5891babcc18d86bc36acda5584daaa59745d9;p=vlc diff --git a/modules/genmf b/modules/genmf index f1a743c103..4969410018 100755 --- a/modules/genmf +++ b/modules/genmf @@ -16,22 +16,29 @@ do modf="modules/${dir}/Modules.am" makf="modules/${dir}/Makefile.am" basedir="`echo "${dir}" | cut -f1 -d/`" - # 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`" - mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | xargs`" + 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`" + libvlc_ltlibs="" extra_ltlibs="" for mod in $mods do - extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la" + case " ${plugins} " in + *\ ${mod}\ *) + ;; + *) + libvlc_ltlibs="${libvlc_ltlibs} \$(LTLIB${mod})" + extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la" + ;; + esac done rm -f "${makf}" && cat > "${makf}" << EOF -# ${makf} automatically generated from ${modf} by bootstrap -# DO NOT EDIT - edit Modules.am or \$(top_srcdir)/bootstrap instead +# ${makf} automatically generated from ${modf} by $0 +# DO NOT EDIT THIS FILE DIRECTLY! See Modules.am instead. basedir = ${basedir} dir = ${dir} mods = ${mods} -SUBDIRS = ${subdirs} +libvlc_LTLIBRARIES = ${libvlc_ltlibs} EXTRA_LTLIBRARIES = ${extra_ltlibs} include \$(top_srcdir)/modules/common.am