Commit 29d8ffc9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Oh! No more builtins!

(well only for libtool and shared libvlc)

Clean your build tree before whining.

And yes, it breaks the mostly-builtin option (obviously).
It also speeds up automake a tiny bit.
parent 40356097
...@@ -199,7 +199,7 @@ do ...@@ -199,7 +199,7 @@ do
for mod in $mods for mod in $mods
do do
extra_libs="${extra_libs} lib${mod}_plugin.a lib${mod}.a" extra_libs="${extra_libs} lib${mod}_plugin.a lib${mod}.a"
extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la lib${mod}_builtin.la" extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la"
done done
rm -f "${makf}" && cat > "${makf}" << EOF rm -f "${makf}" && cat > "${makf}" << EOF
...@@ -241,8 +241,7 @@ nice: ...@@ -241,8 +241,7 @@ nice:
all-modules: all-modules:
if USE_LIBTOOL if USE_LIBTOOL
@set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\ @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.la;; esac; done; fi; \\ if test "\$(plugin)" != "no"; then z=\$\$(\$(VLC_CONFIG) --list builtin plugin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin.la;; 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}_builtin.la;; esac; done; fi; \\
\`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\ \`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\
test -z "\$\$fail" test -z "\$\$fail"
else else
...@@ -288,7 +287,7 @@ clean-local: \$(clean_modules) ...@@ -288,7 +287,7 @@ clean-local: \$(clean_modules)
install-exec-local: all-modules install-exec-local: all-modules
if USE_LIBTOOL if USE_LIBTOOL
@if test -z "\$(libvlc_LTLIBRARIES)"; then \ @if test -z "\$(libvlc_LTLIBRARIES)"; then \
z=\$\$(\$(VLC_CONFIG) --list plugin); \ z=\$\$(\$(VLC_CONFIG) --list builtin plugin); \
m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \ m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \
test -z "\$\$m" || \ test -z "\$\$m" || \
\$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" install-libvlcLTLIBRARIES || exit \$\$? ; \ \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" install-libvlcLTLIBRARIES || exit \$\$? ; \
...@@ -304,21 +303,12 @@ else ...@@ -304,21 +303,12 @@ else
;; \ ;; \
esac; \ esac; \
done done
@z=\$\$(\$(VLC_CONFIG) --list builtin); \
for mod in \$(mods); do \
case "\$\$z " \
in *\ \$\${mod}\ *) \
echo \$(INSTALL_DATA) "lib\$\${mod}.a" "\$(DESTDIR)\$(libdir)/vlc/" ; \
\$(INSTALL_DATA) "lib\$\${mod}.a" "\$(DESTDIR)\$(libdir)/vlc/" || exit \$\$?; \
;; \
esac; \
done
endif endif
uninstall-local: uninstall-local:
if USE_LIBTOOL if USE_LIBTOOL
@if test -z "\$(libvlc_LTLIBRARIES)"; then \ @if test -z "\$(libvlc_LTLIBRARIES)"; then \
z=\$\$(\$(VLC_CONFIG) --list plugin); \ z=\$\$(\$(VLC_CONFIG) --list builtin plugin); \
m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \ m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo -n " lib\$\${mod}_plugin.la" ;; esac; done\` ; \
test -z "\$\$m" || \ test -z "\$\$m" || \
\$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" uninstall-libvlcLTLIBRARIES || exit \$\$?; \ \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" uninstall-libvlcLTLIBRARIES || exit \$\$?; \
...@@ -333,15 +323,6 @@ else ...@@ -333,15 +323,6 @@ else
;; \ ;; \
esac; \ esac; \
done 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
endif endif
EOF EOF
...@@ -397,20 +378,15 @@ lib${mod}_plugin_la_LDFLAGS = \`\$(VLC_CONFIG) --libs plugin ${mod}\` \\ ...@@ -397,20 +378,15 @@ lib${mod}_plugin_la_LDFLAGS = \`\$(VLC_CONFIG) --libs plugin ${mod}\` \\
lib${mod}_plugin_la_LIBADD = \$(LTLIBVLC) lib${mod}_plugin_la_LIBADD = \$(LTLIBVLC)
lib${mod}_a_SOURCES = \$(SOURCES_${mod}) lib${mod}_a_SOURCES = \$(SOURCES_${mod})
lib${mod}_builtin_la_SOURCES = \$(SOURCES_${mod})
EOF EOF
if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
nodist_lib${mod}_a_SOURCES = \$(nodist_SOURCES_${mod}) nodist_lib${mod}_a_SOURCES = \$(nodist_SOURCES_${mod})
nodist_lib${mod}_builtin_la_SOURCES = \$(nodist_SOURCES_${mod})
EOF EOF
fi fi
cat >> "${makf}" << EOF cat >> "${makf}" << EOF
lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin pic ${mod}\` lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin pic ${mod}\`
lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin pic ${mod}\` lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin pic ${mod}\`
lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin pic ${mod}\` lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin pic ${mod}\`
lib${mod}_builtin_la_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\`
lib${mod}_builtin_la_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\`
lib${mod}_builtin_la_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\`
EOF EOF
done done
......
...@@ -5519,10 +5519,14 @@ AS_IF([test "x${enable_shared_libvlc}" = "x"], [enable_shared_libvlc=no]) ...@@ -5519,10 +5519,14 @@ AS_IF([test "x${enable_shared_libvlc}" = "x"], [enable_shared_libvlc=no])
AM_CONDITIONAL(BUILD_SHARED, [test "${enable_shared_libvlc}" != "no"]) AM_CONDITIONAL(BUILD_SHARED, [test "${enable_shared_libvlc}" != "no"])
AS_IF([test "${enable_shared_libvlc}" != "no" || test "${enable_libtool}" != "no"], [ AS_IF([test "${enable_shared_libvlc}" != "no" || test "${enable_libtool}" != "no"], [
AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.]) AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"], FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
FILE_LIBVLC_DLL="" ) PLUGINS="${BUILTINS}"
BUILTINS=""
], [
FILE_LIBVLC_DLL=""
])
dnl Import conditional variables generated by bootstrap dnl Import conditional variables generated by bootstrap
VLC_CONDITIONALS VLC_CONDITIONALS
dnl dnl
......
...@@ -124,15 +124,6 @@ misc/modules.c: misc/modules_builtin.h ...@@ -124,15 +124,6 @@ misc/modules.c: misc/modules_builtin.h
# need this workaround. # need this workaround.
stamp-builtins: Makefile ../vlc-config ../config.status stamp-builtins: Makefile ../vlc-config ../config.status
if USE_LIBTOOL
@for c in `$(VLC_CONFIG) --libs builtin`; do \
case $$c in \
../modules/*.a) echo $$c ;; \
esac ; \
done | \
sed -e 's,^\(.*\)/\([^/]*\)\.a$$,cd \1 \&\& $(MAKE) \2_builtin.la,g' | \
while read cmd; do echo $$cmd; eval "($$cmd)" || exit $$? ; done
endif
if BUILD_SHARED if BUILD_SHARED
@for c in `$(VLC_CONFIG) --libs builtin`; do \ @for c in `$(VLC_CONFIG) --libs builtin`; do \
case $$c in \ case $$c in \
...@@ -149,7 +140,7 @@ endif ...@@ -149,7 +140,7 @@ endif
############################################################################### ###############################################################################
libvlc_a_SOURCES = $(SOURCES_libvlc) libvlc_a_SOURCES = $(SOURCES_libvlc)
libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic` libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic` -DUSE_BUILTINS
libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic` libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic` libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
...@@ -158,7 +149,7 @@ libvlc_la_LIBADD = $(INCLUDED_LIBINTL) ...@@ -158,7 +149,7 @@ libvlc_la_LIBADD = $(INCLUDED_LIBINTL)
libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags vlc` libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc` libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc` libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
libvlc_la_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin|sed -e 's/\(modules\/[^ ]*\)\.a /\1_builtin.la /g'` -no-undefined -export-symbols libvlc.sym libvlc_la_LDFLAGS = `$(VLC_CONFIG) --libs vlc` -no-undefined -export-symbols libvlc.sym
libvlc_la_DEPENDENCIES = stamp-builtins stamp-api libvlc_la_DEPENDENCIES = stamp-builtins stamp-api
......
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