]> git.sesse.net Git - vlc/blobdiff - Makefile.am
Makefile.am: With VLC-release.app make sure to install not to ln.
[vlc] / Makefile.am
index 5899bf7de39301b6b334d44b6c3ee9f55704a582..262c06fa36256d79dc7b8769c9ead0621eafe2e6 100644 (file)
@@ -2,17 +2,13 @@
 # Automake targets and declarations
 ###############################################################################
 
-NULL =
-
 # SUBDIRS stores the directories where a "make" is required when building
 # something. DIST_SUBDIRS stores the directories where nothing is built but
 # which have makefiles with distribution information.
-#  - intl should come before modules and . because all the code uses gettext
-#  - modules should come before . because vlc needs the builtins
-#  - . should come before mozilla/bindings because the plugin needs libvlc.a
-#  - po should come before . because VLC.app needs the pofiles
-#  - loader should come before modules because some plugins need it
-SUBDIRS = intl po libs/loader libs/srtp src modules . \
+#  - intl (gettext) is needed by src and modules
+#  - src (libvlc) is nedeed by modules, mozilla and bindings
+#  - libs/* are needed by modules
+SUBDIRS = intl po libs/loader libs/srtp src modules \
                mozilla bindings activex share doc
 DIST_SUBDIRS = $(SUBDIRS) m4 ipkg
 
@@ -30,8 +26,7 @@ EXTRA_DIST = \
        vlc.fedora.spec \
        vlc.mandriva.spec \
        vlc.altlinux.spec \
-       vlc.win32.nsi.in \
-       $(NULL)
+       vlc.win32.nsi.in
 
 BUILT_SOURCES_distclean = vlc-config compile vlc.win32.nsi
 BUILT_SOURCES_clean = macosx-sdk
@@ -202,8 +197,7 @@ EXTRA_DIST += \
        extras/MacOSX/plugin/InstallerInfo.plist \
        extras/MacOSX/plugin/InstallerDescription.plist \
        extras/MacOSX/plugin/pbdevelopment.plist \
-       extras/MacOSX/plugin/English.lproj/InfoPlist.strings \
-       $(NULL)
+       extras/MacOSX/plugin/English.lproj/InfoPlist.strings
 
 ###############################################################################
 # Various utilities ( editor syntax files, D-Bus controller ... )
@@ -217,8 +211,7 @@ EXTRA_DIST += \
        extras/valgrind.suppressions \
        extras/m4/autoconf260.m4 \
        extras/dbus-vlc.py \
-       extras/dbus-vlc.glade \
-       $(NULL)
+       extras/dbus-vlc.glade
 
 ###############################################################################
 # MS Visual Studio and eMbedded Visual Studio projects
@@ -237,8 +230,7 @@ EXTRA_DIST += \
        evc/plugins.vcp.in \
        evc/errno.h \
        evc/config.h.in \
-       evc/modules_builtin_evc.h \
-       $(NULL)
+       evc/modules_builtin_evc.h
 
 dist-hook:
        cd $(distdir) && srcdir=. $(SHELL) ./toolbox --update-vc
@@ -276,9 +268,7 @@ if HAVE_WINCE
 vlc_WORKAROUNDLDFLAGS = $(LIBVLC)
 endif
 
-# We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
-# old automake-1.5 bug (automake/279).
-DEPENDENCIES_vlc = src/$(LIB_libvlc) $(DATA_win32_rc)
+vlc_DEPENDENCIES = src/$(LIB_libvlc) $(DATA_win32_rc)
 
 vlc_LDADD = $(DATA_win32_rc) $(LIBVLC)
 
@@ -296,7 +286,7 @@ else
 vlc_LDFLAGS = $(vlc_WORKAROUNDLFDLAGS) `$(VLC_CONFIG) --libs vlc builtin`
 LIB_libvlc = libvlc.a
 LIBVLC = src/$(LIB_libvlc)
-DEPENDENCIES_vlc += stamp-builtin
+vlc_DEPENDENCIES += stamp-builtin
 endif
 vlc_LDADD += $(INCLUDED_LIBINTL)
 endif
@@ -314,7 +304,7 @@ core: libvlc
 
 src/$(LIB_libvlc): libvlc
 
-vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc)
+vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_DEPENDENCIES)
        @rm -f vlc$(EXEEXT)
        @case `$(VLC_CONFIG) --linkage vlc builtin` in \
          c++) cmd="$(CXXLINK)" ;; \
@@ -441,14 +431,20 @@ VLC-release.app: vlc
                  $(top_builddir)/VLC-release.app; \
        rm -Rf $(top_builddir)/tmp
        $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
