[vlc-devel] [PATCH 17/41] Fit a DLL name longer than 8 characters to 8.3 limit on OS/2

KO Myung-Hun komh at chollian.net
Mon Oct 10 13:43:56 CEST 2011


---
 modules/genmf |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
 mode change 100755 => 100644 modules/genmf

diff --git a/modules/genmf b/modules/genmf
old mode 100755
new mode 100644
index aefd560..8b648f6
--- a/modules/genmf
+++ b/modules/genmf
@@ -9,6 +9,8 @@
 
 cd $(dirname "$0")/.. || exit 1
 
+system_name=$(uname -s)
+
 while test "$1"
 do
   dir="$1"
@@ -49,6 +51,14 @@ include \$(top_srcdir)/modules/common.am
 EOF
   for mod in $mods
   do
+    shortname_flag=
+    if test "$system_name" = "OS/2"; then
+        shortname="`echo $mod | sed -e s/access_/a_/ -e s/output_/o_/ -e s/memcpy/mc/ -e s/packetizer_/p_/ -e s/stream_/s_/ -e s/filter_/f_/ -e s/out_/o_/ -e s/i420_/i0_/ -e s/i422_/i2_/ -e s/yuy2_/y2_/ -e s/ymga_/ym_/ -e s/converter_/c_/`"
+        if test "$mod" != "$shortname"; then
+            shortname_flag="-shortname `echo ${shortname}_plugin | cut -b -8`"
+        fi
+    fi
+
     cat >> "${makf}" << EOF
 # The ${mod} plugin
 lib${mod}_plugin_la_SOURCES = \$(SOURCES_${mod})
@@ -60,7 +70,7 @@ lib${mod}_plugin_la_CXXFLAGS = \$(AM_CXXFLAGS) \$(CXXFLAGS_${mod})
 lib${mod}_plugin_la_OBJCFLAGS = \$(AM_OBJCFLAGS) \$(OBJCFLAGS_${mod})
 # Set LIBADD and DEPENDENCIES manually:
 lib${mod}_plugin_la_LIBADD = \$(AM_LIBADD) \$(LIBS_${mod})
-lib${mod}_plugin_la_LDFLAGS = \$(AM_LDFLAGS) \$(LDFLAGS_${mod})
+lib${mod}_plugin_la_LDFLAGS = \$(AM_LDFLAGS) \$(LDFLAGS_${mod}) $shortname_flag
 lib${mod}_plugin_la_DEPENDENCIES =
 
 EOF
-- 
1.7.3.2



More information about the vlc-devel mailing list