access: http: only warn on deflate errors
[vlc.git] / modules / genmf
blob0b9bdb59d00b03a0667c058669b2f90d7a0e0ffa
1 #! /bin/sh
3 ## genmf file for the VLC media player
4 ##
5 ## Copyright (C) 2005-2007 the VideoLAN team
6 ##
7 ## Authors: Sam Hocevar <sam@zoy.org>
8 ## RĂ©mi Denis-Courmont <rem # videolan # org>
10 cd $(dirname "$0")/.. || exit 1
12 while test "$1"
14 dir="$1"
15 modf="modules/${dir}/Modules.am"
16 if test ! -f "$modf"; then
17 echo "$modf does not exist!" >&2
18 exit 1
20 makf="modules/${dir}/Makefile.am"
21 basedir="`echo "${dir}" | cut -f1 -d/`"
22 mods="`sed -n -e 's/^ *SOURCES_\([^ ]*\).*/\1/p' < "${modf}" | sort | uniq | xargs`"
23 plugins="`sed -n -e 's/^.*lib\([^ ]*\)_plugin\.la.*/\1/p' < "${modf}" | sort | uniq | xargs`"
24 libvlc_ltlibs=""
25 extra_ltlibs=""
26 for mod in $mods
28 case " ${plugins} " in
29 *\ ${mod}\ *)
32 libvlc_ltlibs="${libvlc_ltlibs} \$(LTLIB${mod})"
33 extra_ltlibs="${extra_ltlibs} lib${mod}_plugin.la"
35 esac
36 done
37 rm -f "${makf}" && cat > "${makf}" << EOF
38 # ${makf} automatically generated from ${modf} by $0
39 # DO NOT EDIT THIS FILE DIRECTLY! See Modules.am instead.
41 basedir = ${basedir}
42 dir = ${dir}
43 mods = ${mods}
44 libvlc_LTLIBRARIES = ${libvlc_ltlibs}
45 EXTRA_LTLIBRARIES = ${extra_ltlibs}
47 include \$(top_srcdir)/modules/common.am
49 EOF
50 for mod in $mods
52 cat >> "${makf}" << EOF
53 # The ${mod} plugin
54 lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
55 nodist_lib${mod}_plugin_la_SOURCES = \$(nodist_SOURCES_${mod})
56 # Force per-target objects:
57 lib${mod}_plugin_la_CPPFLAGS = \$(AM_CPPFLAGS) \$(CPPFLAGS_${mod})
58 lib${mod}_plugin_la_CFLAGS = \$(AM_CFLAGS) \$(CFLAGS_${mod})
59 lib${mod}_plugin_la_CXXFLAGS = \$(AM_CXXFLAGS) \$(CXXFLAGS_${mod})
60 lib${mod}_plugin_la_OBJCFLAGS = \$(AM_OBJCFLAGS) \$(OBJCFLAGS_${mod})
61 # Set LIBADD manually:
62 lib${mod}_plugin_la_LIBADD = \$(AM_LIBADD) \$(LIBS_${mod})
63 lib${mod}_plugin_la_LDFLAGS = \$(AM_LDFLAGS) \$(LDFLAGS_${mod})
65 EOF
66 done
68 shift
69 done