Changeset a6c428f6f35e2c5600c9fb8ad568e0d2ec9b00f4

Show
Ignore:
Timestamp:
04/21/08 19:42:38 (5 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1208799758 +0300
git-parent:

[5ffe61babe66f195c908891b8ed2ea33c6235979]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1208799758 +0300
Message:

Put common modules Makefiles stuff to an include file

Less escaping, less stuff that Makefile.am's depend on

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/genmf

    r71ff7a2 ra6c428f  
    3131basedir = ${basedir} 
    3232mods = ${mods} 
    33  
    34 NULL = 
    35 libvlc_LTLIBRARIES = 
    36 EXTRA_DIST = Modules.am 
    37 BUILT_SOURCES = 
    38 CLEANFILES = 
    3933SUBDIRS = ${subdirs} 
    40 SUFFIXES = _plugin\$(LIBEXT) _plugin.la 
    41  
    42 libvlcdir = \$(libdir)/vlc/\$(basedir) 
    43  
    4434EXTRA_LTLIBRARIES = ${extra_ltlibs} 
    4535 
    46 include Modules.am 
    47  
    48 if HAVE_PLUGINS 
    49 LTLIBVLC = \$(top_builddir)/src/libvlc.la 
    50  
    51 AM_LDFLAGS = -rpath '\$(libvlcdir)' -avoid-version \\ 
    52     -module -no-undefined -shrext \$(LIBEXT)  
    53 if HAVE_COMPILER_EXPORT 
    54 AM_LDFLAGS += -export-dynamic 
    55 else 
    56 AM_LDFLAGS += -export-symbol-regex ^vlc_entry 
    57 endif 
    58 AM_LIBADD = \$(LTLIBVLC) 
    59 endif 
    60  
    61 all: all-modules 
    62  
    63 nice: 
    64     \$(top_builddir)/compile 
    65  
    66 # Find out which modules were enabled and tell make to build them 
    67 all-modules: 
    68     @set fnord \$\$MAKEFLAGS; amf=\$\$2; targets=\`\\ 
    69     z=\$\$(\$(VLC_CONFIG) --list plugin); for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) echo lib\$\${mod}_plugin.la;; esac; done; \\ 
    70     \`; case "\$\$targets" in *lib*) \$(MAKE) \$(AM_MAKEFLAGS) \$\$targets || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; ;; esac; \\ 
    71     test -z "\$\$fail" 
    72  
    73 # Build a plugin with the adequate linker and linker's flags 
    74 _plugin.la_plugin\$(LIBEXT): 
    75     @mod="\$*" ; mod=\$\${mod#lib} ; \ 
    76     ldfl="\`\$(VLC_CONFIG) --libs plugin \$\$mod\` \$(LIBVLC) -u \$(SYMPREF)\$(VLC_ENTRY)" ; \ 
    77     case \`\$(VLC_CONFIG) --linkage \$\$mod\` in \\ 
    78       c++)  ld="\$(CXXLINK)" ;; \ 
    79       objc) ld="\$(OBJCLINK)" ;; \ 
    80       c|*)  ld="\$(LINK)" ;; \ 
    81     esac ; \ 
    82     echo \$\$ld \$< \$\$ldfl ; \ 
    83     \$\$ld \$< \$\$ldfl 
    84  
    85 if MAINTAINER_MODE 
    86 \$(srcdir)/Makefile.am: \$(srcdir)/Modules.am \$(top_srcdir)/modules/genmf 
    87     cd \$(top_srcdir) && \$(SHELL) modules/genmf ${dir} 
    88 endif 
    89  
    90 mostlyclean-local: 
    91     -rm -f -- *.la 
    92  
    93 ### automake creates libvlcdir after running install-*-local 
    94 ### so we have to create it ourselves first 
    95 install-exec-local: all-modules 
    96     @if test -z "\$(libvlc_LTLIBRARIES)"; then \ 
    97       z=\$\$(\$(VLC_CONFIG) --list plugin); \ 
    98       m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) printf " lib\$\${mod}_plugin.la" ;; esac; done\` ; \ 
    99       test -z "\$\$m" || \ 
    100         \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" install-libvlcLTLIBRARIES || exit \$\$? ; \ 
    101     fi 
    102  
    103 uninstall-local: 
    104     @if test -z "\$(libvlc_LTLIBRARIES)"; then \ 
    105       z=\$\$(\$(VLC_CONFIG) --list plugin); \ 
    106       m=\`for mod in \$(mods); do case "\$\$z " in *\ \$\${mod}\ *) printf " lib\$\${mod}_plugin.la" ;; esac; done\` ; \ 
    107       test -z "\$\$m" || \ 
    108         \$(MAKE) \$(AM_MAKEFLAGS) libvlc_LTLIBRARIES="\$\$m" uninstall-libvlcLTLIBRARIES || exit \$\$?; \ 
    109     fi 
     36include \$(top_srcdir)/modules/common.am 
    11037 
    11138EOF 
     
    12754    cat >> "${makf}" << EOF 
    12855# The ${mod} plugin 
    129  
    13056EOF 
    13157    cat >> "${makf}" << EOF 
     
    14874# Automake does not understand \`...\` very well inside LIBADD... 
    14975lib${mod}_plugin_la_DEPENDENCIES = \$(AM_LIBADD) 
     76 
    15077EOF 
    15178  done