Commit 7b2a1b3c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Get rid of the UNTRUE conditionnal

and some other Makefile cleanup
parent 5cea088a
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
## bootstrap file for the VLC media player ## bootstrap file for the VLC media player
## $Id$ ## $Id$
## ##
## Authors: Sam Hocevar <sam@zoy.org> ## Copyright (C) 2005 the VideoLAN team
##
## Initial author: Sam Hocevar <sam@zoy.org>
if test "$#" != "0"; then if test "$#" != "0"; then
echo "Usage: $0" echo "Usage: $0"
...@@ -188,13 +190,22 @@ EOF ...@@ -188,13 +190,22 @@ EOF
for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac` for dir in `sed -ne 's,modules/\(.*\)/Makefile,\1,p' configure.ac`
do do
printf "." printf "."
mf="modules/${dir}/Modules.am" modf="modules/${dir}/Modules.am"
makf="modules/${dir}/Makefile.am"
basedir="`echo "${dir}" | cut -f1 -d/`" basedir="`echo "${dir}" | cut -f1 -d/`"
# automake will not recurse for make dist if we don't define SUBDIRS = . # automake will not recurse for make dist if we don't define SUBDIRS = .
subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`" subdirs="`sed -ne 's,'modules/${dir}'/\([^/]*\)/Makefile,\1,p' configure.ac | xargs`"
rm -f modules/${dir}/Makefile.am && cat > modules/${dir}/Makefile.am << EOF mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | xargs`"
extra_libs=""
for mod in $mods
do
extra_libs="${extra_libs} lib${mod}_plugin.a"
extra_libs="${extra_libs} lib${mod}.a lib${mod}_pic.a"
done
rm -f "${makf}" && cat > "${makf}" << EOF
# Autogenerated by bootstrap - DO NOT EDIT - edit Modules.am instead # ${makf} automatically generated from ${modf} by bootstrap
# DO NOT EDIT - edit Modules.am instead
NULL = NULL =
libvlc_LIBRARIES = libvlc_LIBRARIES =
...@@ -205,17 +216,19 @@ BUILT_SOURCES = ...@@ -205,17 +216,19 @@ BUILT_SOURCES =
SUBDIRS = ${subdirs} SUBDIRS = ${subdirs}
#DIST_SUBDIRS = \$(SUBDIRS) #DIST_SUBDIRS = \$(SUBDIRS)
libvlcdir = \$(libdir)/vlc/${basedir} libvlcdir = \$(libdir)/vlc/${basedir}
EXTRA_LIBRARIES = ${extra_libs}
include Modules.am include Modules.am
if BUILD_MOZILLA if !BUILD_MOZILLA
if HAVE_WIN32
# There's no need for pic code on win32 so get rid of this to substantially
# reduce the compilation time.
pic = no pic = no
endif
else else
if HAVE_WIN32
dnl There's no need for pic code on win32 so get rid of this to substantially
dnl reduce the compilation time.
pic = no pic = no
endif endif
endif
clean-local: clean-local:
-rm -f *.a *.so *.dll *.sl *.dylib -rm -f *.a *.so *.dll *.sl *.dylib
...@@ -223,25 +236,24 @@ clean-local: ...@@ -223,25 +236,24 @@ clean-local:
all: all-modules all: all-modules
all-modules: all-modules:
@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 `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin\$(LIBEXT);; 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 `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}.a;; 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 `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf} | xargs`; do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_pic.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; \\ \`; 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"
\$(srcdir)Makefile.am: \$(srcdir)Modules.am \$(top_srcdir)bootstrap
cd \$(top_srcdir) && \$(SHELL) ./bootstrap
EOF EOF
for mod in `sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < ${mf}` for mod in $mods
do do
if grep '^SOURCES_'${mod}'.*=.*PRIVATE' < ${mf} >/dev/null 2>&1; then if grep '^SOURCES_'${mod}'.*=.*PRIVATE' < "${modf}" >/dev/null 2>&1; then
PRIVATE='#'; else PRIVATE='#'; else
PRIVATE=''; fi PRIVATE=''; fi
if grep '^nodist_SOURCES_'${mod}'' < ${mf} >/dev/null 2>&1; then if grep '^nodist_SOURCES_'${mod}'' < "${modf}" >/dev/null 2>&1; then
NODIST=''; else NODIST=''; else
NODIST='#'; fi NODIST='#'; fi
# cat >> m4/private.m4-tmp1 << EOF
#dnl AM_CONDITIONAL(${mod}_p, test x\$${mod}_p = xyes)
#dnl AM_CONDITIONAL(${mod}_b, test x\$${mod}_b = xyes)
#EOF
cat >> m4/private.m4-tmp4 << EOF cat >> m4/private.m4-tmp4 << EOF
${mod}) list="\\\${list} ${dir}/lib${mod}" ;; ${mod}) list="\\\${list} ${dir}/lib${mod}" ;;
EOF EOF
...@@ -252,66 +264,51 @@ EOF ...@@ -252,66 +264,51 @@ EOF
# the resulting file size. # the resulting file size.
# - *_CFLAGS, *_CXXFLAGS etc. because per-object CPPFLAGS does not seem to # - *_CFLAGS, *_CXXFLAGS etc. because per-object CPPFLAGS does not seem to
# work properly with any automake version I tested. # work properly with any automake version I tested.
cat >> modules/${dir}/Makefile.am << EOF cat >> "${makf}" << EOF
# The ${mod} plugin # The ${mod} plugin
EOF EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
clean-local: clean-${mod} clean-local: clean-${mod}
clean-${mod}: clean-${mod}:
-test -z "\$(nodist_SOURCES_${mod})" || rm -f \$(nodist_SOURCES_${mod}) -test -z "\$(nodist_SOURCES_${mod})" || rm -f \$(nodist_SOURCES_${mod})
EOF EOF
fi fi
cat >> modules/${dir}/Makefile.am << EOF if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
if UNTRUE
L${mod}p = lib${mod}_plugin.a
D${mod}p = lib${mod}_plugin\$(LIBEXT)
L${mod}b = lib${mod}.a
L${mod}pic = lib${mod}_pic.a
EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF
B${mod} = \$(nodist_SOURCES_${mod})
EOF
fi
cat >> modules/${dir}/Makefile.am << EOF
endif
EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF
${PRIVATE}BUILT_SOURCES += \$(B${mod}) ${PRIVATE}BUILT_SOURCES += \$(B${mod})
EOF EOF
fi fi
cat >> modules/${dir}/Makefile.am << EOF cat >> "${makf}" << EOF
${PRIVATE}lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod}) ${PRIVATE}lib${mod}_plugin_a_SOURCES = \$(SOURCES_${mod})
EOF EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
${PRIVATE}nodist_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod}) ${PRIVATE}nodist_lib${mod}_plugin_a_SOURCES = \$(nodist_SOURCES_${mod})
EOF EOF
fi fi
cat >> modules/${dir}/Makefile.am << EOF cat >> "${makf}" << EOF
lib${mod}_plugin_a_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\` lib${mod}_plugin_a_CFLAGS = \`\$(VLC_CONFIG) --cflags plugin ${mod}\`
lib${mod}_plugin_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\` lib${mod}_plugin_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags plugin ${mod}\`
lib${mod}_plugin_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\` lib${mod}_plugin_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags plugin ${mod}\`
lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod}) lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
EOF EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
nodist_lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod}) nodist_lib${mod}_pic_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
EOF EOF
fi fi
cat >> modules/${dir}/Makefile.am << EOF cat >> "${makf}" << EOF
lib${mod}_pic_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin pic ${mod}\` lib${mod}_pic_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin pic ${mod}\`
lib${mod}_pic_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin pic ${mod}\` lib${mod}_pic_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin pic ${mod}\`
lib${mod}_pic_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin pic ${mod}\` lib${mod}_pic_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin pic ${mod}\`
lib${mod}_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod}) lib${mod}_a_SOURCES = ${PRIVATE}\$(SOURCES_${mod})
EOF EOF
if [ "${NODIST}" != "#" ]; then cat >> modules/${dir}/Makefile.am << EOF if [ "${NODIST}" != "#" ]; then cat >> "${makf}" << EOF
nodist_lib${mod}_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod}) nodist_lib${mod}_a_SOURCES = ${PRIVATE}\$(nodist_SOURCES_${mod})
EOF EOF
fi fi
cat >> modules/${dir}/Makefile.am << EOF cat >> "${makf}" << EOF
lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\` lib${mod}_a_CFLAGS = \`\$(VLC_CONFIG) --cflags builtin ${mod}\`
lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\` lib${mod}_a_CXXFLAGS = \`\$(VLC_CONFIG) --cxxflags builtin ${mod}\`
lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\` lib${mod}_a_OBJCFLAGS = \`\$(VLC_CONFIG) --objcflags builtin ${mod}\`
...@@ -334,7 +331,6 @@ EOF ...@@ -334,7 +331,6 @@ EOF
done done
cat >> m4/private.m4-tmp1 << EOF cat >> m4/private.m4-tmp1 << EOF
AM_CONDITIONAL(UNTRUE, false)
]) ])
EOF EOF
cat m4/private.m4-tmp1 >> m4/private.m4 && rm -f m4/private.m4-tmp1 cat m4/private.m4-tmp1 >> m4/private.m4 && rm -f m4/private.m4-tmp1
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Building the Mozilla plugin # Building the Mozilla plugin
############################################################################### ###############################################################################
noinst_LIBRARIES = $(noinst_LIBRARIES_mozilla) EXTRA_LIBRARIES = libplugin.a
MOSTLYCLEANFILES = $(LIBRARIES_mozilla) MOSTLYCLEANFILES = $(LIBRARIES_mozilla)
EXTRA_DIST = $(SOURCES_mozilla) $(DIST_rsrc) vlcintf.idl EXTRA_DIST = $(SOURCES_mozilla) $(DIST_rsrc) vlcintf.idl
...@@ -51,10 +51,6 @@ endif ...@@ -51,10 +51,6 @@ endif
endif endif
if BUILD_MOZILLA if BUILD_MOZILLA
if UNTRUE
noinst_LIBRARIES_mozilla = libplugin.a
endif
libplugin_a_SOURCES = $(SOURCES_mozilla) libplugin_a_SOURCES = $(SOURCES_mozilla)
libplugin_a_CFLAGS = `$(VLC_CONFIG) --cflags mozilla $(pic)` \ libplugin_a_CFLAGS = `$(VLC_CONFIG) --cflags mozilla $(pic)` \
$(CPPFLAGS_mozilla_EXTRA) -Imozilla $(CPPFLAGS_mozilla_EXTRA) -Imozilla
......
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