]> git.sesse.net Git - vlc/commitdiff
Try to generate the plugins cache from make
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Jan 2010 20:26:07 +0000 (22:26 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Jan 2010 20:40:24 +0000 (22:40 +0200)
 * Generate the plugins cache for the build tree during make all
   (if not cross-compiling).
 * Generate the plugins cache for the installation during make install
   (if not staging with DESTDIR).

modules/Makefile.am

index e533432bdc37e8de1aee128596ffff91fd67396e..bb5cf0fe5cf8df06f0c1938aa35ab529ca38cd6a 100644 (file)
@@ -30,7 +30,7 @@ EXTRA_SUBDIRS = \
        $(NULL)
 
 SUBDIRS = $(BASE_SUBDIRS)
-DIST_SUBDIRS = $(BASE_SUBDIRS) $(EXTRA_SUBDIRS)
+DIST_SUBDIRS = $(BASE_SUBDIRS) $(EXTRA_SUBDIRS) .
 if ENABLE_SOUT
 SUBDIRS += access_output mux stream_out
 endif
@@ -52,6 +52,26 @@ endif
 if HAVE_ARM_NEON
 SUBDIRS += arm_neon
 endif
+SUBDIRS += .
 
 dist_noinst_SCRIPTS = genmf list.sh
 dist_noinst_DATA = LIST
+noinst_DATA = stamp-cache
+MOSTLYCLEANFILES = stamp-cache plugins-*-*.dat
+
+.PHONY: stamp-cache
+
+stamp-cache:
+       $(AM_V_GEN)if test "$(build)" = "$(host)"; then \
+               ../bin/vlc-cache-gen$(EXEEXT) . ; \
+       else \
+               echo "Cross-compilation: cache generation skipped!" ; \
+       fi
+       $(AM_V_at)touch stamp-cache
+
+install-exec-hook:
+       if test -z "$(DESTDIR)"; then \
+               cd "$(vlclibdir)" && ./vlc-cache-gen . ; \
+       else \
+               echo "Staged installation: cache generation skipped!" ; \
+       fi