lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r947816 - in /lucene/pylucene/trunk/jcc: jcc/python.py setup.py
Date Mon, 24 May 2010 21:17:09 GMT
Author: vajda
Date: Mon May 24 21:17:07 2010
New Revision: 947816

URL: http://svn.apache.org/viewvc?rev=947816&view=rev
Log:
added IMPLIB_FLAGS for implib support on windows

Modified:
    lucene/pylucene/trunk/jcc/jcc/python.py
    lucene/pylucene/trunk/jcc/setup.py

Modified: lucene/pylucene/trunk/jcc/jcc/python.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc/python.py?rev=947816&r1=947815&r2=947816&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc/python.py (original)
+++ lucene/pylucene/trunk/jcc/jcc/python.py Mon May 24 21:17:07 2010
@@ -20,7 +20,7 @@ from cpp import cppname, cppnames, typen
 from cpp import line, signature, find_method, split_pkg, sort
 from cpp import Modifier, Class, Method
 from _jcc import findClass
-from config import INCLUDES, CFLAGS, DEBUG_CFLAGS, LFLAGS, SHARED
+from config import INCLUDES, CFLAGS, DEBUG_CFLAGS, LFLAGS, IMPLIB_LFLAGS, SHARED
 
 try:
     from cpp import ParameterizedType, TypeVariable
@@ -1789,7 +1789,7 @@ def compile(env, jccPath, output, module
             package_data.append(extlib)
             args['extra_link_args'] += [
                 os.path.join(shlibdir, 'jcc', 'jcc%s.lib' %(_d)),
-                "/IMPLIB:%s" %(os.path.join(modulePath, extlib))
+                ' '.join(IMPLIB_LFLAGS) %(os.path.join(modulePath, extlib))
             ]
             args['libraries'] = [
                 os.path.join(import_.__dir__, 'lib',

Modified: lucene/pylucene/trunk/jcc/setup.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/setup.py?rev=947816&r1=947815&r2=947816&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/setup.py (original)
+++ lucene/pylucene/trunk/jcc/setup.py Mon May 24 21:17:07 2010
@@ -135,6 +135,11 @@ LFLAGS = {
                  '-Wl,-rpath=%(freebsd7)s/jre/lib/i386:%(freebsd7)s/jre/lib/i386/client'
%(JDK)],
 }
 
+IMPLIB_LFLAGS = {
+    'win32': ["/IMPLIB:%s"],
+    'mingw32': ["-Wl,--out-implib,%s"]
+}
+
 if platform == 'linux2':
     LFLAGS['linux2'] = LFLAGS['linux2/%s' %(machine)]
 
@@ -206,6 +211,11 @@ def main(debug):
     else:
         _lflags = LFLAGS[platform]
 
+    if 'JCC_IMPLIB_LFLAGS' in os.environ:
+        _implib_lflags = os.environ['JCC_IMPLIB_LFLAGS'].split(_jcc_argsep)
+    else:
+        _implib_lflags = IMPLIB_LFLAGS.get(platform, [])
+
     if 'JCC_JAVAC' in os.environ:
         _javac = os.environ['JCC_JAVAC'].split(_jcc_argsep)
     else:
@@ -222,6 +232,7 @@ def main(debug):
                    'CFLAGS=%s' %(_cflags),
                    'DEBUG_CFLAGS=%s' %(_debug_cflags),
                    'LFLAGS=%s' %(_lflags),
+                   'IMPLIB_LFLAGS=%s' %(_implib_lflags),
                    'SHARED=%s' %(enable_shared),
                    'VERSION="%s"' %(jcc_ver),
                    ''])



Mime
View raw message