Commit e0d2a918 authored by Marcel Huber's avatar Marcel Huber
Browse files

made target specs more specific

- explicitly added include targets
parent 03da6bf9
......@@ -25,16 +25,12 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
from ConfigureHelper import Configure
from SConsider import cloneBaseEnv, createTargets
buildSettings = {}
env = cloneBaseEnv()
conf = Configure(env)
if conf.CheckCHeader('cute.h'):
conf.env.Append(CPPDEFINES='HAS_CUTE')
env = conf.Finish()
buildSettings = {}
if 'HAS_CUTE' in env['CPPDEFINES']:
buildSettings['include'] = {}
env = conf.Finish()
createTargets(packagename, buildSettings)
elif _sconsider_dist >= pkg_resources.parse_version("0.5"):
......
......@@ -28,13 +28,16 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
buildSettings = {
packagename: {
'linkDependencies': [
createFulltargetname(packagename, 'ldap50')
createFulltargetname(packagename, 'include'),
createFulltargetname(packagename, 'lib_ldap')
],
},
'include': {
'public': {
'includeSubdir': 'include',
},
},
'ldap50': {
'lib_ldap': {
'sourceFiles': [getBinaryDistDir(packagename).File('ldap50')],
'targetType': 'PrecompiledLibrary',
},
......@@ -48,7 +51,7 @@ elif _sconsider_dist >= pkg_resources.parse_version("0.5"):
includeTarget = EnvBuilder(export=[EnvBuilder().include(Dir('include'))]).build().RegisterPackageTarget(
packagename=packagename, targetname='include')
libnames = [('ldap50', 'lib_iplanetLDAP')]
libnames = [('ldap50', 'lib_ldap')]
libs_installed = installPrecompiledLibraries(packagename, libnames)
libs = EnvBuilder().depend(libs_installed).build().RegisterPackageTarget(packagename=packagename,
targetname='libs')
......
......@@ -25,17 +25,10 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
from ConfigureHelper import Configure
from SConsider import cloneBaseEnv, createTargets
buildSettings = {}
env = cloneBaseEnv()
conf = Configure(env)
if conf.CheckLibWithHeader('ldap50', 'ldap.h', 'C'):
conf.env.Append(CPPDEFINES='HAS_IPLANETLDAP')
env = conf.Finish()
buildSettings = {}
if 'HAS_IPLANETLDAP' in env['CPPDEFINES']:
buildSettings[packagename] = {
'linkDependencies': [packagename + '.ldap50'],
}
buildSettings['ldap50'] = {
'public': {
'appendUnique': {
......@@ -43,7 +36,10 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
},
},
}
buildSettings[packagename] = {
'linkDependencies': [createFulltargetname(packagename, 'ldap50')],
}
env = conf.Finish()
createTargets(packagename, buildSettings)
elif _sconsider_dist >= pkg_resources.parse_version("0.5"):
......
......@@ -23,16 +23,14 @@ else:
if _sconsider_dist < pkg_resources.parse_version("0.5"):
from ConfigureHelper import Configure
from SConsider import createTargets, cloneBaseEnv
env = cloneBaseEnv()
conf = Configure(env)
if conf.CheckLibWithHeader('loki', 'loki/SmartPtr.h', 'CXX'):
conf.env.Append(CPPDEFINES='HAS_LOKI')
env = conf.Finish()
from SConsider import cloneBaseEnv, createTargets
buildSettings = {}
if 'HAS_LOKI' in env['CPPDEFINES']:
env = cloneBaseEnv()
conf = Configure(env)
if conf.CheckCXXHeader('loki/SmartPtr.h'):
buildSettings['include'] = {}
if conf.CheckLibWithHeader('loki', 'loki/SmartPtr.h', 'CXX'):
buildSettings['lokiObjects'] = {
'public': {
'appendUnique': {
......@@ -40,7 +38,7 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
},
},
}
conf.Finish()
createTargets(packagename, buildSettings)
elif _sconsider_dist >= pkg_resources.parse_version("0.5"):
......
......@@ -28,11 +28,13 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
buildSettings = {
packagename: {
'linkDependencies': [
createFulltargetname(packagename, 'include'),
createFulltargetname(packagename, 'mqic'),
createFulltargetname(packagename, 'mqiz'),
createFulltargetname(packagename, 'mqmcs'),
],
'targetType': 'IncludeOnly',
},
'include': {
'public': {
'includeSubdir': 'inc',
},
......
......@@ -25,13 +25,23 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
from ConfigureHelper import Configure
from SConsider import cloneBaseEnv, createTargets
buildSettings = {}
env = cloneBaseEnv()
conf = Configure(env)
if conf.CheckCHeader('cmqc.h') and conf.CheckMultipleLibs(['mqic', 'mqiz', 'mqmcs']):
conf.env.Append(CPPDEFINES='HAS_MQM')
if conf.CheckCHeader('cmqc.h'):
buildSettings['include'] = {}
for _libname in ['mqic', 'mqiz', 'mqmcs']:
if conf.CheckLib(_libname):
buildSettings['_'.join(['lib', _libname])] = {
'public': {
'appendUnique': {
'LIBS': [_libname],
},
},
}
env = conf.Finish()
buildSettings = {}
if 'HAS_MQM' in env['CPPDEFINES']:
buildSettings[packagename] = {
'linkDependencies': [
......@@ -40,27 +50,6 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
createFulltargetname(packagename, 'mqmcs'),
],
}
buildSettings['mqic'] = {
'public': {
'appendUnique': {
'LIBS': ['mqic'],
},
},
}
buildSettings['mqiz'] = {
'public': {
'appendUnique': {
'LIBS': ['mqiz'],
},
},
}
buildSettings['mqmcs'] = {
'public': {
'appendUnique': {
'LIBS': ['mqmcs'],
},
},
}
createTargets(packagename, buildSettings)
elif _sconsider_dist >= pkg_resources.parse_version("0.5"):
......
......@@ -28,18 +28,20 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
buildSettings = {
packagename: {
'linkDependencies': [
createFulltargetname(packagename, 'mysqlclient'),
createFulltargetname(packagename, 'include'),
createFulltargetname(packagename, 'lib_mysql'),
],
'targetType': 'IncludeOnly',
},
'include': {
'public': {
'includeSubdir': 'include',
},
},
'mysqlclient': {
'lib_mysql': {
'sourceFiles': [getBinaryDistDir(packagename).File('mysql')],
'targetType': 'PrecompiledLibrary',
},
'mysqlbin': {
'bin_mysql': {
'sourceFiles': [getBinaryDistDir(packagename).File('mysql')],
'targetType': 'PrecompiledBinary',
},
......@@ -47,9 +49,9 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
'targetType': 'ProgramApp',
'runConfig': {},
'requires': [
createFulltargetname(packagename, 'mysqlclient'),
createFulltargetname(packagename, 'lib_mysql'),
],
'usedTarget': createFulltargetname(packagename, 'mysqlbin'),
'usedTarget': createFulltargetname(packagename, 'bin_mysql'),
},
}
......
......@@ -28,14 +28,16 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
buildSettings = {
packagename: {
'linkDependencies': [
createFulltargetname(packagename, 'aceclnt'),
createFulltargetname(packagename, 'include'),
createFulltargetname(packagename, 'lib_aceclnt'),
],
'targetType': 'IncludeOnly',
},
'include': {
'public': {
'includeSubdir': 'include',
},
},
'aceclnt': {
'lib_aceclnt': {
'sourceFiles': [getBinaryDistDir(packagename).File('aceclnt')],
'targetType': 'PrecompiledLibrary',
},
......
......@@ -34,6 +34,7 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
buildSettings = {
packagename: {
'linkDependencies': [
createFulltargetname(packagename, 'include'),
createFulltargetname(packagename, 'sybunic'),
createFulltargetname(packagename, 'sybcs'),
createFulltargetname(packagename, 'sybct'),
......@@ -42,6 +43,8 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
createFulltargetname(packagename, 'sybcomn'),
],
'requires': [createFulltargetname(packagename, 'config')],
},
'include': {
'public': {
'includeSubdir': 'include',
},
......@@ -86,7 +89,7 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
'sourceFiles': [getBinaryDistDir(packagename).File('sybcomn')],
'targetType': 'PrecompiledLibrary',
},
'isql': {
'bin_isql': {
'sourceFiles': [getBinaryDistDir(packagename).File('isql')],
'requires': [
PackageRegistry.createFulltargetname(packagename, 'config'),
......@@ -96,7 +99,7 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
'script_isql': {
'targetType': 'ProgramApp',
'runConfig': {},
'usedTarget': createFulltargetname(packagename, 'isql'),
'usedTarget': createFulltargetname(packagename, 'bin_isql'),
},
}
......
......@@ -112,7 +112,7 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
},
}
if isqlbin:
buildSettings['isql'] = {
buildSettings['bin_isql'] = {
'sourceFiles': [isqlbin],
'requires': [
PackageRegistry.createFulltargetname(packagename, 'config'),
......@@ -122,7 +122,7 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
buildSettings['script_isql'] = {
'targetType': 'ProgramApp',
'runConfig': {},
'usedTarget': createFulltargetname(packagename, 'isql'),
'usedTarget': createFulltargetname(packagename, 'bin_isql'),
}
createTargets(packagename, buildSettings)
......
......@@ -28,6 +28,7 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
buildSettings = {
packagename: {
'linkDependencies': [
createFulltargetname(packagename, 'include'),
createFulltargetname(packagename, 'gxi'),
createFulltargetname(packagename, 'gxibasicmatch'),
createFulltargetname(packagename, 'gxical'),
......@@ -39,6 +40,8 @@ if _sconsider_dist < pkg_resources.parse_version("0.5"):
createFulltargetname(packagename, 'icudata'),
createFulltargetname(packagename, 'icuuc'),
],
},
'include': {
'public': {
'includeSubdir': 'include',
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment