Commit 239aa0bf authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

- (Un)install plugins from their directory (refs #297)

- Fix mostlyclean target
parent 703f2f5d
......@@ -487,22 +487,8 @@ vlc-bundle: vlc
find $(top_builddir)/vlc-bundle -type f -exec mimeset -f "{}" \;
endif
# Install the modules and the symlinks
# Install the symlinks
install-exec-local:
for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
$(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
fi ; done
for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
$(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
fi ; done
if BUILD_MOZILLA
for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
$(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
fi ; done
endif
for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
rm -f "$(DESTDIR)$(bindir)/$$i" && \
ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
......@@ -510,20 +496,6 @@ endif
# the opposite of install-{data,exec}-local
uninstall-local:
@for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
echo rm -f "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`/$$(basename $$i$(LIBEXT))" ; \
rm -f "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`/$$(basename $$i$(LIBEXT))" ; \
fi ; done
@for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
echo rm -f "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
rm -f "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
fi ; done
if BUILD_MOZILLA
@for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
echo rm -f "$$i" "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
rm -f "$$i" "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
fi ; done
endif
for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
rm -f "$(DESTDIR)$(bindir)/$$i" ; \
fi ; done
......
......@@ -184,7 +184,6 @@ rm -f modules/Makefile.am && cat > modules/Makefile.am << EOF
# Autogenerated by bootstrap - DO NOT EDIT
EXTRA_DIST = LIST
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`
......@@ -205,7 +204,10 @@ do
rm -f "${makf}" && cat > "${makf}" << EOF
# ${makf} automatically generated from ${modf} by bootstrap
# DO NOT EDIT - edit Modules.am instead
# DO NOT EDIT - edit Modules.am or \$(top_srcdir)/bootstrap instead
basedir = ${basedir}
mods = ${mods}
NULL =
libvlc_LIBRARIES =
......@@ -214,8 +216,8 @@ noinst_HEADERS =
EXTRA_DIST = Modules.am
BUILT_SOURCES =
SUBDIRS = ${subdirs}
#DIST_SUBDIRS = \$(SUBDIRS)
libvlcdir = \$(libdir)/vlc/${basedir}
libvlcdir = \$(libdir)/vlc/\$(basedir)
EXTRA_LIBRARIES = ${extra_libs}
include Modules.am
......@@ -230,21 +232,86 @@ pic = no
endif
endif
clean-local:
-rm -f *.a *.so *.dll *.sl *.dylib
all: all-modules
all-modules:
@set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\
if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in $mods; do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin\$(LIBEXT);; esac; done; fi; \\
if test "\$(builtin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list builtin); for mod in $mods; do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}.a;; esac; done; fi; \\
if test "\$(pic)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list builtin); for mod in $mods; do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_pic.a;; esac; done; fi; \\
if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin\$(LIBEXT);; esac; done; fi; \\
if test "\$(builtin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list builtin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}.a;; esac; done; fi; \\
if test "\$(pic)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list builtin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_pic.a;; esac; done; fi; \\
\`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\
test -z "\$\$fail"
\$(srcdir)/Makefile.am: \$(srcdir)/Modules.am \$(top_srcdir)/bootstrap
cd \$(top_srcdir) && \$(SHELL) ./bootstrap
mostlyclean-local:
-rm -f *.a *\$(LIBEXT)
### automake creates libvlcdir after running install-*-local
### so we have to create it ourselves first
install-exec-local: all-modules
\$(mkdir_p) "\$(DESTDIR)\$(libvlcdir)"
@z=\$\$(\$(VLC_CONFIG) --list plugin); \
for mod in \$(mods); do \
case "\$\$z " \
in *\ \$\${mod}\ *) \
echo \$(INSTALL_PROGRAM) -m 755 "lib\$\${mod}_plugin\$(LIBEXT)" "\$(DESTDIR)\$(libvlcdir)/" ; \
\$(INSTALL_PROGRAM) -m 755 "lib\$\${mod}_plugin\$(LIBEXT)" "\$(DESTDIR)\$(libvlcdir)/" || exit \$\$?; \
;; \
esac; \
done
@z=\$\$(\$(VLC_CONFIG) --list builtin); \
for mod in \$(mods); do \
case "\$\$z " \
in *\ \$\${mod}\ *) \
echo \$(INSTALL_DATA) -m 644 "lib\$\${mod}.a" "\$(DESTDIR)\$(libdir)/vlc/" ; \
\$(INSTALL_DATA) -m 644 "lib\$\${mod}.a" "\$(DESTDIR)\$(libvlcdir)/" || exit \$\$?; \
;; \
esac; \
done
if BUILD_MOZILLA
@z=\$\$(\$(VLC_CONFIG) --list builtin); \
for mod in \$(mods); do \
case "\$\$z " \
in *\ \$\${mod}\ *) \
echo \$(INSTALL_DATA) -m 644 "lib\$\${mod}_pic.a" "\$(DESTDIR)\$(libdir)/vlc/" ; \
\$(INSTALL_DATA) -m 644 "lib\$\${mod}_pic.a" "\$(DESTDIR)\$(libvlcdir)/" || exit \$\$?; \
;; \
esac; \
done
endif
uninstall-local:
@z=\$\$(\$(VLC_CONFIG) --list plugin); \
for mod in \$(mods); do \
case "\$\$z " \
in *\ \$\${mod}\ *) \
echo rm -f "\$(DESTDIR)\$(libvlcdir)/lib\$\${mod}_plugin\$(LIBEXT)" ; \
rm -f "\$(DESTDIR)\$(libvlcdir)/lib\$\${mod}_plugin\$(LIBEXT)" || true; \
;; \
esac; \
done
@z=\$\$(\$(VLC_CONFIG) --list builtin); \
for mod in \$(mods); do \
case "\$\$z " \
in *\ \$\${mod}\ *) \
echo rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}.a" ; \
rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}.a" || true; \
;; \
esac; \
done
if BUILD_MOZILLA
@z=\$\$(\$(VLC_CONFIG) --list builtin); \
for mod in \$(mods); do \
case "\$\$z " \
in *\ \$\${mod}\ *) \
echo rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}_pic.a" ; \
rm -f "\$(DESTDIR)\$(libdir)/vlc/lib\$\${mod}_pic.a" || true; \
;; \
esac; \
done
endif
EOF
for mod in $mods
do
......
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