mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-05-20 20:08:34 +02:00
- fixed build issue on Solaris (wrong compilation flags for multi-threading)
- fixed build issue on Linux redhat 3: python does not has tarfile module
This commit is contained in:
parent
bf95d0f619
commit
86ccb76138
11
SConstruct
11
SConstruct
@ -134,7 +134,7 @@ if platform == 'suncc':
|
|||||||
env.Tool( 'sunc++' )
|
env.Tool( 'sunc++' )
|
||||||
env.Tool( 'sunlink' )
|
env.Tool( 'sunlink' )
|
||||||
env.Tool( 'sunar' )
|
env.Tool( 'sunar' )
|
||||||
env.Append( LIBS = ['pthreads'] )
|
env.Append( CCFLAGS = ['-mt'] )
|
||||||
elif platform == 'vacpp':
|
elif platform == 'vacpp':
|
||||||
env.Tool( 'default' )
|
env.Tool( 'default' )
|
||||||
env.Tool( 'aixcc' )
|
env.Tool( 'aixcc' )
|
||||||
@ -198,14 +198,21 @@ env['JSONCPP_VERSION'] = JSONCPP_VERSION
|
|||||||
env['BUILD_DIR'] = env.Dir(build_dir)
|
env['BUILD_DIR'] = env.Dir(build_dir)
|
||||||
env['ROOTBUILD_DIR'] = env.Dir(rootbuild_dir)
|
env['ROOTBUILD_DIR'] = env.Dir(rootbuild_dir)
|
||||||
env['DIST_DIR'] = DIST_DIR
|
env['DIST_DIR'] = DIST_DIR
|
||||||
|
if 'TarGz' in env['BUILDERS']:
|
||||||
class SrcDistAdder:
|
class SrcDistAdder:
|
||||||
def __init__( self, env ):
|
def __init__( self, env ):
|
||||||
self.env = env
|
self.env = env
|
||||||
def __call__( self, *args, **kw ):
|
def __call__( self, *args, **kw ):
|
||||||
apply( self.env.SrcDist, (self.env['SRCDIST_TARGET'],) + args, kw )
|
apply( self.env.SrcDist, (self.env['SRCDIST_TARGET'],) + args, kw )
|
||||||
|
env['SRCDIST_BUILDER'] = env.TarGz
|
||||||
|
else: # If tarfile module is missing
|
||||||
|
class SrcDistAdder:
|
||||||
|
def __init__( self, env ):
|
||||||
|
pass
|
||||||
|
def __call__( self, *args, **kw ):
|
||||||
|
pass
|
||||||
env['SRCDIST_ADD'] = SrcDistAdder( env )
|
env['SRCDIST_ADD'] = SrcDistAdder( env )
|
||||||
env['SRCDIST_TARGET'] = os.path.join( DIST_DIR, 'jsoncpp-src-%s.tar.gz' % env['JSONCPP_VERSION'] )
|
env['SRCDIST_TARGET'] = os.path.join( DIST_DIR, 'jsoncpp-src-%s.tar.gz' % env['JSONCPP_VERSION'] )
|
||||||
env['SRCDIST_BUILDER'] = env.TarGz
|
|
||||||
|
|
||||||
env_testing = env.Clone( )
|
env_testing = env.Clone( )
|
||||||
env_testing.Append( LIBS = ['json_${LIB_NAME_SUFFIX}'] )
|
env_testing.Append( LIBS = ['json_${LIB_NAME_SUFFIX}'] )
|
||||||
|
@ -31,6 +31,7 @@ if 'doxygen' in env['TOOLS']:
|
|||||||
target = os.path.join( html_doc_path, 'index.html' ) )
|
target = os.path.join( html_doc_path, 'index.html' ) )
|
||||||
alias_doc_cmd = env.Alias('doc', doc_nodes )
|
alias_doc_cmd = env.Alias('doc', doc_nodes )
|
||||||
env.Alias('doc', env.Install( html_doc_path, '#README.txt' ) )
|
env.Alias('doc', env.Install( html_doc_path, '#README.txt' ) )
|
||||||
|
if 'TarGz' in env['BUILDERS']:
|
||||||
targz_path = os.path.join( env['DIST_DIR'], '%s.tar.gz' % html_dir )
|
targz_path = os.path.join( env['DIST_DIR'], '%s.tar.gz' % html_dir )
|
||||||
zip_doc_cmd = env.TarGz( targz_path, [env.Dir(html_doc_path)],
|
zip_doc_cmd = env.TarGz( targz_path, [env.Dir(html_doc_path)],
|
||||||
TARGZ_BASEDIR = env['ROOTBUILD_DIR'] )
|
TARGZ_BASEDIR = env['ROOTBUILD_DIR'] )
|
||||||
|
@ -167,6 +167,7 @@ def generate(env):
|
|||||||
## scan_check = DoxySourceScanCheck,
|
## scan_check = DoxySourceScanCheck,
|
||||||
## )
|
## )
|
||||||
|
|
||||||
|
if targz.exists(env):
|
||||||
srcdist_builder = targz.makeBuilder( srcDistEmitter )
|
srcdist_builder = targz.makeBuilder( srcDistEmitter )
|
||||||
|
|
||||||
env['BUILDERS']['SrcDist'] = srcdist_builder
|
env['BUILDERS']['SrcDist'] = srcdist_builder
|
||||||
@ -175,4 +176,4 @@ def exists(env):
|
|||||||
"""
|
"""
|
||||||
Make sure srcdist exists.
|
Make sure srcdist exists.
|
||||||
"""
|
"""
|
||||||
return True
|
return targz.exists(env)
|
||||||
|
@ -73,6 +73,10 @@ def generate(env):
|
|||||||
env['TARGZ_COMPRESSION_LEVEL'] = TARGZ_DEFAULT_COMPRESSION_LEVEL # range 0-9
|
env['TARGZ_COMPRESSION_LEVEL'] = TARGZ_DEFAULT_COMPRESSION_LEVEL # range 0-9
|
||||||
env['TARGZ_SUFFIX'] = '.tar.gz'
|
env['TARGZ_SUFFIX'] = '.tar.gz'
|
||||||
env['TARGZ_BASEDIR'] = env.Dir('.') # Sources archive name are made relative to that directory.
|
env['TARGZ_BASEDIR'] = env.Dir('.') # Sources archive name are made relative to that directory.
|
||||||
|
else:
|
||||||
|
def generate(env):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def exists(env):
|
def exists(env):
|
||||||
return internal_targz
|
return internal_targz
|
||||||
|
Loading…
x
Reference in New Issue
Block a user