| Index: SConstruct
|
| ===================================================================
|
| --- SConstruct (Revision 2827)
|
| +++ SConstruct (Arbeitskopie)
|
| @@ -618,6 +618,8 @@
|
| def GetOptions():
|
| result = Options()
|
| result.Add('mode', 'compilation mode (debug, release)', 'release')
|
| + result.Add('prefix', 'destination directory for install', '/usr')
|
| + result.Add('destdir', 'destination directory for install', '')
|
| result.Add('sample', 'build sample (shell, process)', '')
|
| result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,...)', '')
|
| result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '')
|
| @@ -651,13 +653,9 @@
|
|
|
|
|
| def GetVersion():
|
| - version_components = GetVersionComponents()
|
| + return '.'.join(GetVersionComponents())
|
|
|
| - if version_components[len(version_components) - 1] == '0':
|
| - version_components.pop()
|
| - return '.'.join(version_components)
|
|
|
| -
|
| def GetSpecificSONAME():
|
| SONAME_PATTERN = re.compile(r"#define\s+SONAME\s+\"(.*)\"")
|
|
|
| @@ -845,18 +843,20 @@
|
| suffix = SUFFIXES[target_id]
|
| library_name = 'v8' + suffix
|
| version = GetVersion()
|
| - if context.options['soname'] == 'on':
|
| - # When building shared object with SONAME version the library name.
|
| - library_name += '-' + version
|
| - env['LIBRARY'] = library_name
|
|
|
| # Generate library SONAME if required by the build.
|
| if context.options['soname'] == 'on':
|
| + # When building shared object with SONAME version the library suffix.
|
| soname = GetSpecificSONAME()
|
| if soname == '':
|
| - soname = 'lib' + library_name + '.so'
|
| + library_prefix = 'lib' # TODO: use env['SHLIBPREFIX']
|
| + library_suffix = env['SHLIBSUFFIX'] + '.' + version
|
| + soname = library_prefix + library_name + library_suffix
|
| + env['SHLIBSUFFIX'] = library_suffix
|
| env['SONAME'] = soname
|
|
|
| + env['LIBRARY'] = library_name
|
| +
|
| # Build the object files by invoking SCons recursively.
|
| (object_files, shell_files, mksnapshot) = env.SConscript(
|
| join('src', 'SConscript'),
|
| @@ -934,11 +934,17 @@
|
| samples += context.sample_targets
|
| d8s += context.d8_targets
|
|
|
| + installdir = env['destdir'] + env['prefix']
|
| + installs = []
|
| + installs += env.Install(installdir + '/include', ['include/v8.h', 'include/v8-debug.h'])
|
| + installs += env.Install(installdir + '/lib', libraries)
|
| +
|
| env.Alias('library', libraries)
|
| env.Alias('mksnapshot', mksnapshots)
|
| env.Alias('cctests', cctests)
|
| env.Alias('sample', samples)
|
| env.Alias('d8', d8s)
|
| + env.Alias('install', installs)
|
|
|
| if env['sample']:
|
| env.Default('sample')
|
|
|