]> git.lyx.org Git - features.git/commitdiff
scons build system: a few cygwin-related fixes.
authorBo Peng <bpeng@lyx.org>
Mon, 8 May 2006 03:37:49 +0000 (03:37 +0000)
committerBo Peng <bpeng@lyx.org>
Mon, 8 May 2006 03:37:49 +0000 (03:37 +0000)
* SConstruct: pass -Wl, options correctly
* scons_utils.py: find boost libraries with more complex names
* qt4.py: fix a bug regarding the use of pkg_config
* src/SConscript: build a static library for src/*

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13808 a592a061-630c-0410-9148-cb99ea01b6c8

SConstruct
qt4.py
scons_utils.py
src/SConscript

index 3cfd21735affe896a6698d36461ad63a91a98e61..956e0d2e06664b1095fd98970a490ea56948f5a3 100644 (file)
@@ -697,8 +697,8 @@ env['BUILDERS']['fileCopy'] = Builder(action = utils.env_filecopy)
 if platform_name == 'cygwin' and env['frontend'] == 'qt3':
   ld_script_path = '/usr/lib/qt3/mkspecs/cygwin-g++'
   ld_script = utils.installCygwinLDScript(ld_script_path)
-  env.Append(LINKFLAGS = ['-Wl,--enable-runtime-pseudo-reloc -Wl,--script,%s -Wl,-s' % ld_script])
-
+  env.Append(LINKFLAGS = ['-Wl,--enable-runtime-pseudo-reloc', 
+    '-Wl,--script,%s' % ld_script, '-Wl,-s'])
 
 #
 # Report results
diff --git a/qt4.py b/qt4.py
index a6ece5318b387909311f4d19e9a07026b6f7e28e..40aef1271f010e48b69c401f11652847ed8d7f63 100644 (file)
--- a/qt4.py
+++ b/qt4.py
@@ -351,7 +351,8 @@ def enable_modules(self, modules, debug=False) :
                                self.AppendUnique(LIBPATH=[os.path.join(self["QTDIR"],"lib",module)])
                                self.AppendUnique(CPPPATH=[os.path.join(self["QTDIR"],"include","qt4",module)])
                                modules.remove(module)
-               self.ParseConfig('PKG_CONFIG_PATH=%s/lib/pkgconfig pkg-config %s --libs --cflags'%
+               # modified by Bo Peng (/lib/pkgconfig => /lib)
+               self.ParseConfig('PKG_CONFIG_PATH=%s/lib pkg-config %s --libs --cflags'%
                (
                        self['QTDIR'],
                        ' '.join(modules)))
index 03ee03aff768c5fea401cf6c60b720d014d02fe2..7da71d52ec44194c9db12ba7d9f65ffc4f64d302 100644 (file)
@@ -89,7 +89,6 @@ def checkPkgConfig(conf, version):
 def checkPackage(conf, pkg):
   ''' check if pkg is under the control of conf '''
   conf.Message('Checking for package %s...' % pkg)
-  print "pkg-config --exists %s" % pkg
   ret = conf.TryAction("pkg-config --print-errors --exists %s" % pkg)[0]
   conf.Result(ret)
   return ret
@@ -284,11 +283,9 @@ def checkBoostLibraries(conf, lib, pathes):
       conf.Result('yes')
       return (path, lib)
     # check things like libboost_iostreams-gcc.a
-    # I know, this does not look clever ...
-    files = glob.glob(os.path.join(path, 'lib%s-[a-z][a-z].a' % lib)) + \
-      glob.glob(os.path.join(path, 'lib%s-[a-z][a-z][a-z].a' % lib)) + \
-      glob.glob(os.path.join(path, 'lib%s-[a-z][a-z][a-z][a-z].a' % lib))
-    # and not clean 
+    files = glob.glob(os.path.join(path, 'lib%s-*.a' % lib))
+    # if there are more than one, choose the first one
+    # FIXME: choose the best one.
     if len(files) >= 1:
       # get xxx-gcc from /usr/local/lib/libboost_xxx-gcc.a
       conf.Result('yes')
index ad1f4af27d7f7139b06660d62b8e3514bb99046c..4e90038cf07f0fe48662489afcdb5a3fb19f594a 100644 (file)
@@ -34,7 +34,6 @@ if env['INCLUDED_BOOST']:
 env.substFile('version.C', 'version.C.in')
 
 lyx_source = Split('''
-  main.C
   Bidi.C 
   BufferView.C 
   BufferView_pimpl.C 
@@ -152,13 +151,22 @@ elif env.has_key('USE_PSPELL') and env['USE_PSPELL']:
 elif env.has_key('USE_ISPELL') and env['USE_ISPELL']:
   lyx_source += ['ispell.C']
 
+#
+# Create a static library for this directory as well
+# 
+lyx_base = env.StaticLibrary(
+  target = '$LOCALLIBPATH/lyx_base',
+  source = lyx_source
+)
+
 #
 # Build lyx with given frontend
 #
 lyx = env.Program(
   target = 'lyx',
-  source = lyx_source,
+  source = ['main.C'],
   LIBS = [
+    'lyx_base',
     'mathed', 
     'insets', 
     'frontends',