mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
SCons: allow linking SConstruct to lyx top source directory because I am tired of typing development/scons/SConstrct again and again
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19244 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d4df3a6b6f
commit
e138a93ec7
@ -61,6 +61,9 @@ file:
|
|||||||
> mkdir build
|
> mkdir build
|
||||||
> cd build
|
> cd build
|
||||||
> scons -f ../development/scons/SConstruct frontend=qt4 all
|
> scons -f ../development/scons/SConstruct frontend=qt4 all
|
||||||
|
If you are tired of typing development/scons/SConstruct, you can link
|
||||||
|
development/scons/SConstruct to the top source directory and use this
|
||||||
|
SConstruct file.
|
||||||
|
|
||||||
There are three types of command line options:
|
There are three types of command line options:
|
||||||
* key=value are user options. They are used to tell scons which
|
* key=value are user options. They are used to tell scons which
|
||||||
|
@ -14,6 +14,23 @@
|
|||||||
|
|
||||||
import os, sys, copy, cPickle, glob, time
|
import os, sys, copy, cPickle, glob, time
|
||||||
|
|
||||||
|
# determine where I am ...
|
||||||
|
#
|
||||||
|
from SCons.Node.FS import default_fs
|
||||||
|
# default_fs.SConstruct_dir is where SConstruct file is located.
|
||||||
|
scons_dir = default_fs.SConstruct_dir.path
|
||||||
|
scons_absdir = default_fs.SConstruct_dir.abspath
|
||||||
|
|
||||||
|
# if SConstruct is copied to the top source directory
|
||||||
|
if os.path.exists(os.path.join(scons_dir, 'development', 'scons', 'scons_manifest.py')):
|
||||||
|
scons_dir = os.path.join(scons_dir, 'development', 'scons')
|
||||||
|
scons_absdir = os.path.join(scons_absdir, 'development', 'scons')
|
||||||
|
# get the ../.. of scons_dir
|
||||||
|
top_src_dir = os.path.split(os.path.split(scons_absdir)[0])[0]
|
||||||
|
|
||||||
|
sys.path.extend([scons_absdir, os.path.join(top_src_dir, 'lib', 'doc')])
|
||||||
|
import depend
|
||||||
|
|
||||||
# scons_utils.py defines a few utility function
|
# scons_utils.py defines a few utility function
|
||||||
import scons_utils as utils
|
import scons_utils as utils
|
||||||
# import all file lists
|
# import all file lists
|
||||||
@ -34,15 +51,6 @@ if version[0] == 0 and version[1] == 96 and version[2] < 92:
|
|||||||
print "Scons >= 0.96.92 is required."
|
print "Scons >= 0.96.92 is required."
|
||||||
Exit(1)
|
Exit(1)
|
||||||
|
|
||||||
# determine where I am ...
|
|
||||||
#
|
|
||||||
from SCons.Node.FS import default_fs
|
|
||||||
# default_fs.SConstruct_dir is where SConstruct file is located.
|
|
||||||
scons_dir = default_fs.SConstruct_dir.path
|
|
||||||
# get the ../.. of scons_dir
|
|
||||||
top_src_dir = os.path.split(os.path.split(default_fs.SConstruct_dir.abspath)[0])[0]
|
|
||||||
sys.path.append(os.path.join(top_src_dir, 'lib', 'doc'))
|
|
||||||
import depend
|
|
||||||
|
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
# Global definitions
|
# Global definitions
|
||||||
|
Loading…
Reference in New Issue
Block a user