[vlc-commits] Move MODULE_* predefined constants from vlc-config to Makefile

Rémi Denis-Courmont git at videolan.org
Thu Aug 18 18:56:25 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 18 19:56:01 2011 +0300| [1edf77c5454b2e0a76384bf507dbfb6b77de521a] | committer: Rémi Denis-Courmont

Move MODULE_* predefined constants from vlc-config to Makefile

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1edf77c5454b2e0a76384bf507dbfb6b77de521a
---

 modules/common.am |    9 ++++++++-
 vlc-config.in.in  |    7 -------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/common.am b/modules/common.am
index 5cecb18..b2a3a32 100644
--- a/modules/common.am
+++ b/modules/common.am
@@ -13,7 +13,14 @@ CLEANFILES = $(BUILT_SOURCES)
 
 LTLIBVLCCORE = $(top_builddir)/src/libvlccore.la
 
-AM_CPPFLAGS = -D__PLUGIN__
+# Module name from object or executable file name.
+MODULE_NAME = `p="$@"; p="$${p\#lib}"; echo "$${p%_plugin*}"`
+
+AM_CPPFLAGS = \
+	-DMODULE_NAME=$(MODULE_NAME) \
+	-DMODULE_NAME_IS_$(MODULE_NAME) \
+	-DMODULE_STRING=\"$(MODULE_NAME)\"
+	-D__PLUGIN__
 AM_CFLAGS = `$(VLC_CONFIG) --cflags plugin $@`
 AM_CXXFLAGS = `$(VLC_CONFIG) --cxxflags plugin $@`
 AM_OBJCFLAGS = `$(VLC_CONFIG) --objcflags plugin $@`
diff --git a/vlc-config.in.in b/vlc-config.in.in
index be89ce4..3287656 100644
--- a/vlc-config.in.in
+++ b/vlc-config.in.in
@@ -129,13 +129,6 @@ while test $# -gt 0; do
 done
 
 #
-#  If a module was requested, use its name
-#
-if test -n "${module}"; then
-  cppflags="${cppflags} -DMODULE_NAME=${module} -DMODULE_NAME_IS_${module} -DMODULE_STRING=\"${module}\""
-fi
-
-#
 #  Output what we were asked
 #
 if test "${echo_cppflags}" = yes; then



More information about the vlc-commits mailing list