]> git.sesse.net Git - vlc/blobdiff - Makefile.am
Fix race between installation and execution of vlc-cache-gen
[vlc] / Makefile.am
index cff608998179f7f587280ad84811f03920d0acc1..264e796ed8cbc906e9eafa00607b93b558bf1796 100644 (file)
@@ -7,27 +7,12 @@
 # which have makefiles with distribution information.
 #  - src (libvlc) is nedeed by modules
 #  - libs/* are needed by modules
-BASE_SUBDIRS = po compat src bin modules share doc test
-EXTRA_SUBDIRS = m4 \
-       libs/loader libs/srtp libs/unzip
-DIST_SUBDIRS = $(BASE_SUBDIRS) $(EXTRA_SUBDIRS)
-
-SUBDIRS = po compat src
-if LOADER
-SUBDIRS += libs/loader
-endif
-if HAVE_GCRYPT
-SUBDIRS += libs/srtp
-endif
-if HAVE_ZLIB
-if !HAVE_MINIZIP
-SUBDIRS += libs/unzip
-endif
-endif
+DIST_SUBDIRS = m4 compat doc po share src modules lib bin test
+SUBDIRS = compat doc po share src modules lib
 if BUILD_VLC
 SUBDIRS += bin
 endif
-SUBDIRS += modules share doc test
+SUBDIRS += test
 
 EXTRA_DIST = \
        HACKING \
@@ -360,8 +345,11 @@ MAINTAINERCLEANFILES = ChangeLog
 libcompat:
        cd compat && $(MAKE) $(AM_MAKEFLAGS)
 
-libvlc: libcompat
-       cd src && $(MAKE) $(AM_MAKEFLAGS) libvlc.la
+libvlccore: libcompat
+       cd src && $(MAKE) $(AM_MAKEFLAGS) libvlccore.la
+
+libvlc: libvlccore
+       cd lib && $(MAKE) $(AM_MAKEFLAGS) libvlc.la
 
 core: libvlc vlc$(EXEEXT)
        cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) vlc-static$(EXEEXT)
@@ -416,6 +404,18 @@ noinst_DATA = VLC.app
 endif
 endif
 
+###############################################################################
+# Installing plugins cache
+###############################################################################
+install-exec-hook:
+       if test "$(build)" = "$(host)"; then \
+               LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \
+               "$(DESTDIR)$(vlclibdir)/vlc-cache-gen$(EXEEXT)" \
+                        "$(DESTDIR)$(vlclibdir)/plugins" ; \
+       else \
+               echo "Cross-compilation: cache generation skipped!" ; \
+       fi
+
 silentstd = $(silentstd_$(V))
 silentstd_ = $(silentstd_$(AM_DEFAULT_VERBOSITY))
 silentstd_0 = 2>&1 >/dev/null