-       $(INSTALL) $(top_builddir)/vlc \
-                  $(top_builddir)/VLC-release.app/Contents/MacOS/VLC
-       ln -sf ./VLC $(top_builddir)/VLC-release.app/Contents/MacOS/clivlc
-       $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/modules
+       $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/lib
+       $(INSTALL) $(top_builddir)/.libs/vlc \
+                  $(top_builddir)/VLC.app/Contents/MacOS/VLC
+       $(INSTALL) $(top_builddir)/src/.libs/libvlc.1.dylib \
+                  $(top_builddir)/VLC.app/Contents/MacOS/lib/libvlc.dylib
+       install_name_tool -change /usr/local/lib/libvlc.1.dylib \
+                  @executable_path/lib/libvlc.dylib \
+              $(top_builddir)/VLC.app/Contents/MacOS/VLC
+       ln -sf ./VLC $(top_builddir)/VLC.app/Contents/MacOS/clivlc
+       $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/modules
        for i in "" `$(VLC_CONFIG) --target plugin` ; do \
          if test -n "$$i" ; \
-           then $(INSTALL) "$$i$(LIBEXT)" \
-                          "$(top_builddir)/VLC-release.app/Contents/MacOS/modules" ; \
+           then $(INSTALL) "`pwd`/`dirname $$i`/.libs/`basename $$i`$(LIBEXT)" \
+                          "$(top_builddir)/VLC.app/Contents/MacOS/modules" ; \
          fi ; done
        if test -d $(srcdir)/extras/contrib/vlc-lib; then \
          mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/lib ; \
@@ -456,6 +452,10 @@ VLC-release.app: vlc
            $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/lib/`basename $${i}` ; \
          done ; \
        fi
+       $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/luaplaylist
+       for i in $(srcdir)/share/luaplaylist/*.* ; do \
+         $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/luaplaylist/`basename $${i}` ; \
+       done ; \
        $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/dialogs
        $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/js
        $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/old
@@ -497,10 +497,10 @@ VLC-release.app: vlc
              $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
          ln -sf ../English.lproj/MainMenu.nib \
              $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
-         ln -sf ../English.lproj/vlc.scriptTerminology \
-             $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
        done
        printf "APPLVLC#" >| $(top_builddir)/VLC-release.app/Contents/PkgInfo
+       find $(top_builddir)/VLC-release.app -type d -exec chmod ugo+rx '{}' \;
+       find $(top_builddir)/VLC-release.app -type f -exec chmod ugo+r '{}' \;
 
 VLC.app: vlc
        @if test -e "$(top_builddir)/tmp"; then \
@@ -573,18 +573,25 @@ VLC.app: vlc
                  $(top_builddir)/VLC.app; \
        rm -Rf $(top_builddir)/tmp
        $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
-       $(INSTALL) $(top_builddir)/vlc \
+       $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/lib
+       $(INSTALL) $(top_builddir)/.libs/vlc \
                   $(top_builddir)/VLC.app/Contents/MacOS/VLC
+       $(INSTALL) $(top_builddir)/src/.libs/libvlc.1.dylib \
+                  $(top_builddir)/VLC.app/Contents/MacOS/lib/libvlc.dylib
+       install_name_tool -change /usr/local/lib/libvlc.1.dylib \
+                  @executable_path/lib/libvlc.dylib \
+              $(top_builddir)/VLC.app/Contents/MacOS/VLC
        ln -sf ./VLC $(top_builddir)/VLC.app/Contents/MacOS/clivlc
        $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/modules
        for i in "" `$(VLC_CONFIG) --target plugin` ; do \
          if test -n "$$i" ; \
-           then ln -sfn "`pwd`/$$i$(LIBEXT)" \
+           then ln -sfn "`pwd`/`dirname $$i`/.libs/`basename $$i`$(LIBEXT)" \
                           "$(top_builddir)/VLC.app/Contents/MacOS/modules" ; \
          fi ; done
        if test -d $(srcdir)/extras/contrib/vlc-lib; then \
          mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/lib ; \
          for i in $(srcdir)/extras/contrib/vlc-lib/*.dylib ; do \
+               install_name_tool -change /usr/local/lib/libvlc.1.dylib @executable_path/lib/libvlc.dylib $${i}; \
            ln -sfn `pwd`/$${i} $(top_builddir)/VLC.app/Contents/MacOS/lib/`basename $${i}` ; \
          done ; \
        fi
@@ -1019,7 +1026,7 @@ update-po:
          echo "" ; \
          echo "# main sources" ; \
          find include src -name '*.[chm]' -o -name '*.[ch]pp' \
-           | grep -v '\(vlc_symbols\|misc/modules_\|src/misc/version.c\)' \
+           | grep -v '\(vlc_symbols\|misc/modules_\|src/misc/revision.c\|modules/builtin.h\)' \
            | sort ; \
          echo "" ; \
          echo "# modules" ; \