From: <al...@us...> - 2006-07-23 17:47:36
|
Revision: 529 Author: allenb Date: 2006-07-23 10:47:33 -0700 (Sun, 23 Jul 2006) ViewCVS: http://svn.sourceforge.net/xml-cppdom/?rev=529&view=rev Log Message: ----------- Use the new variant code being moved to scons-addons. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2006-07-21 19:28:27 UTC (rev 528) +++ trunk/SConstruct 2006-07-23 17:47:33 UTC (rev 529) @@ -15,6 +15,7 @@ import SCons import SConsAddons.Util import SConsAddons.Options as sca_opts +import SConsAddons.Variants as sca_variants import SConsAddons.Options.CppUnit import SConsAddons.Options.Boost from SConsAddons.EnvironmentBuilder import EnvironmentBuilder @@ -42,60 +43,7 @@ os.symlink(pj(os.getcwd(), source), dest) return 0 -def zipVariants(variantMap): - """ This method takes a map of variants and items within each variant and returns - a list of all combinations of ways that the variants can be combined. - - The input format is: - { key : ([option_list,], is_alternative), } - - option_list is a list of all items for this variant. - - is_alternative is a flag saying wether we just need to choose one item or if all - items can be in the same variant combination - - The return format is: - [ {"var":"option", "var2":["op1","op2"]}, .. } - - Each entry in the list is a dictionary that fully specfies a combination of - variant keys and associated items. - """ - - # List of (key,[varlist,]) - alt_items = [ (i[0],i[1][0]) for i in variantMap.iteritems() if i[1][1] == True] - always_items = [ (i[0],i[1][0]) for i in variantMap.iteritems() if i[1][1] == False] - assert len(alt_items) + len(always_items) == len(variantMap) - alt_item_sizes = [len(i[1]) for i in alt_items] # Length of the alt lists - - # Build up list of - # [ (key,'option"), (key2,"option"), ...] - cur_combos=[[]] - for variant in alt_items: - new_combos = [] - variant_key = variant[0] - option_list = variant[1] - for option in option_list: - for i in cur_combos: - new_combos.append(i+[(variant_key,option)]) - cur_combos = new_combos - - #print cur_combos - - # Now turn the list of combo lists into a list of - # combo dictionaries - ret_combos = [] - for c in cur_combos: - combo = {} - for i in c: - combo[i[0]] = i[1] - for i in always_items: - combo[i[0]] = i[1] - ret_combos.append(combo) - - #import pprint - #pprint.pprint(ret_combos) - - return ret_combos - # ------ CUSTOM BUILDERS ------------- # def CreateConfig(target, source, env): """ Config script builder @@ -123,33 +71,7 @@ def registerConfigBuilder(env): env["BUILDERS"]["ConfigBuilder"] = Builder(action=Action(CreateConfig, varlist=['submap',])) -# --- Platform specific environment factory methods --- # -def BuildIRIXEnvironment(): - "Builds a base environment for other modules to build on set up for IRIX" - global optimize, profile, builders - CXXFLAGS = ['-n32', '-mips3', '-LANG:std', '-w2'] - LINKFLAGS = CXXFLAGS - - # Enable profiling? - if profile != 'no': - CXXFLAGS.extend([]) - LINKFLAGS.extend([]) - - # Debug or optimize build? - if optimize != 'no': - CXXFLAGS.extend(['-DNDEBUG', '-O2']) - else: - CXXFLAGS.extend(['-D_DEBUG', '-g', '-gslim']) - - return Environment( - ENV = os.environ, - CXXFLAGS = CXXFLAGS, - LINKFLAGS = LINKFLAGS - ) - - - #------------------------------------------------------------------------------ # Main build setup #------------------------------------------------------------------------------ @@ -275,7 +197,7 @@ # Return list of combos # [ {"var":"option", "var2":["op1","op2"], .. } - var_combos = zipVariants(variants) + var_combos = sca_variants.zipVariants(variants) # ---- FOR EACH VARIANT ----- # variant_pass = -1 # Id of the pass, useful for one-time things @@ -312,11 +234,7 @@ env_bldr.darwin_setSdk(common_env["sdk"]) # --- Build environment --- # - if GetPlatform() == 'irix': - baseEnv = BuildIRIXEnvironment() - opts.Apply(baseEnv) - else: - baseEnv = env_bldr.applyToEnvironment(common_env.Copy(), variant=combo,options=opts) + baseEnv = env_bldr.applyToEnvironment(common_env.Copy(), variant=combo,options=opts) # Determine the build dir for this variant dir_parts = ['%s-%s'%(i[0],i[1]) for i in combo.iteritems() if not isinstance(i[1],(types.ListType))] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2006-07-23 19:49:02
|
Revision: 530 Author: allenb Date: 2006-07-23 12:48:58 -0700 (Sun, 23 Jul 2006) ViewCVS: http://svn.sourceforge.net/xml-cppdom/?rev=530&view=rev Log Message: ----------- - Update to using 'darwin' platform - Mark areas that are potential for generalization Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2006-07-23 17:47:33 UTC (rev 529) +++ trunk/SConstruct 2006-07-23 19:48:58 UTC (rev 530) @@ -95,14 +95,16 @@ else: common_env = Environment(ENV = os.environ) -# Default variants +# Variant setup (get defaults) default_types = ["debug","optimized"] if GetPlatform() == "win32": default_types.append("hybrid") default_libtypes = ["static","shared"] default_archs = ["32","64"] - + +# --------------- # # --- OPTIONS --- # +# --------------- # option_filename = "config.cache." + platform opts = sca_opts.Options(files = [option_filename, 'options.custom'], args= ARGUMENTS) @@ -112,17 +114,16 @@ opts.AddOption(sca_opts.SeparatorOption("\nPackage Options")) opts.AddOption( cppunit_options ) opts.AddOption( boost_options ) +# Variant options opts.AddOption(sca_opts.SeparatorOption("\nBuild Variants")) opts.Add(sca_opts.ListOption('types','Types of run-times to build.(comma separated list)',default_types,default_types)) opts.Add(sca_opts.ListOption('libtypes','Library types to build.(comma separated list)',default_libtypes,default_libtypes)) opts.Add(sca_opts.ListOption('archs','Run-time architectures to build against.(comma separated list)',default_archs,default_archs)) opts.AddOption(sca_opts.SeparatorOption("\nOther settings")) opts.Add('prefix', 'Installation prefix', unspecified_prefix) -#opts.Add('libdir', 'Library installation directory under <prefix>', default_libdir) opts.Add('build_test', 'Build the test programs', 'yes') opts.Add(sca_opts.BoolOption('versioning', 'If no then build only libraries and headers without versioning', True)) -opts.Add('MakeDist', 'If true, make the distribution packages as part of the build', 'no') opts.Add(sca_opts.BoolOption('universal', 'Build universal binaries (Mac OS X only)',True)) opts.Add('sdk', 'Platform SDK (Mac OS X only)', '') if common_env.has_key("MSVS"): @@ -164,7 +165,7 @@ common_env['INSTALL'] = symlinkInstallFunc common_env['prefix'] = pj( Dir('.').get_abspath(), buildDir, 'instlinks') - # Setup installation paths + # --- Setup installation paths --- # base_inst_paths = {} base_inst_paths['base'] = os.path.abspath(common_env['prefix']) base_inst_paths['lib'] = pj(base_inst_paths['base'], 'lib') @@ -185,6 +186,10 @@ variants["type"] = (common_env["types"], True) variants["libtype"] = (common_env["libtypes"], False) variants["arch"] = (common_env["archs"], True) + + # Return list of combos + # [ {"var":"option", "var2":["op1","op2"], .. } + var_combos = sca_variants.zipVariants(variants) print "types: ", common_env["types"] print "libtypes: ", common_env["libtypes"] @@ -194,23 +199,20 @@ # Update environment for boost options if boost_options.isAvailable(): boost_options.apply(common_env) - - # Return list of combos - # [ {"var":"option", "var2":["op1","op2"], .. } - var_combos = sca_variants.zipVariants(variants) # ---- FOR EACH VARIANT ----- # variant_pass = -1 # Id of the pass, useful for one-time things for combo in var_combos: - variant_pass += 1 + variant_pass += 1 # xxx: standard inst_paths = copy.copy(base_inst_paths) # -- Setup Environment builder --- # - env_bldr = EnvironmentBuilder() - #env_bldr.enableWarnings(EnvironmentBuilder.MAXIMUM) + env_bldr = EnvironmentBuilder() + # xxx: loop invariant env_bldr.enableWarnings(EnvironmentBuilder.MINIMAL) # Process modifications for variant combo + # xxx: standard if combo["type"] == "debug": env_bldr.enableDebug() env_bldr.setMsvcRuntime(EnvironmentBuilder.MSVC_MT_DBG_DLL_RT) @@ -227,9 +229,11 @@ env_bldr.setCpuArch(EnvironmentBuilder.X64_ARCH) inst_paths['lib'] = inst_paths['lib'] + '64' + # xxx: loop invariant if common_env["universal"] == True: env_bldr.darwin_enableUniversalBinaries(); + # xxx: loop invariant if common_env["sdk"] != "": env_bldr.darwin_setSdk(common_env["sdk"]) @@ -237,10 +241,12 @@ baseEnv = env_bldr.applyToEnvironment(common_env.Copy(), variant=combo,options=opts) # Determine the build dir for this variant + # xxx: common dir_parts = ['%s-%s'%(i[0],i[1]) for i in combo.iteritems() if not isinstance(i[1],(types.ListType))] full_build_dir = pj(buildDir,"--".join(dir_parts)) # Build up library name and paths to use + # xxx: common (static_lib_suffix,shared_lib_suffix) = ("","") if GetPlatform() == "win32": if combo["type"] == "debug": This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2006-07-23 23:01:12
|
Revision: 532 Author: allenb Date: 2006-07-23 16:01:10 -0700 (Sun, 23 Jul 2006) ViewCVS: http://svn.sourceforge.net/xml-cppdom/?rev=532&view=rev Log Message: ----------- Begin to use VariantHelper. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2006-07-23 21:23:14 UTC (rev 531) +++ trunk/SConstruct 2006-07-23 23:01:10 UTC (rev 532) @@ -97,6 +97,9 @@ common_env = Environment(ENV = os.environ) registerConfigBuilder(common_env) +variant_helper = sca_variants.VariantsHelper() + + # Variant setup (get defaults) default_types = ["debug","optimized"] if GetPlatform() == "win32": This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2006-07-23 23:49:45
|
Revision: 533 Author: allenb Date: 2006-07-23 16:49:43 -0700 (Sun, 23 Jul 2006) ViewCVS: http://svn.sourceforge.net/xml-cppdom/?rev=533&view=rev Log Message: ----------- Further updates to common variant code in scons-addons. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2006-07-23 23:01:10 UTC (rev 532) +++ trunk/SConstruct 2006-07-23 23:49:43 UTC (rev 533) @@ -16,6 +16,7 @@ import SConsAddons.Util import SConsAddons.Options as sca_opts import SConsAddons.Variants as sca_variants +import SConsAddons.Builders import SConsAddons.Options.CppUnit import SConsAddons.Options.Boost from SConsAddons.EnvironmentBuilder import EnvironmentBuilder @@ -44,38 +45,10 @@ return 0 -# ------ CUSTOM BUILDERS ------------- # -def CreateConfig(target, source, env): - """ Config script builder - Creates the prefix-config file users use to compile against this library - """ - targets = map(lambda x: str(x), target) - sources = map(lambda x: str(x), source) - - submap = env['submap'] - - # Build each target from its source - for i in range(len(targets)): - print "Generating config file " + targets[i] - contents = open(sources[i], 'r').read() - - # Go through the substitution dictionary and modify the contents read in - # from the source file - for key, value in submap.items(): - contents = re.sub(re.escape(key), value, contents) - - # Write out the target file with the new contents - open(targets[0], 'w').write(contents) - os.chmod(targets[0], 0755) - -def registerConfigBuilder(env): - env["BUILDERS"]["ConfigBuilder"] = Builder(action=Action(CreateConfig, varlist=['submap',])) - - #------------------------------------------------------------------------------ # Main build setup #------------------------------------------------------------------------------ -EnsureSConsVersion(0,94) +EnsureSConsVersion(0,96) #SourceSignatures('MD5') #SourceSignatures('timestamp') SConsignFile() @@ -95,18 +68,10 @@ common_env = Environment() else: common_env = Environment(ENV = os.environ) -registerConfigBuilder(common_env) +SConsAddons.Builders.registerSubstBuilder(common_env) +# Create variant helper and builder variant_helper = sca_variants.VariantsHelper() - - -# Variant setup (get defaults) -default_types = ["debug","optimized"] -if GetPlatform() == "win32": - default_types.append("hybrid") -default_libtypes = ["static","shared"] -default_archs = ["ia32","x64"] - base_bldr = EnvironmentBuilder() # --------------- # @@ -120,11 +85,8 @@ opts.AddOption(sca_opts.SeparatorOption("\nPackage Options")) opts.AddOption( cppunit_options ) opts.AddOption( boost_options ) -# Variant options -opts.AddOption(sca_opts.SeparatorOption("\nBuild Variants")) -opts.Add(sca_opts.ListOption('types','Types of run-times to build.(comma separated list)',default_types,default_types)) -opts.Add(sca_opts.ListOption('libtypes','Library types to build.(comma separated list)',default_libtypes,default_libtypes)) -opts.Add(sca_opts.ListOption('archs','Run-time architectures to build against.(comma separated list)',default_archs,default_archs)) +base_bldr.addOptions(opts) +variant_helper.addOptions(opts) opts.AddOption(sca_opts.SeparatorOption("\nOther settings")) opts.Add('prefix', 'Installation prefix', unspecified_prefix) opts.Add('build_test', 'Build the test programs', 'yes') @@ -133,7 +95,6 @@ if common_env.has_key("MSVS"): opts.Add('MSVS_VERSION', 'Set to specific version of MSVS to use. %s'%str(common_env['MSVS']['VERSIONS']), common_env['MSVS']['VERSION']) -base_bldr.addOptions(opts) opts.Process(common_env) @@ -159,6 +120,7 @@ pass # -- Common builder settings + variant_helper.readOptions(common_env) base_bldr.readOptions(common_env) base_bldr.enableWarnings() @@ -187,18 +149,15 @@ # Define the variants to use # - variant[key] - ([option_list,], is alternative) - variants = {} - variants["type"] = (common_env["types"], True) - variants["libtype"] = (common_env["libtypes"], False) - variants["arch"] = (common_env["archs"], True) + variants = variant_helper.variants # Return list of combos # [ {"var":"option", "var2":["op1","op2"], .. } var_combos = sca_variants.zipVariants(variants) - print "types: ", common_env["types"] - print "libtypes: ", common_env["libtypes"] - print "archs: ", common_env["archs"] + print "types: ", variants["type"] + print "libtypes: ", variants["libtype"] + print "archs: ", variants["arch"] # Apply any common package options # Update environment for boost options @@ -311,7 +270,7 @@ if combo["type"] != "optimized": name_parts.append(combo["type"]) pc_filename = "-".join(name_parts) + ".fpc" - cppdom_pc = baseEnv.ConfigBuilder(pj(inst_paths['pkgconfig'],pc_filename), + cppdom_pc = baseEnv.SubstBuilder(pj(inst_paths['pkgconfig'],pc_filename), 'cppdom.fpc.in', submap=submap) baseEnv.AddPostAction (cppdom_pc, Chmod('$TARGET', 0644)) baseEnv.Depends(cppdom_pc, 'cppdom/version.h') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2006-07-24 13:37:10
|
Revision: 535 Author: allenb Date: 2006-07-24 06:37:05 -0700 (Mon, 24 Jul 2006) ViewCVS: http://svn.sourceforge.net/xml-cppdom/?rev=535&view=rev Log Message: ----------- Use platform specific sconf and sconsign filenames to allow for building cross-platform out of same directory. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2006-07-24 00:39:18 UTC (rev 534) +++ trunk/SConstruct 2006-07-24 13:37:05 UTC (rev 535) @@ -51,7 +51,7 @@ EnsureSConsVersion(0,96) #SourceSignatures('MD5') #SourceSignatures('timestamp') -SConsignFile() +SConsignFile('.sconsign.'+GetPlatform()) # Figure out what version of CppDom we're using CPPDOM_VERSION = GetCppDomVersion() @@ -69,6 +69,8 @@ else: common_env = Environment(ENV = os.environ) SConsAddons.Builders.registerSubstBuilder(common_env) +common_env["CONFIGUREDIR"] = '.sconf_temp_'+platform +common_env["CONFIGURELOG"] = 'sconf.log_'+platform # Create variant helper and builder variant_helper = sca_variants.VariantsHelper() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2006-07-24 13:42:22
|
Revision: 536 Author: allenb Date: 2006-07-24 06:42:19 -0700 (Mon, 24 Jul 2006) ViewCVS: http://svn.sourceforge.net/xml-cppdom/?rev=536&view=rev Log Message: ----------- Use symlinkInstallFunc from sconsaddons. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2006-07-24 13:37:05 UTC (rev 535) +++ trunk/SConstruct 2006-07-24 13:42:19 UTC (rev 536) @@ -37,13 +37,6 @@ patch = re.compile('.*(#define *CPPDOM_VERSION_PATCH *(\d+)).*', re.DOTALL).sub(r'\2', contents) return (int(major), int(minor), int(patch)) -def symlinkInstallFunc(dest, source, env): - """Replacement function for install so it can install source - to destination by sym linking it. - """ - os.symlink(pj(os.getcwd(), source), dest) - return 0 - #------------------------------------------------------------------------------ # Main build setup @@ -136,7 +129,7 @@ # - Manually set the used prefix to the instlinks of the build dir if common_env['prefix'] == unspecified_prefix: if hasattr(os,'symlink'): - common_env['INSTALL'] = symlinkInstallFunc + common_env['INSTALL'] = SConsAddons.Util.symlinkInstallFunc common_env['prefix'] = pj( Dir('.').get_abspath(), buildDir, 'instlinks') # --- Setup installation paths --- # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2006-08-08 01:50:54
|
Revision: 553 Author: allenb Date: 2006-08-07 18:50:52 -0700 (Mon, 07 Aug 2006) ViewCVS: http://svn.sourceforge.net/xml-cppdom/?rev=553&view=rev Log Message: ----------- Remove the provides type for now from fpc file. This still needs to be fixed up but I don't know how to do it well when only debug or optimized is in path. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2006-08-08 01:50:13 UTC (rev 552) +++ trunk/SConstruct 2006-08-08 01:50:52 UTC (rev 553) @@ -187,8 +187,9 @@ # Build up the provides vars for the .fpc files inst_paths['pkgconfig'] = pj(inst_paths['lib'],'pkgconfig') provides = "cppdom" - if combo["type"] != "optimized": - provides += "_%s"%combo["type"] + # XXX: provides data + #if combo["type"] != "optimized": + # provides += "_%s"%combo["type"] arch = "noarch" if "ia32" == combo["arch"]: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2006-08-08 12:42:13
|
Revision: 555 Author: allenb Date: 2006-08-08 05:42:11 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/xml-cppdom/?rev=555&view=rev Log Message: ----------- Install cppdom-config. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2006-08-08 01:51:09 UTC (rev 554) +++ trunk/SConstruct 2006-08-08 12:42:11 UTC (rev 555) @@ -234,6 +234,7 @@ # env.Depends(cppdom_config, 'cppdom/version.h') + common_env.Install(inst_paths['bin'],'cppdom-config') common_env.Alias('install', inst_paths['base']) # Close up with aliases and defaults This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2006-09-20 16:41:00
|
Revision: 558 http://svn.sourceforge.net/xml-cppdom/?rev=558&view=rev Author: patrickh Date: 2006-09-20 09:40:55 -0700 (Wed, 20 Sep 2006) Log Message: ----------- Put the .fpc file in the flagpoll directory rather than the pkg-config directory. I am committing this on Dan's behalf because he is getting 403 forbidden errors for some reason. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2006-08-16 15:16:08 UTC (rev 557) +++ trunk/SConstruct 2006-09-20 16:40:55 UTC (rev 558) @@ -136,7 +136,7 @@ base_inst_paths = {} base_inst_paths['base'] = os.path.abspath(common_env['prefix']) base_inst_paths['lib'] = pj(base_inst_paths['base'], 'lib') - base_inst_paths['pkgconfig'] = pj(base_inst_paths['lib'], 'pkgconfig') + base_inst_paths['flagpoll'] = pj(base_inst_paths['lib'], 'flagpoll') base_inst_paths['bin'] = pj(base_inst_paths['base'], 'bin') if common_env['versioning'] == True: version_suffix = "-%s_%s_%s" % CPPDOM_VERSION @@ -185,7 +185,7 @@ SConscript(pj(d,'SConscript'), build_dir=pj(full_build_dir, d), duplicate=0) # Build up the provides vars for the .fpc files - inst_paths['pkgconfig'] = pj(inst_paths['lib'],'pkgconfig') + inst_paths['flagpoll'] = pj(inst_paths['lib'],'flagpoll') provides = "cppdom" # XXX: provides data #if combo["type"] != "optimized": @@ -220,7 +220,7 @@ if combo["type"] != "optimized": name_parts.append(combo["type"]) pc_filename = "-".join(name_parts) + ".fpc" - cppdom_pc = build_env.SubstBuilder(pj(inst_paths['pkgconfig'],pc_filename), + cppdom_pc = build_env.SubstBuilder(pj(inst_paths['flagpoll'],pc_filename), 'cppdom.fpc.in', submap=submap) build_env.AddPostAction (cppdom_pc, Chmod('$TARGET', 0644)) build_env.Depends(cppdom_pc, 'cppdom/version.h') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2006-11-07 22:34:25
|
Revision: 560 http://svn.sourceforge.net/xml-cppdom/?rev=560&view=rev Author: patrickh Date: 2006-11-07 14:34:22 -0800 (Tue, 07 Nov 2006) Log Message: ----------- Added a hack to make the MSVS_VERSION command line option work. SCons 0.96.93 is supposed to have some sort of fix to allow MSVS_VERSION to be set after the creation of the construction environment, but I cannot figure out how to make that work. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2006-11-07 22:09:58 UTC (rev 559) +++ trunk/SConstruct 2006-11-07 22:34:22 UTC (rev 560) @@ -58,7 +58,11 @@ option_filename = "config.cache." + platform if GetPlatform() == "win32": - common_env = Environment() + if ARGUMENTS.has_key("MSVS_VERSION"): + common_env = Environment(MSVS_VERSION = ARGUMENTS["MSVS_VERSION"]) + common_env['WINDOWS_INSERT_MANIFEST'] = True + else: + common_env = Environment() else: common_env = Environment(ENV = os.environ) SConsAddons.Builders.registerSubstBuilder(common_env) @@ -87,9 +91,9 @@ opts.Add('build_test', 'Build the test programs', 'yes') opts.Add(sca_opts.BoolOption('versioning', 'If no then build only libraries and headers without versioning', True)) -if common_env.has_key("MSVS"): - opts.Add('MSVS_VERSION', 'Set to specific version of MSVS to use. %s'%str(common_env['MSVS']['VERSIONS']), - common_env['MSVS']['VERSION']) +#if common_env.has_key("MSVS"): +# opts.Add('MSVS_VERSION', 'Set to specific version of MSVS to use. %s'%str(common_env['MSVS']['VERSIONS']), +# common_env['MSVS']['VERSION']) opts.Process(common_env) @@ -156,7 +160,7 @@ print "types: ", variant_helper.variants["type"] print "libtypes: ", variant_helper.variants["libtype"] print "archs: ", variant_helper.variants["arch"] - + sub_dirs = ['cppdom'] if common_env['build_test'] == 'yes': sub_dirs.append('test') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2007-06-11 16:00:30
|
Revision: 579 http://svn.sourceforge.net/xml-cppdom/?rev=579&view=rev Author: patrickh Date: 2007-06-11 09:00:32 -0700 (Mon, 11 Jun 2007) Log Message: ----------- Look to deps/scons-addons to get SConsAddons. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2007-06-11 16:00:10 UTC (rev 578) +++ trunk/SConstruct 2007-06-11 16:00:32 UTC (rev 579) @@ -6,10 +6,9 @@ pass import os, string, sys, re, glob, copy, types -#sys.path.insert(0,pj('tools','scons-addons','src')) -print "WARNING:" -print "WARNING: The build is currently in development. It needs the svn version of scons-addons" -print "WARNING:" +import os.path +sys.path.insert(0, os.path.join('deps', 'scons-addons', 'src')) +print "NOTE: The build is currently in development. It needs the SVN trunk version of scons-addons" import SCons.Environment import SCons This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2007-06-11 16:28:03
|
Revision: 586 http://svn.sourceforge.net/xml-cppdom/?rev=586&view=rev Author: patrickh Date: 2007-06-11 09:28:03 -0700 (Mon, 11 Jun 2007) Log Message: ----------- Ensure that the correct paths are used in the generated .fpc file. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2007-06-11 16:11:28 UTC (rev 585) +++ trunk/SConstruct 2007-06-11 16:28:03 UTC (rev 586) @@ -210,14 +210,14 @@ # Build up substitution map submap = { '@provides@' : provides, - '@prefix@' : base_inst_paths['base'], + '@prefix@' : inst_paths['base'], '@exec_prefix@' : '${prefix}', '@cppdom_cxxflags@' : '', - '@includedir@' : base_inst_paths['include'], + '@includedir@' : inst_paths['include'], '@cppdom_extra_cxxflags@' : '', '@cppdom_extra_include_dirs@' : '', '@cppdom_libs@' : "-l%s" % cppdom_shared_libname, - '@libdir@' : base_inst_paths['lib'], + '@libdir@' : inst_paths['lib'], '@arch@' : arch, '@version@' : cppdom_version_str } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2007-06-25 16:51:04
|
Revision: 590 http://svn.sourceforge.net/xml-cppdom/?rev=590&view=rev Author: patrickh Date: 2007-06-25 09:51:06 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Install the Flagpoll files (!) on Windows. There should not be multiple .fpc files being installed, but that can be dealt with later. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2007-06-25 16:35:32 UTC (rev 589) +++ trunk/SConstruct 2007-06-25 16:51:06 UTC (rev 590) @@ -223,15 +223,15 @@ } # Setup the builder for cppdom.fpc - if GetPlatform() != 'win32': - name_parts = ['cppdom',cppdom_version_str,arch] - if combo["type"] != "optimized": - name_parts.append(combo["type"]) - pc_filename = "-".join(name_parts) + ".fpc" - cppdom_pc = build_env.SubstBuilder(pj(inst_paths['flagpoll'],pc_filename), - 'cppdom.fpc.in', submap=submap) - build_env.AddPostAction (cppdom_pc, Chmod('$TARGET', 0644)) - build_env.Depends(cppdom_pc, 'cppdom/version.h') + name_parts = ['cppdom',cppdom_version_str,arch] + if combo["type"] != "optimized": + name_parts.append(combo["type"]) + pc_filename = "-".join(name_parts) + ".fpc" + cppdom_pc = build_env.SubstBuilder(pj(inst_paths['flagpoll'], + pc_filename), + 'cppdom.fpc.in', submap = submap) + build_env.AddPostAction(cppdom_pc, Chmod('$TARGET', 0644)) + build_env.Depends(cppdom_pc, 'cppdom/version.h') ## Setup the builder for cppdom-config #if GetPlatform() != 'win32': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2007-06-25 22:34:46
|
Revision: 594 http://svn.sourceforge.net/xml-cppdom/?rev=594&view=rev Author: patrickh Date: 2007-06-25 15:34:48 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Improve things a little bit with Flagpoll on Windows by setting up the use of automatic linking. There is still a problem where too many cppdom*.fpc files are generated, however. Instead of putting the variation among optimized/debug/hybrid and static/shared into one architecture-specific file, that information is spread out across many files. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2007-06-25 22:00:32 UTC (rev 593) +++ trunk/SConstruct 2007-06-25 22:34:48 UTC (rev 594) @@ -205,6 +205,19 @@ elif "x64" == combo["arch"]: arch = "x86_64" + cppdom_cxxflags = '' + cppdom_libs = "-l%s" % cppdom_shared_libname + + # Use automatic linking on Windows. + if GetPlatform() == 'win32': + cppdom_libs = '' + cppdom_cxxflags = '/DCPPDOM_AUTO_LINK' + + if "debug" in combo["type"] or "hybrid" in combo["type"]: + cppdom_cxxflags += ' /DCPPDOM_DEBUG' + if "shared" in combo["libtype"]: + cppdom_cxxflags += ' /DCPPDOM_DYN_LINK' + # - Define a builder for the cppdom.fpc file # ------------------ Build -config and .pc files ----------------- # # Build up substitution map @@ -212,20 +225,25 @@ '@provides@' : provides, '@prefix@' : inst_paths['base'], '@exec_prefix@' : '${prefix}', - '@cppdom_cxxflags@' : '', + '@cppdom_cxxflags@' : cppdom_cxxflags, '@includedir@' : inst_paths['include'], '@cppdom_extra_cxxflags@' : '', '@cppdom_extra_include_dirs@' : '', - '@cppdom_libs@' : "-l%s" % cppdom_shared_libname, + '@cppdom_libs@' : cppdom_libs, '@libdir@' : inst_paths['lib'], '@arch@' : arch, '@version@' : cppdom_version_str } # Setup the builder for cppdom.fpc + # XXX: This generates multiple cppdom*.fpc files instead of putting all + # the variation of debug/optimized/hybrid and static/shared into one + # architecture-specific file! name_parts = ['cppdom',cppdom_version_str,arch] if combo["type"] != "optimized": name_parts.append(combo["type"]) + if GetPlatform() == 'win32': + name_parts.append(combo["libtype"]) pc_filename = "-".join(name_parts) + ".fpc" cppdom_pc = build_env.SubstBuilder(pj(inst_paths['flagpoll'], pc_filename), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2007-06-25 22:37:32
|
Revision: 595 http://svn.sourceforge.net/xml-cppdom/?rev=595&view=rev Author: patrickh Date: 2007-06-25 15:37:34 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Removed unneeded code that has been commented out for a while now. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2007-06-25 22:34:48 UTC (rev 594) +++ trunk/SConstruct 2007-06-25 22:37:34 UTC (rev 595) @@ -250,19 +250,9 @@ 'cppdom.fpc.in', submap = submap) build_env.AddPostAction(cppdom_pc, Chmod('$TARGET', 0644)) build_env.Depends(cppdom_pc, 'cppdom/version.h') - - ## Setup the builder for cppdom-config - #if GetPlatform() != 'win32': - # env = common_env.Copy(BUILDERS = builders) - # cppdom_config = env.ConfigBuilder(pj(inst_paths['bin'],'cppdom-config'), - # 'cppdom-config.in', submap=submap ) - # env.AddPostAction (cppdom_config, Chmod('$TARGET', 0755)) - # env.Depends(cppdom_config, 'cppdom/version.h') - common_env.Install(inst_paths['bin'],'cppdom-config') common_env.Alias('install', inst_paths['base']) # Close up with aliases and defaults Default('.') - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2007-06-26 18:17:20
|
Revision: 605 http://svn.sourceforge.net/xml-cppdom/?rev=605&view=rev Author: patrickh Date: 2007-06-26 11:17:23 -0700 (Tue, 26 Jun 2007) Log Message: ----------- Print the Visual Studio version being used to help users verify that they will get the binaries that they expect. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2007-06-26 16:44:12 UTC (rev 604) +++ trunk/SConstruct 2007-06-26 18:17:23 UTC (rev 605) @@ -61,6 +61,7 @@ common_env = Environment(MSVS_VERSION = ARGUMENTS["MSVS_VERSION"]) else: common_env = Environment() + print "Using MSVS version", common_env["MSVS"]["VERSION"] else: common_env = Environment(ENV = os.environ) SConsAddons.Builders.registerSubstBuilder(common_env) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2007-06-28 22:04:49
|
Revision: 611 http://svn.sourceforge.net/xml-cppdom/?rev=611&view=rev Author: patrickh Date: 2007-06-28 15:04:45 -0700 (Thu, 28 Jun 2007) Log Message: ----------- Recognize more CPU architecures when naming the .fpc file. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2007-06-28 20:16:14 UTC (rev 610) +++ trunk/SConstruct 2007-06-28 22:04:45 UTC (rev 611) @@ -167,7 +167,7 @@ sub_dirs = ['cppdom'] if common_env['build_test'] == 'yes': sub_dirs.append('test') - + # ---- FOR EACH VARIANT ----- # for combo in variant_helper.iterate(locals(), base_bldr, common_env): #baseEnv = env_bldr.applyToEnvironment(common_env.Copy(), variant=combo,options=opts) @@ -212,6 +212,12 @@ arch = "i386" elif "x64" == combo["arch"]: arch = "x86_64" + elif "ppc" == combo["arch"]: + arch = "ppc" + elif "ppc" == combo["arch"]: + arch = "ppc64" + elif "universal" == combo["arch"]: + arch = "universal" cppdom_cxxflags = '' cppdom_libs = "-l%s" % cppdom_shared_libname This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2007-08-01 15:06:42
|
Revision: 622 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=622&view=rev Author: patrickh Date: 2007-08-01 08:06:44 -0700 (Wed, 01 Aug 2007) Log Message: ----------- Append the "64" suffix to the lib installatino path before tacking on the "debug" subdirectory. Installing to lib/debug64 doesn't make a lot of sense to me. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2007-08-01 15:03:55 UTC (rev 621) +++ trunk/SConstruct 2007-08-01 15:06:44 UTC (rev 622) @@ -175,12 +175,12 @@ inst_paths = copy.copy(base_inst_paths) inst_paths['libPrefix'] = pj(inst_paths['flagpollPrefix'], 'lib') + if "x64" == combo["arch"]: + inst_paths['lib'] = inst_paths['lib'] + '64' + inst_paths['libPrefix'] = inst_paths['libPrefix'] + '64' if "debug" == combo["type"]: inst_paths["lib"] = pj(inst_paths["lib"],"debug") inst_paths['libPrefix'] = pj(inst_paths['libPrefix'],'debug') - if "x64" == combo["arch"]: - inst_paths['lib'] = inst_paths['lib'] + '64' - inst_paths['libPrefix'] = inst_paths['libPrefix'] + '64' cppdom_shared_libname = 'cppdom' + shared_lib_suffix + version_suffix cppdom_static_libname = 'cppdom' + static_lib_suffix + version_suffix This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dsh...@us...> - 2007-08-31 12:56:17
|
Revision: 629 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=629&view=rev Author: dshipton Date: 2007-08-31 05:56:14 -0700 (Fri, 31 Aug 2007) Log Message: ----------- SConstruct clean-up. Updated to use the new scons-addons. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2007-08-04 11:06:52 UTC (rev 628) +++ trunk/SConstruct 2007-08-31 12:56:14 UTC (rev 629) @@ -25,18 +25,6 @@ Export('GetPlatform') pj = os.path.join -# ------ HELPER METHODS -------- # -def GetCppDomVersion(): - """Gets the CppDom version from cppdom/version.h. - Returns version as tuple (major,minor,patch) - """ - contents = open('cppdom/version.h', 'r').read() - major = re.compile('.*(#define *CPPDOM_VERSION_MAJOR *(\d+)).*', re.DOTALL).sub(r'\2', contents) - minor = re.compile('.*(#define *CPPDOM_VERSION_MINOR *(\d+)).*', re.DOTALL).sub(r'\2', contents) - patch = re.compile('.*(#define *CPPDOM_VERSION_PATCH *(\d+)).*', re.DOTALL).sub(r'\2', contents) - return (int(major), int(minor), int(patch)) - - #------------------------------------------------------------------------------ # Main build setup #------------------------------------------------------------------------------ @@ -46,12 +34,12 @@ SConsignFile('.sconsign.'+GetPlatform()) # Figure out what version of CppDom we're using -CPPDOM_VERSION = GetCppDomVersion() +CPPDOM_VERSION = sca_utils.getVersionFromHeader('CPPDOM', 'cppdom/version.h') cppdom_version_str = '%i.%i.%i' % CPPDOM_VERSION Export('CPPDOM_VERSION') print 'Building CppDom Version: %s' % cppdom_version_str -platform = SConsAddons.Util.GetPlatform() +platform = GetPlatform() unspecified_prefix = "use-instlinks" buildDir = "build." + platform option_filename = "config.cache." + platform This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dsh...@us...> - 2007-08-31 14:36:34
|
Revision: 630 http://xml-cppdom.svn.sourceforge.net/xml-cppdom/?rev=630&view=rev Author: dshipton Date: 2007-08-31 07:20:23 -0700 (Fri, 31 Aug 2007) Log Message: ----------- Use the right call to get the header info. Modified Paths: -------------- trunk/SConstruct Modified: trunk/SConstruct =================================================================== --- trunk/SConstruct 2007-08-31 12:56:14 UTC (rev 629) +++ trunk/SConstruct 2007-08-31 14:20:23 UTC (rev 630) @@ -34,7 +34,7 @@ SConsignFile('.sconsign.'+GetPlatform()) # Figure out what version of CppDom we're using -CPPDOM_VERSION = sca_utils.getVersionFromHeader('CPPDOM', 'cppdom/version.h') +CPPDOM_VERSION = SConsAddons.Util.GetVersionFromHeader('CPPDOM', 'cppdom/version.h') cppdom_version_str = '%i.%i.%i' % CPPDOM_VERSION Export('CPPDOM_VERSION') print 'Building CppDom Version: %s' % cppdom_version_str This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |