stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r349027 [1/4] - in /incubator/stdcxx/trunk: ./ etc/config/windows/
Date Fri, 25 Nov 2005 22:16:48 GMT
Author: sebor
Date: Fri Nov 25 14:16:34 2005
New Revision: 349027

URL: http://svn.apache.org/viewcvs?rev=349027&view=rev
Log:
2005-11-25  Anton Pevtsov  <antonp@moscow.vdiweb.com>
	    Martin Sebor  <sebor@roguewave.com>

	STDCXX-5
	* generate.bat: New Windows batch file to invoke the Windows build
	infrastructure. Invoke like so:
	> generate /BUILDDIR:<build-dir> /CONFIG:VC71
	* configure.wsf: New Windows Script Host (WSH) file implementing
	the Windows configuration infrastructure.
	* generate.wsf: New WSH file implementing the part of the Windows
	infrastructure responsible for generating Visual Studio projects
	and solution(s).
	* generate.js: New JScript file invoked from the WSH file above.
	* runexamples.wsf: New helper WSH file for the batch invocation
	of example programs.
	* runexe.wsf: New helper WSH file used by the above to invoke
	a single example or test program.
	* update.js: New JScript file to update an already generated
	Visual Studio solution and add new projects to it.
	* config.js: New helper JScript file.
	* msvc-config_classes.js: New MSVC-specific JScript helper file
	containing definitions of classes and their members.
	* data.js: New helper JScript file containing definitions of data.
	* msvc-config.js: New MSVC-specific JScript helper file.
	* utilities.js: New helper JScript file containing definitions
	of non-member functions.
	* summary.js: New helper JScript file to generate a summary build
	log in HTML format.
	* makelog.wsf: New helper WSH file invoked to generate a summary
	build log.
	* fun_present_check.cpp: New helper C++ source file used by 
	the configuration infrastructure to check for the presence
	of library functions in dependent libraries.

Added:
    incubator/stdcxx/trunk/etc/config/windows/
    incubator/stdcxx/trunk/etc/config/windows/config.js   (with props)
    incubator/stdcxx/trunk/etc/config/windows/configure.wsf   (with props)
    incubator/stdcxx/trunk/etc/config/windows/data.js   (with props)
    incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp   (with props)
    incubator/stdcxx/trunk/etc/config/windows/generate.js   (with props)
    incubator/stdcxx/trunk/etc/config/windows/generate.wsf   (with props)
    incubator/stdcxx/trunk/etc/config/windows/makelog.wsf   (with props)
    incubator/stdcxx/trunk/etc/config/windows/msvc-config.js   (with props)
    incubator/stdcxx/trunk/etc/config/windows/msvc-config_classes.js   (with props)
    incubator/stdcxx/trunk/etc/config/windows/runexamples.wsf   (with props)
    incubator/stdcxx/trunk/etc/config/windows/runexe.wsf   (with props)
    incubator/stdcxx/trunk/etc/config/windows/summary.js   (with props)
    incubator/stdcxx/trunk/etc/config/windows/update.wsf   (with props)
    incubator/stdcxx/trunk/etc/config/windows/utilities.js   (with props)
    incubator/stdcxx/trunk/generate.bat   (with props)

Added: incubator/stdcxx/trunk/etc/config/windows/config.js
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/config.js?rev=349027&view=auto
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/config.js (added)
+++ incubator/stdcxx/trunk/etc/config/windows/config.js Fri Nov 25 14:16:34 2005
@@ -0,0 +1,384 @@
+//
+// $Id$
+//
+// config.js - base classes for configurations support
+//
+//////////////////////////////////////////////////////////////////////
+
+//------------------------------------------------
+//
+// Common functions
+//
+//------------------------------------------------
+
+// creates a copy of an object
+function genericClone()
+{
+    return this.cloneTo(new Object(), true);
+}
+
+// copy all properties and optionally methods to a target object
+function genericCloneTo(target, cloneMethods)
+{
+    //WScript.Echo(this);
+    for (i in this)
+    {
+        var type = typeof(this[i]);
+        //WScript.Echo(i + " " + type);
+        switch (type)
+        {
+        case "object":
+            target[i] = this[i].clone();
+            break;
+        case "number":
+        case "boolean":
+        case "undefined":
+            target[i] = this[i];
+            break;
+        case "function":
+            if (cloneMethods)
+            {
+                target[i] = this[i];
+            }
+            break;
+        case "string":
+            target[i] = String(this[i]);
+            break;
+        default:
+            throw "Unknown property type.";
+        }
+    }
+    return target;
+}
+
+//------------------------------------------------
+// Associative Collection class
+//------------------------------------------------
+
+// Collection class .ctor
+function Collection() {}
+
+// Adds specified element to a collection of solutions
+function addElement(name, element)
+{
+    this[name] = element;
+}
+
+// Removes specified element from a collection of solutions
+function removeElement(name)
+{
+    delete this[name];
+}
+
+// Gets specified element from a collection of solutions
+function getElement(name)
+{
+    return this[name];
+}
+
+// Collection class methods
+Collection.prototype.cloneTo = genericCloneTo;
+Collection.prototype.clone = genericClone;
+Collection.prototype.add = addElement;
+Collection.prototype.func_remove = removeElement;
+Collection.prototype.get = getElement;
+
+//------------------------------------------------
+// Solution class
+//------------------------------------------------
+
+// Solution .ctor
+function Solution(name)
+{
+    this.name = String(name);
+    this.configurations = new Collection();
+    this.projects = new Collection();
+}
+
+// perform shallow cloning of a solution
+function solutionShallowClone()
+{
+    return new Solution(this.name); 
+}
+
+// Solution class methods
+Solution.prototype.cloneTo = genericCloneTo;
+Solution.prototype.clone = genericClone;
+Solution.prototype.shallowClone = solutionShallowClone;
+
+//------------------------------------------------
+// SolutionConfiguration class
+//------------------------------------------------
+
+// SolutionConfiguration .ctor
+function SolutionConfiguration(name)
+{
+    this.name = String(name);
+    this.projectConfigurations = new Collection();
+}
+
+// SolutionConfiguration class methods
+SolutionConfiguration.prototype.cloneTo = genericCloneTo;
+SolutionConfiguration.prototype.clone = genericClone;
+
+//------------------------------------------------
+// ProjectConfiguration class
+//------------------------------------------------
+
+// ProjectConfiguration .ctor
+function ProjectConfiguration(projectName, platform, configuration)
+{
+    this.projectName = String(projectName);
+    this.platform = String(platform);
+    this.configuration = String(configuration);
+}
+
+// ProjectConfiguration class methods
+ProjectConfiguration.prototype.cloneTo = genericCloneTo;
+ProjectConfiguration.prototype.clone = genericClone;
+
+//------------------------------------------------
+// Project class
+//------------------------------------------------
+
+// Project .ctor
+function Project(name)
+{
+    this.name = String(name);
+    this.dependencies = new Collection();
+    this.platforms = new Collection();
+    this.id = "";
+    this.sourceFiles = new Collection();
+    this.folder = "";
+}
+
+// creates a shallow copy of a project
+function projectShallowClone()
+{
+    var result = new Project(this.name);
+    result.id = this.id;
+    result.dependencies = this.dependencies.clone();
+    result.sourceFiles = this.sourceFiles.clone();
+    result.folder = this.folder;
+    return result;
+}
+
+// Project class methods
+Project.prototype.cloneTo = genericCloneTo;
+Project.prototype.clone = genericClone;
+Project.prototype.shallowClone = projectShallowClone;
+
+
+// Filter class
+function Filter(name)
+{
+    this.name = String(name);
+    this.sourceFiles = new Collection();
+    this.filter = "";
+    this.id = "";
+}
+
+Filter.prototype.cloneTo = genericCloneTo;
+Filter.prototype.clone = genericClone;
+
+//------------------------------------------------
+// Platform class
+//------------------------------------------------
+
+// Platform .ctor
+function Platform(name)
+{
+    this.name = String(name);
+    this.configurations = new Collection();
+}
+
+// creates a shallow copy of a platform
+function platformShallowClone()
+{
+    return new Platform(this.name);
+}
+
+// Platform class methods
+Platform.prototype.cloneTo = genericCloneTo;
+Platform.prototype.clone = genericClone;
+Platform.prototype.shallowClone = platformShallowClone;
+
+//------------------------------------------------
+// Configuration class
+//------------------------------------------------
+
+// possible configuration types are EXE, LIB and DLL
+var configTypeExe = "EXE";
+var configTypeDll = "DLL";
+var configTypeLib = "LIB";
+
+
+// Configuration .ctor
+function Configuration(name, type, outputDir, intermDir)
+{
+    this.name = String(name);
+    this.type = type;   
+    this.tools = new Collection();
+    
+    if (! outputDir || outputDir == "")
+        this.outputDir = String(name);
+    else
+        this.outputDir = String(outputDir);
+        
+    if (! intermDir || intermDir == "")
+        this.intermDir = String(name);
+    else
+        this.intermDir = String(intermDir);
+}
+
+// creates a shallow copy of Configuration
+function configurationShallowClone()
+{
+    return new Configuration(this.name, this.type, 
+        this.outputDir, this.intermDir);
+}
+
+// Configuration class methods
+Configuration.prototype.cloneTo = genericCloneTo;
+Configuration.prototype.clone = genericClone;
+Configuration.prototype.shallowClone = configurationShallowClone;
+
+//------------------------------------------------
+// Tool class
+//------------------------------------------------
+
+// Tool .ctor
+function Tool(name)
+{
+    this.name = String(name);
+    this.inputFiles =  new Collection();
+    this.outputDirectory = "";
+    this.intermDirectory = "";
+    this.outputFile = "";
+}
+
+// getCommandLine could not be implemented here
+
+// Tool class methods
+Tool.prototype.cloneTo = genericCloneTo;
+Tool.prototype.clone = genericClone;
+
+// Tools names
+var compilerToolName = "compiler";
+var linkerToolName = "linker";
+var librarianToolName = "librarian";
+var customBuildToolName = "custom";
+var postBuildToolName = "postbuild";
+
+//------------------------------------------------
+// Compiler class
+//------------------------------------------------
+
+// Compiler .ctor
+function Compiler()
+{
+    this.base = Tool;
+    this.base(compilerToolName);
+    this.isDebug = false;
+    this.defines = new Collection();
+    this.includeDirectories = new Collection();
+}
+
+// getPreprocessCommandLine could not be implemented here
+
+// Compiler class methods
+Compiler.prototype.cloneTo = genericCloneTo;
+Compiler.prototype.clone = genericClone;
+
+//------------------------------------------------
+// Linker class
+//------------------------------------------------
+
+// Linker .ctor
+function Linker()
+{
+    this.base = Tool;
+    this.base(linkerToolName);
+    this.libraries = new Collection();
+}
+
+// Linker class methods
+Linker.prototype.cloneTo = genericCloneTo;
+Linker.prototype.clone = genericClone;
+
+//------------------------------------------------
+// Librarian class
+//------------------------------------------------
+
+// Librarian .ctor
+function Librarian()
+{
+    this.base = Tool;
+    this.base(librarianToolName);
+    this.libraries = new Collection();
+}
+
+// Librarian class methods
+Librarian.prototype.cloneTo = genericCloneTo;
+Librarian.prototype.clone = genericClone;
+
+//------------------------------------------------
+// CustomBuild class
+//------------------------------------------------
+
+//CustomBuild .ctor
+function CustomBuild()
+{
+    this.base = Tool;
+    this.base(customBuildToolName);
+    this.command = "";
+    this.output = "";
+    this.dependencies = new Collection();
+}
+
+//CustomBuild class methods
+CustomBuild.prototype.cloneTo = genericCloneTo;
+CustomBuild.prototype.clone = genericClone;
+
+
+//------------------------------------------------
+// PostBuild class
+//------------------------------------------------
+
+//PostBuild .ctor
+function PostBuild()
+{
+    this.base = Tool;
+    this.base(postBuildToolName);
+    this.commands = new Collection();
+}
+
+//PostBuild class methods
+PostBuild.prototype.cloneTo = genericCloneTo;
+PostBuild.prototype.clone = genericClone;
+
+
+//------------------------------------------------
+// ItemBuildInfo class
+//------------------------------------------------
+
+// ItemBuildInfo .ctor
+function ItemBuildInfo(name)
+{
+    this.name = String(name);
+    this.buildCmdLog = "";
+    this.buildOutLog = "";
+    this.errorsCnt = "0";
+    this.warningsCnt = "0";
+    this.linkerErrors = false;
+    
+    this.runOutput = "";
+    this.runReqOutput = "";
+    this.runDiff = "";
+    this.exitCode = 0;
+}
+
+// ItemBuildInfo class methods
+ItemBuildInfo.prototype.cloneTo = genericCloneTo;
+ItemBuildInfo.prototype.clone = genericClone;
+

Propchange: incubator/stdcxx/trunk/etc/config/windows/config.js
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/etc/config/windows/configure.wsf
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/configure.wsf?rev=349027&view=auto
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/configure.wsf (added)
+++ incubator/stdcxx/trunk/etc/config/windows/configure.wsf Fri Nov 25 14:16:34 2005
@@ -0,0 +1,976 @@
+<?xml version="1.0" ?><!-- -*- SGML -*- -->
+<package>
+    <comment>
+    PrimalCode wizard generated file.
+    </comment>
+    <job id="configure" prompt="no">
+        <?job error="false" debug="false" ?>
+        <runtime>
+            <description>
+Run configuration tests and produces config.h file.
+            </description>
+            <named helpstring="Name of the solution" name="SolutionName" 
+                required="true" type="string"/>
+            <named helpstring="Name of the configuration" 
+                name="ConfigurationName" required="true" type="string"/>
+            <named helpstring="Output directory" name="OutDir" 
+                required="false" type="string"/>
+            <named helpstring="Output file" name="OutFile" 
+                required="false" type="string"/>
+            <named helpstring="Test sources directory" name="SrcDir" 
+                required="false" type="string"/>
+            <named helpstring="Log file name" name="LogFile" 
+                required="false" type="string"/>
+            <example>cscript configure.wsf /SolutionName:VC71 
+                /ConfigurationName:"Release Static"
+            </example>
+            <usage>
+Usage: cscript configure.wsf /SolutionName:@Solution 
+/ConfigurationName:@Configuration [/OutDir:@OutDir] [/OutFile:@OutFile] 
+[/SrcDir:@SrcDir] [/LogFile:@LogFile],
+where
+@Solution is VC71,
+@Configuration = 11s Debug Static | 11d Debug Dll , etc
+@OutDir - output directory (default: script_directory\tests),
+@OutFile - output file name (default: config.h),
+@SrcDir - test sources directory (default: script_directory\..\src),
+@LogFile - log file name (default: config.log).
+            </usage>
+        </runtime>
+        <object id="fso" progid="Scripting.FileSystemObject"/>
+        <object id="WshShell" progid="WScript.Shell"/>
+        <script language="JScript" src="config.js"/>
+        <script language="JScript" src="msvc-config_classes.js"/>
+        <script language="JScript" src="data.js"/>
+        <script language="JScript" src="msvc-config.js"/>
+        <script language="JScript" src="utilities.js"/>
+        <script id="configure" language="JScript">
+<![CDATA[
+//
+// Configuration script for Stdcxx library
+//
+
+// constants
+var scriptDir = getParentFolder(WScript.ScriptFullName);
+var slnDir = getParentFolder(getParentFolder(getParentFolder(scriptDir)));
+var stageDir = scriptDir + "\\tests";
+var configTargerDir = slnDir +  "\\include";
+var configFileName = "config.h";
+var configFile = configTargerDir + "\\" + configFileName;
+var stageFile = stageDir + "\\" + configFileName;
+var srcDir = slnDir + "\\etc\\config\\src";
+var includeDir = slnDir + "\\include";
+var logFileName = "config.log";
+var runWindowMode = 7;
+var timeOut = 30000; // 30 sec
+
+var isShared = true;
+
+var description = new configure; // run
+
+function configure()
+{
+    if (!WScript.Arguments.Named.Exists("SolutionName")
+        || !WScript.Arguments.Named.Exists("ConfigurationName"))
+    {
+        WScript.StdErr.WriteLine(
+            "Configure: Fatal error: Missing required argument.");
+        WScript.Arguments.ShowUsage();
+        WScript.Quit(2);
+    }
+
+    if (WScript.Arguments.Named.Exists("LogFile"))
+    {
+        logFileName = WScript.Arguments.Named("LogFile");
+    }
+    // check that log file is writable
+    if (!touchFile(logFileName))
+    {
+        WScript.StdErr.WriteLine(
+            "Configure: Fatal error: Unable to create log file "
+            + logFileName);
+        WScript.Quit(2);
+    }
+    
+    try
+    {
+        // configure activeCompiler, activeLinker and activeLibrarian options
+        setCompileEnvironment(WScript.Arguments.Named("SolutionName")                           
+                            , WScript.Arguments.Named("ConfigurationName")
+                            , projectConfigureName, logFileName);
+    }
+    catch (e)
+    {
+        WScript.StdErr.WriteLine(
+            "Configure: Fatal error: \
+                Invalid SolutionName or ConfigurationName.");
+        WScript.Quit(2);
+    }
+
+    if  (WScript.Arguments.Named.Exists("SrcDir"))
+    {
+        srcDir = WScript.Arguments.Named("SrcDir");
+        if (!fso.FolderExists(srcDir))
+        {
+            WScript.StdErr.WriteLine(
+                "Configure: Fatal error: Unable to read sources folder "
+                + srcDir);
+            WScript.Quit(2);
+        }
+        
+    }
+        
+    if  (WScript.Arguments.Named.Exists("IncludeDir"))
+    {
+        includeDir = WScript.Arguments.Named("IncludeDir");
+        if (!fso.FolderExists(includeDir))
+        {
+            WScript.StdErr.WriteLine(
+                "Configure: Fatal error: Unable to read includes folder "
+                + includeDir);
+            WScript.Quit(2);
+        }
+    }
+    
+
+    if  (WScript.Arguments.Named.Exists("OutFile"))
+    {
+        configFile = WScript.Arguments.Named("OutFile");
+    }
+    
+    // check that config file is writable
+    if (!touchFile(configFile))
+    {
+        WScript.StdErr.WriteLine(
+            "Configure: Fatal error: Unable to create output file "
+            + configFile);
+        WScript.Quit(2);
+    }
+    
+    if (WScript.Arguments.Named.Exists("OutDir"))
+    {
+        stageDir = WScript.Arguments.Named("OutDir") + "\\tests";
+        stageFile = stageDir + "\\" + configFileName;
+    }
+    
+    // clean Tests folder
+    if (fso.FolderExists(stageDir))
+    {
+        try
+        {
+            fso.DeleteFolder(stageDir, true);
+        }
+        catch (e)
+        {
+            WScript.StdErr.WriteLine(
+                "Configure: Fatal error: Unable to delete folder "
+                + stageDir);
+            WScript.Quit(3);
+        }
+    }
+    
+    try
+    {
+        fso.CreateFolder(stageDir);
+    }
+    catch (e)
+    {
+        WScript.StdErr.WriteLine(
+            "Configure: Fatal error: Unable to create stage folder "
+             + stageDir);
+        WScript.Quit(2);
+    }
+
+    removeFile(logFileName);
+    removeFile(stageFile);
+    removeFile(configFile + ".bak");
+    
+    // save previous file
+    if (fso.FileExists(configFile))
+    {
+        fso.MoveFile(configFile, configFile + ".bak");
+    }
+
+    var msg =  "for " + WScript.Arguments.Named("SolutionName")
+                + " - " + WScript.Arguments.Named("ConfigurationName");
+    WScript.Echo("Configuring " + msg);
+    
+    appendLineToOutFile("// Configured " + msg);
+    
+    activeCompiler.includeDirectories.add(stageDir);
+    activeCompiler.includeDirectories.add(slnDir + "\\include");
+    activeCompiler.includeDirectories.add(includeDir);
+        
+    activeCompiler.outputDirectory = stageDir;
+    activeLinker.outputDirectory = stageDir;
+    activeCompiler.intermDirectory = stageDir;
+    activeLinker.intermDirectory = stageDir;
+    if (activeLibrarian)
+    {
+        activeLibrarian.outputDirectory = stageDir;
+        activeLibrarian.intermDirectory = stageDir;
+        isShared = false;
+    }
+    else
+    {
+        activeCompiler.defines.add("_RWSHARED");
+        activeCompiler.defines.add("_RWBUILD_std");
+    }
+    
+    // sanity check
+    checkSanity();
+        
+    // check architecture
+    checkArchitecture();
+        
+    // headers and functions check
+    checkHeaders();
+
+    // compile .lib.cpp s
+    compileLibs();
+    
+    // compile, link and run .cpp's (if possible)
+    runExeTests();
+    
+    fso.MoveFile(stageFile , configFile);
+    WScript.Quit(0);
+}
+
+// performs compiler and linker sanity checks
+function checkSanity()
+{
+    var objName = stageDir + "\\sanity.obj";
+    removeFile(objName);
+    var srcName = stageDir + "\\sanity.cpp";
+    writeTextFile(srcName, "int main () { return 0; }\r\n");
+    WScript.StdOut.Write("Checking if compiler is sane... ");
+    var ret = compileFiles(srcName);
+    if (ret == 0)
+    {
+        WScript.StdOut.WriteLine("  ok");
+    }
+    else
+    {
+        WScript.StdErr.WriteLine(
+            "Configure: Fatal error: Compiler failed sanity check");
+        WScript.Quit(1);
+    }
+    
+    var exeName = "sanity.exe";
+    var exeFullName = stageDir + "\\" + exeName;
+    removeFile(exeFullName);
+    WScript.StdOut.Write("Checking if linker is sane... "); 
+    ret = linkFiles(objName, exeName);
+    if (ret == 0)
+    {
+        WScript.StdOut.WriteLine("  ok");
+    }
+    else
+    {
+        WScript.StdErr.WriteLine(
+            "Configure: Fatal error: Linker failed sanity check");
+        WScript.Quit(1);
+    }
+    
+    WScript.StdOut.Write("Checking if run environment is sane... ");
+    ret = WshShell.Run(exeFullName, runWindowMode, true);
+    if (ret == 0)
+    {
+        WScript.StdOut.WriteLine("  ok");
+    }
+    else
+    {
+        WScript.StdErr.WriteLine(
+            "Configure: Fatal error: \
+                Runtime environment failed sanity check");
+        WScript.Quit(1);
+    }
+}
+
+// removes file if it exists
+function removeFile(fileName)
+{
+    if (fso.FileExists(fileName))
+    {
+        fso.DeleteFile(fileName, true);
+    }
+}
+
+// writes text into a file
+function writeTextFile(fileName, fileContent)
+{
+    var stream = fso.CreateTextFile(fileName, true, false);
+    stream.Write(fileContent);
+    stream.Close();
+}
+
+// perform architecture check
+function checkArchitecture()
+{
+    //TODO: This test seems to be useless
+    WScript.StdOut.Write("Checking system architecture");
+    var types = new Array("int", "long", "long long", "void*");
+    var srcFile = stageDir + "\\arch.cpp";
+    var objFile = stageDir + "\\arch.obj";
+    var exeFile = "arch.exe";
+    var exeFullName = stageDir + "\\" + exeFile;
+    var sizes = "";
+    for (i in types)
+    {
+        var ret2;
+        removeFile(exeFullName);
+        removeFile(objFile);
+        removeFile(srcFile);
+        writeTextFile(srcFile
+            , "int main () { return sizeof (" + types[i] + "); }\r\n");
+        var ret = compileFiles(srcFile);
+        if (ret == 0)
+        {
+            ret = linkFiles(objFile, exeFile);
+            if (ret == 0)
+            {
+                ret2 = WshShell.Run(exeFullName, runWindowMode, true);
+            }
+        }
+        if (ret == 0)
+        {
+            sizes += new String(ret2);
+        }
+        else
+        {
+            sizes += "-";
+        }
+    }
+    var rxLP32 = /24?4/;
+    var rxILP32 = /44?4/;
+    var rxILP64 = /88?8/;
+    var rxLLP64 = /4488/;
+    var rxLP64 = /48?8/;
+    var arch;
+    if (rxLP32.test(sizes))
+    {
+        arch = "LP32";
+    }
+    else if (rxILP32.test(sizes))
+    {
+        arch = "ILP32";
+    }
+    else if (rxILP64.test(sizes))
+    {
+        arch = "ILP64";
+    }
+    else if (rxLLP64.test(sizes))
+    {
+        arch = "LLP64";
+    }
+    else if (rxLP64.test(sizes))
+    {
+        arch = "LP64";
+    }
+    else
+    {
+        arch = sizes;
+    }
+    // there is no known big endian architectures on Windows
+    WScript.StdOut.WriteLine("\t" + arch + " little endian");
+}
+
+// perform headers presence check
+function checkHeaders()
+{
+    var hdrs = "assert ctype errno float iso646 limits locale math setjmp";
+    hdrs += " signal stdarg stddef stdio stdlib string time wchar wctype";
+    hdrs += " new typeinfo";
+    hdrs += " ieeefp.h pthread.h";  
+    var headers = hdrs.split(" ");
+
+    WScript.StdOut.WriteLine("Checking for headers... ");
+
+    var noNewHeaders = false;
+    for (i in headers)
+    {
+        var h = headers[i];
+        var hdr_base = basename(h, "\\.h");
+        var hdr = h;
+        
+        if (hdr_base == h) // if header does not have .h
+        {
+            // check for C++ C library headers first
+            if (h != "new" && h != "typeinfo")
+            {
+                hdr = "c" + h;
+            }           
+            WScript.StdOut.Write("Checking for <" + hdr + ">... ");
+            var defstring = "_RWSTD_NO_" + hdr.toUpperCase();
+            if (checkHeader(hdr) == 0)
+            {
+                WScript.StdOut.WriteLine("  ok");
+                appendLineToOutFile("// #define " + defstring);
+            }
+            else
+            {
+                WScript.StdOut.WriteLine("\tno (" + defstring +")");
+                appendLineToOutFile("#define " + defstring);
+            // <ciso646> is a bogus header, ignore if missing
+            if (hdr != "ciso646")
+            {
+                noNewHeaders = true;
+            }
+        }
+    }
+    // check for (deprecated C++) C library headers
+    // or for any headers specified with the .h suffix
+    hdr = hdr_base + ".h";
+        WScript.StdOut.Write("Checking for <" + hdr + ">... ");
+    var sym = hdr_base.toUpperCase();
+    var defstring = "_RWSTD_NO_" + sym + "_H";
+    if (checkHeader(hdr) == 0)
+    {
+        var text = readTextFile(stageDir + "\\hdrcheck.i");
+        var rxInternalHdrName = 
+            new RegExp("^[^\"]* (\".*[/\\\\]" + hdr_base + "\\.h\")", "im");
+        var matches = rxInternalHdrName.exec(text);
+
+        // handle headers implemented internally by some compilers
+        // (such as <stdarg.h> with the vanilla EDG eccp)           
+        var path = hdr;
+        if (matches != null)
+        {
+            path = matches[1];
+        }
+        WScript.StdOut.WriteLine("  ok (" + path + ")");
+        if (hdr_base == h)
+        {
+            appendLineToOutFile("#define _RWSTD_ANSI_C_" + 
+                sym + "_H " + path);                
+        }
+        //TODO: it looks like original script has a problem with 
+        // dependencies here however it looks like it simply drops 
+        // unresolved dependencies
+        // else
+        // {
+        appendLineToOutFile("// #define " + defstring + 
+            " /* " + path + " */");
+        // }
+    }
+    else
+    {
+        WScript.StdOut.WriteLine("\tno (" + defstring +")");
+        appendLineToOutFile("#define " + defstring);
+    }
+}
+
+    // determine the support for namespaces
+    WScript.StdOut.Write("Checking for namespaces");
+    var noNamespaces = false;
+    var ret = compileFiles(srcDir + "\\NAMESPACE.CPP");
+    if (ret == 0)
+    {
+        WScript.StdOut.WriteLine("  ok");
+        appendLineToOutFile("// #define _RWSTD_NO_NAMESPACE");
+    }
+    else
+    {
+        WScript.StdOut.WriteLine("\tno (_RWSTD_NO_NAMESPACE)");
+        appendLineToOutFile("#define _RWSTD_NO_NAMESPACE");
+        noNamespaces = true;
+    }
+    
+    // determine wheteher each function is declared/defined
+    // create a test source file template into which each iteration below
+    // substitutes the header name, function name, and function arguments
+    var srcFile = scriptDir + "\\fun_present_check.cpp";
+    var objFile = stageDir + "\\fun_present_check.obj";
+    var exeFile = "fun_present_check.exe";
+    var exeFullName = stageDir + "\\" + exeFile;
+    
+    var funs;
+    var lib;
+    for (i in headers)
+    {
+        var hdr_base = headers[i];
+        switch (hdr_base)
+        {
+        case "math":
+            var c90_funs = "acos(0.0) asin(0.0) atan(0.0) atan2(0.0,0.0)";
+            c90_funs += " ceil(0.0) cos(0.0) cosh(0.0) exp(0.0) fabs(0.0)";
+            c90_funs += 
+                " floor(0.0) fmod(0.0,0.0) frexp(0.0,0) ldexp(0.0,0)";
+            c90_funs += " log(0.0) log10(0.0) modf(0.0,0) pow(0.0,0.0)";
+            c90_funs += " sin(0.0) sinh(0.0) sqrt(0.0) tan(0.0) tanh(0.0)";
+            c90_funs += " acosf asinf atanf atan2f ceilf cosf coshf expf";
+            c90_funs += " fabsf floorf fmodf frexpf ldexpf logf log10f";
+            c90_funs += " modff powf sinf sinhf sqrtf tanf tanhf acosl";
+            c90_funs += " asinl atanl atan2l ceill cosl coshl expl fabsl";
+            c90_funs += " floorl fmodl frexpl ldexpl logl log10l modfl";
+            c90_funs += " powl sinl sinhl sqrtl tanl tanhl";
+            c90_funs = c90_funs.split(" ");
+            
+            // ignore C99 functions for now
+            // var c99_funs = 
+            //  "cbrtf copysignf erfcf erff expm1f exp2f fdimf";
+            // c99_funs += " fmaf fmaxf fminf hypotf ilogbf lgammaf logbf";
+            // c99_funs += 
+            //  " log1pf log2f llrintf lrintf lroundf llroundf nanf";
+            // c99_funs += " nearbyintf nextafterf nexttowardf remainderf";
+            // c99_funs += " remquof rintf roundf scalbnf scalblnf tgammaf";
+            // c99_funs += " cbrt copysign erf erfc expm1 exp2 fdim fma";
+            // c99_funs += " fmax fmin hypot ilogb lgamma logb log1p log2";
+            // c99_funs += 
+            //  " llrint lrint lround llround nan nearbyint nextafter";
+            // c99_funs += " nexttoward remainder remquo rint round scalbn";
+            // c99_funs += 
+            //  " scalbln tgamma cbrtl copysignl erfcl erfl expm1l";
+            // c99_funs += 
+            //  " exp2l fdiml fmal fmaxl fminl hypotl ilogbl lgammal";
+            // c99_funs += 
+            //  " logbl log1pl log2l llrintl lrintl lroundl llroundl nanl";
+            // c99_funs += " nearbyintl nextafterl nexttowardl remainderl";
+            // c99_funs += " remquol rintl roundl scalbnl scalblnl tgammal";
+            // c99_funs = c99_funs.split(" ");
+            
+            funs = c90_funs;
+            // that seems to be useless on Windows since there is no libm
+            lib = "m";
+            break;
+        case "stdio":           
+            var c90_funs = 
+                "clearerr fclose feof ferror fflush fgetc fgetpos";
+            c90_funs += " fgets fopen fprintf fputc fputs fread freopen";
+            c90_funs += " fscanf fseek fsetpos ftell fwrite getc getchar";
+            c90_funs += " gets perror printf putc putchar puts remove";
+            c90_funs += " rename rewind scanf setbuf setvbuf sprintf";
+            c90_funs += " sscanf tmpfile tmpnam ungetc vfprintf vprintf";
+            c90_funs += " vsprintf";
+            c90_funs =c90_funs.split(" ");
+            
+            var c99_funs = "snprintf vsnprintf".split(" ");
+            var posix_funs = "fileno".split(" ");
+            funs = c90_funs.concat(c99_funs, posix_funs);
+            lib = "c";
+            break;
+        case "stdlib":
+            var c90_funs = 
+                "abort abs atexit atof atoi atol atoll bsearch calloc";
+            c90_funs += " div exit free getenv labs ldiv llabs lldiv malloc";
+            c90_funs += " mblen mbstowcs mbtowc qsort rand realloc srand";
+            c90_funs += " strtod strtol strtoul system wcstombs wctomb";
+            c90_funs = c90_funs.split(" ");
+            
+            var c99_funs = "strtof strtold strtoll strtoull".split(" ");
+            var posix_funs = "mkstemp".split(" ");
+            funs = c90_funs.concat(c99_funs, posix_funs);
+            lib = "c";
+            break;
+            case "string":
+            funs = 
+                "memchr((char*)0,0,0) memcmp memcpy memmove memset strcat";
+            funs += 
+         " strchr((char*)0,0) strcmp strcoll strcpy strcspn strerror strlen";
+            funs += " strncat strncmp strncpy strpbrk((char*)0,(char*)0)";
+            funs += " strrchr((char*)0,0) strspn strstr((char*)0,(char*)0)";
+            funs += " strtok strxfrm";
+            funs = funs.split(" ");
+            lib = "c";
+            break;
+            case "wchar":
+            funs = 
+                "btowc fgetwc fgetws fputwc fputws fwide fwprintf fwscanf";
+            funs += " getwc getwchar mbrlen mbrtowc mbsinit mbsrtowcs putwc";
+            funs += " putwchar swprintf swscanf ungetwc vfwprintf vswprintf";
+            funs += " vwprintf vwscanf wcrtomb wcscat wcschr((wchar_t*)0,0)";
+            funs += " wcscmp wcscoll wcscpy wcscspn wcsftime wcslen wcsncat";
+            funs += " wcsncmp wcsncpy wcspbrk((wchar_t*)0,(wchar_t*)0)";
+            funs += " wcsrchr((wchar_t*)0,0) wcsrtombs wcsspn";
+            funs += 
+             " wcsstr((wchar_t*)0,(wchar_t*)0) wcstod wcstod wcstof wcstok";
+            funs += 
+                " wcstol wcstold wcstoll wcstombs wcstoul wcstoull wcsxfrm";
+            funs += " wctob wctomb wmemchr((wchar_t*)0,0,0) wmemcmp wmemcpy";
+            funs += " wmemmove wmemset wprintf wscanf";
+            funs = funs.split(" ");         
+            lib = "c";
+            break;
+            case "wctype":
+            // 7.15 of ISO/IEC 9899:1990/Amendment 1:1995
+            funs += "iswalpha iswalnum iswcntrl iswdigit iswgraph iswlower";
+            funs += " iswprint iswpunct iswspace iswupper iswxdigit wctype";
+            funs += " iswctype towlower towupper wctrans towctrans";
+            funs = funs.split(" ");
+            lib = "c";
+        default:
+            continue;
+        }
+        
+        var useCHeader = false;
+        for (j in funs)
+        {
+            var fun = funs[j];
+            // determine whether the tested function is followed by
+            // a function argument list; if so, call it, otherwise
+            // take its address         
+            var take_addr = 1;
+            var funname = fun;
+            var paramsIndx = fun.indexOf("(");
+            if (paramsIndx != -1)
+            {
+                take_addr = 0;
+                funname = fun.substr(0, paramsIndx);
+            }
+
+            // starting with acosf(), look in <math.h> rather than <cmath>
+            if (fun == "acosf")
+            {
+                useCHeader = true;
+            }
+
+            var std = "";
+        
+            // determine which form of the header to #include
+            var hdrname = hdr_base + ".h";
+            if (!useCHeader && !noNewHeaders)
+            {
+                hdrname = "c" + hdr_base;
+                if (!noNamespaces)
+                {
+                    std = "std::";
+                }
+            }
+
+            removeFile(exeFullName);
+            removeFile(objFile);        
+            WScript.StdOut.Write("Checking for " + std + funname + "() in "
+                                     + hdrname + "... ");
+            var sym = "_RWSTD_NO_" + funname.toUpperCase();
+            var defines = new Array("CHECK_DECL", "HDRNAME=<" + hdrname + ">"
+                                , "FUNNAME=" + funname
+                                , "FUN=" + fun, "TAKE_ADDR=" + take_addr);
+            if (noNamespaces)
+            {
+                defines.push("NONAMESPACE");
+            }
+            var ret = compileFiles(srcFile, defines);
+            if (ret == 0)
+            {
+                ret = linkFiles(objFile, exeFile);
+            }
+            if (ret == 0)
+            {
+                WScript.StdOut.WriteLine("  ok");
+                appendLineToOutFile("// #define " + sym);
+            }
+            else
+            {
+                // if a symbol isn't declared in the header,
+                // see if it maybe exists in the library
+                WScript.StdOut.WriteLine("\tno");
+                appendLineToOutFile("#define " + sym);
+                // that is quite strange because there is no LIBM on Windows?
+                sym = sym + "_IN_LIB" + lib.toUpperCase();
+
+                removeFile(exeFullName);
+                removeFile(objFile);
+                WScript.StdOut.Write("Checking for extern \"C\" "
+                                        + funname + "() in libc... ");
+                ret = compileFiles(srcFile, "FUNNAME=" + funname);
+                if (ret == 0)
+                {
+                    ret = linkFiles(objFile, exeFile);
+                }
+                if (ret == 0)
+                {
+                    WScript.StdOut.WriteLine("  ok");
+                    appendLineToOutFile("// #define " + sym);
+                }
+                else
+                {
+                    WScript.StdOut.WriteLine("  no");
+                    appendLineToOutFile("#define " + sym);
+                }
+            }
+        }
+    }
+    //TODO: there are also some <cmath> related stuff in 
+    //the libc_decl.sh but it is unreachable.
+}
+
+// removes extension from fileName if it is present
+function basename(fileName, extension)
+{
+    var rx = new RegExp(extension + "$", "i");
+    return fileName.replace(rx, "");
+}
+
+// check for presense of the header
+function checkHeader(header)
+{   
+    var srcFile = stageDir + "\\hdrcheck.cpp";
+    var preprocFile = stageDir + "\\hdrcheck.i";
+    removeFile(preprocFile);
+    removeFile(srcFile);
+    writeTextFile(srcFile, "#include <" + header + ">\r\n");
+    return preprocessFile(srcFile, preprocFile);
+}
+
+// appends text line to the stage file (config.h.tmp)
+function appendLineToOutFile(line)
+{
+    var stream = fso.OpenTextFile(stageFile, 8, true, 0);
+    stream.WriteLine(line);
+    stream.Close();
+}
+
+// reads text file into a string
+function readTextFile(fileName)
+{
+    var stream = fso.OpenTextFile(fileName, 1, false, 0);
+    var text = stream.ReadAll();
+    stream.Close();
+    return text;
+}
+
+//compiles all libraries (.lib.cpp files)
+function compileLibs()
+{
+    var folder = fso.GetFolder(srcDir);
+    var fc = new Enumerator(folder.Files);
+    for (; !fc.atEnd(); fc.moveNext())
+    {
+        var file = fc.item();
+        if (!(/\.lib\.cpp$/i).test(file.Name))
+        {
+             continue; //not a library file
+        }
+        var outLibName = file.Name.replace(/\.cpp/i, 
+            isShared ? ".dll" : ".lib");
+        if (makeLibrary(srcDir + "\\" + file.Name, stageDir
+                        , outLibName, isShared) != 0)
+        {
+            WScript.StdErr.WriteLine(
+                "Configure: Fatal error: Failed to build library " 
+                    + outLibName);
+            WScript.Quit(1);
+        }
+    }
+}
+
+// gets description from text if present
+function getDescription(text)
+{
+    // description shall be the first line in format "// description"
+    var idx = text.indexOf("\r");
+    if (idx == -1)
+    {
+        idx = text.indexOf("\n");
+        if (idx == -1)
+        {
+            idx = text.length;
+        }
+    }
+    var firstLine = text.substr(0, idx);
+    var results = /\/\/\s*(.*)/.exec(firstLine);
+    if (results == null)
+    {
+        return "";
+    }
+    return results[1];
+}
+
+// compiles, links and runs (if possible) all .cpp (except .lib.cpp files)
+function runExeTests()
+{
+    // first determine all files to be processed
+    var folder = fso.GetFolder(srcDir);
+    var fc = new Enumerator(folder.Files);
+    var srcs = new Array();
+    for (; !fc.atEnd(); fc.moveNext())
+    {
+        var file = fc.item();
+        if (!/(?!.*\.lib\.cpp)\.cpp$/.test(file.Name))
+        {
+             continue; // not an "exe" cpp file
+        }
+        srcs.push(file.Name); // save file name for processing
+    }
+
+    // WScript.StdOut.WriteLine("Running tests " + srcs.join(" "));
+    
+    // first dependency of a file on _RWSTD_ variables will be checked
+    // if undefined variable will be found file will be postponed 
+    // for the next iteration
+    // iterations will continue until there will be no postponed files
+    // or circular dependency will be found (on some step all files
+    // will be postponed)
+    var configText = readTextFile(stageFile); // cache config contents
+    do
+    {
+        var postponed = new Array();
+        for (i in srcs)
+        {
+            var test = srcs[i];
+            var srcFile = srcDir + "\\" + test;
+            var srcText = readTextFile(srcFile);
+            if (!checkDependencies(srcText, configText))
+            {
+                // undefined dependencies found. test shall be postponed
+                postponed.push(test);
+                continue;
+            }
+            var descText = getDescription(srcText);
+            if (descText && descText != "")
+                WScript.StdOut.Write(descText + "... ");
+                
+            var symbol = "#define _RWSTD_";
+            var outSymbol = "_RWSTD_";
+            var base = basename(test, "\\.cpp");
+            var negate = !(/^NO_/.test(base));
+            if (negate)
+            {
+                symbol += "NO_";
+                outSymbol += "NO_";
+            }
+            symbol += base;
+            outSymbol += base;
+            
+            var textResult = ""; // text output of a test
+            // compile file
+            var result = compileFiles(srcFile);
+            if (result == 0 && /\s*main\s*\(/.test(srcText))            
+            {
+                // main function present. file is runnable
+                // get library and object dependencies
+                var fileBase = stageDir + "\\" + base;
+                var modules =  fileBase + ".obj";
+                var ldopts = 
+                    (/^[^A-Z_a-z0-9]*LDOPTS\s*=\s*(.*)$/m).exec(srcText);
+                if (ldopts != null)
+                {
+                    // remove first "./" and replace $(LIBSUFFIX) with .lib
+                    modules += " " + ldopts[1].replace(/^\.\//, 
+                        activeCompiler.outputDirectory + 
+                        "\\").replace(/\$\(LIBSUFFIX\)/, ".lib");
+                }
+                var exeFile = base + ".exe";
+                var fullExeName = fileBase + ".exe";
+                result = linkFiles(modules, exeFile);
+                if (result == 0) // can execute
+                {
+                    var exec = WshShell.Exec(fullExeName);
+                    var time = 0;
+                    while (exec.Status == 0)
+                    {
+                        WScript.Sleep(100); // wait for completion
+                        time += 100;
+                        if (time > timeOut)
+                        {
+                            WScript.StdErr.WriteLine(
+                                "Configure: Fatal error: Test " + test
+                                 + " failed to complete in " + timeOut / 1000
+                                 + " seconds");
+                            WScript.Quit(3);
+                        }
+                    }
+                    result = exec.ExitCode;
+                    textResult = exec.StdOut.ReadAll();
+                }
+            }
+            // append symbol result
+            // !((result == 0 && !negate) || (result != 0 && negate))
+            if (!((result == 0) ^ negate))
+            {
+                symbol = "// " + symbol;
+            }
+            appendLineToOutFile(symbol);
+            if (descText && descText != "")
+                WScript.StdOut.WriteLine("  ok " + outSymbol);
+                
+            // append text results if present
+            if (textResult.length != 0)
+            {
+                appendLineToOutFile(textResult);
+            }
+            // update cache since config file is changed
+            configText = readTextFile(stageFile);
+        }
+
+        if (postponed.length == srcs.length) // circular dependency
+        {
+            WScript.StdErr.Write(
+                "Configure: Fatal error: Circular dependencies found");
+            WScript.StdErr.WriteLine(" in the following tests:");
+            WScript.StdErr.WriteLine(postponed.join(" "));
+            for (i in postponed)
+            {
+                var test = postponed[i];
+                WScript.StdErr.Write("File: " + test + "\t");
+                var srcFile = srcDir + "\\" + test;
+                var srcText = readTextFile(srcFile);
+                checkDependencies(srcText, configText, true);               
+            }
+            WScript.Quit(1);
+        }
+        srcs = postponed;
+    }
+    while (srcs.length != 0);
+}
+
+// located dependencies (symbols _RWSTD_XXX and _RWSTD_NO_XXX) in a text
+// and checks that they are already defined (present in the config file text)
+function checkDependencies(srcText, configText, dumpUnresolved)
+{
+    var deps = srcText.match(/^\s*#\s*ifn?def\s+_RWSTD_(?!USE_CONFIG)\S+/gm);
+    if (deps == null) // no dependencies
+    {
+        return true;
+    }       
+
+    for (i = 0; i < deps.length; ++i)
+    {
+        var dep = /_RWSTD_(?:NO_)?(\S+)/.exec(deps[i])[1];
+        // remove _IN_LIBC | _IN_LIBM from dependency string
+        dep = dep.replace(/_IN_LIB[CM]/, "");
+        if ((/\.lib$/i).test(dep)) // skip libraries
+        {
+            continue;
+        }
+        var rx = new RegExp("_RWSTD_NO_" + dep);
+        if (!rx.test(configText))
+        {
+            if (dumpUnresolved)
+            {
+                WScript.StdErr.WriteLine("unresolved dependency: " + dep);
+            }
+            return false;
+        }
+    }
+    return true;
+}
+
+// check that file is writable
+function touchFile(fileName)
+{   
+    try
+    {
+        if (fso.FileExists(fileName))
+        {
+            var stream = fso.OpenTextFile(fileName, 8,  false, 0);
+            stream.Close();
+        }
+        else
+        {
+            var stream = fso.CreateTextFile(fileName, false, false);
+            stream.Close();
+            fso.DeleteFile(fileName);
+        }
+    }
+    catch (e)
+    {
+        return false;
+    }
+    return true;
+}
+]]>
+        </script>
+    </job>
+</package>
+

Propchange: incubator/stdcxx/trunk/etc/config/windows/configure.wsf
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/etc/config/windows/data.js
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/data.js?rev=349027&view=auto
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/data.js (added)
+++ incubator/stdcxx/trunk/etc/config/windows/data.js Fri Nov 25 14:16:34 2005
@@ -0,0 +1,831 @@
+//
+// $Id$
+//
+// file should be included after base_config_classes
+
+// base configuration settings
+
+//------------------------------------------------
+// global object storing all configurations
+//------------------------------------------------
+var configurations = new Collection();
+
+// configuration names
+var confDebugStaticName = "11s Debug Static";
+var confReleaseStaticName = "8s Optimized Static";
+var confMTDebugStaticName = "15s Debug Thread-safe Static";
+var confMTReleaseStaticName = "12s Optimized Thread-safe Static";
+var confDebugDllName = "11d Debug Dll";
+var confReleaseDllName = "8d Optimized Dll";
+var confMTDebugDllName = "15d Debug Thread-safe Dll";
+var confMTReleaseDllName = "12d Optimized Thread-safe Dll";
+
+// configuration output directories
+var confDebugStaticOut = "11s";
+var confReleaseStaticOut = "8s";
+var confMTDebugStaticOut = "15s";
+var confMTReleaseStaticOut = "12s";
+var confDebugDllOut = "11d";
+var confReleaseDllOut = "8d";
+var confMTDebugDllOut = "15d";
+var confMTReleaseDllOut = "12d";
+
+// map between short and long configuration names
+var configsShortToLong = new Collection();
+configsShortToLong.add(confDebugStaticOut, confDebugStaticName);
+configsShortToLong.add(confReleaseStaticOut, confReleaseStaticName);
+configsShortToLong.add(confMTDebugStaticOut, confMTDebugStaticName);
+configsShortToLong.add(confMTReleaseStaticOut, confMTReleaseStaticName);
+configsShortToLong.add(confDebugDllOut, confDebugDllName);
+configsShortToLong.add(confReleaseDllOut, confReleaseDllName);
+configsShortToLong.add(confMTDebugDllOut, confMTDebugDllName);
+configsShortToLong.add(confMTReleaseDllOut, confMTReleaseDllName);
+
+// platform names
+var platformWin32Name = "Win32";
+
+// projects configurations
+
+///////////////////////////////////////////////////////////////////
+// Configure project
+var projectConfigureName = ".configure";
+
+var projectConfConfigureDebugStatic =
+    new ProjectConfiguration(projectConfigureName, platformWin32Name
+                            , confDebugStaticName);
+                            
+var projectConfConfigureReleaseStatic =
+    new ProjectConfiguration(projectConfigureName, platformWin32Name
+                            , confReleaseStaticName);
+                            
+var projectConfConfigureMTDebugStatic =
+    new ProjectConfiguration(projectConfigureName, platformWin32Name
+                            , confMTDebugStaticName);
+                            
+var projectConfConfigureMTReleaseStatic =
+    new ProjectConfiguration(projectConfigureName, platformWin32Name
+                            , confMTReleaseStaticName);
+                            
+var projectConfConfigureDebugDll =
+    new ProjectConfiguration(projectConfigureName, platformWin32Name
+                            , confDebugDllName);
+
+var projectConfConfigureReleaseDll =
+    new ProjectConfiguration(projectConfigureName, platformWin32Name
+                            , confReleaseDllName);
+                            
+var projectConfConfigureMTDebugDll =
+    new ProjectConfiguration(projectConfigureName, platformWin32Name
+                            , confMTDebugDllName);
+
+var projectConfConfigureMTReleaseDll =
+    new ProjectConfiguration(projectConfigureName, platformWin32Name
+                            , confMTReleaseDllName);
+                            
+///////////////////////////////////////////////////////////////////
+// Examples template project
+var projectExamplesName = "Examples";
+
+var projectConfExamplesDebugStatic =
+    new ProjectConfiguration(projectExamplesName, platformWin32Name
+                            , confDebugStaticName);
+                            
+var projectConfExamplesReleaseStatic =
+    new ProjectConfiguration(projectExamplesName, platformWin32Name
+                            , confReleaseStaticName);
+                            
+var projectConfExamplesMTDebugStatic =
+    new ProjectConfiguration(projectExamplesName, platformWin32Name
+                            , confMTDebugStaticName);
+                            
+var projectConfExamplesMTReleaseStatic =
+    new ProjectConfiguration(projectExamplesName, platformWin32Name
+                            , confMTReleaseStaticName);
+                            
+var projectConfExamplesDebugDll =
+    new ProjectConfiguration(projectExamplesName, platformWin32Name
+                            , confDebugDllName);
+
+var projectConfExamplesReleaseDll =
+    new ProjectConfiguration(projectExamplesName, platformWin32Name
+                            , confReleaseDllName);
+                            
+var projectConfExamplesMTDebugDll =
+    new ProjectConfiguration(projectExamplesName, platformWin32Name
+                            , confMTDebugDllName);
+
+var projectConfExamplesMTReleaseDll =
+    new ProjectConfiguration(projectExamplesName, platformWin32Name
+                            , confMTReleaseDllName);
+                            
+                            
+///////////////////////////////////////////////////////////////////
+// Tests template project
+var projectTestsName = "Tests";
+
+var projectConfTestsDebugStatic =
+    new ProjectConfiguration(projectTestsName, platformWin32Name
+                            , confDebugStaticName);
+                            
+var projectConfTestsReleaseStatic =
+    new ProjectConfiguration(projectTestsName, platformWin32Name
+                            , confReleaseStaticName);
+                            
+var projectConfTestsMTDebugStatic =
+    new ProjectConfiguration(projectTestsName, platformWin32Name
+                            , confMTDebugStaticName);
+                            
+var projectConfTestsMTReleaseStatic =
+    new ProjectConfiguration(projectTestsName, platformWin32Name
+                            , confMTReleaseStaticName);
+                            
+var projectConfTestsDebugDll =
+    new ProjectConfiguration(projectTestsName, platformWin32Name
+                            , confDebugDllName);
+
+var projectConfTestsReleaseDll =
+    new ProjectConfiguration(projectTestsName, platformWin32Name
+                            , confReleaseDllName);
+                            
+var projectConfTestsMTDebugDll =
+    new ProjectConfiguration(projectTestsName, platformWin32Name
+                            , confMTDebugDllName);
+
+var projectConfTestsMTReleaseDll =
+    new ProjectConfiguration(projectTestsName, platformWin32Name
+                            , confMTReleaseDllName);
+                            
+///////////////////////////////////////////////////////////////////
+// rwtest project
+var projectRwTestName = ".rwtest";
+
+var projectConfRwTestDebugStatic =
+    new ProjectConfiguration(projectRwTestName, platformWin32Name
+                            , confDebugStaticName);
+                            
+var projectConfRwTestReleaseStatic =
+    new ProjectConfiguration(projectRwTestName, platformWin32Name
+                            , confReleaseStaticName);
+                            
+var projectConfRwTestMTDebugStatic =
+    new ProjectConfiguration(projectRwTestName, platformWin32Name
+                            , confMTDebugStaticName);
+                            
+var projectConfRwTestMTReleaseStatic =
+    new ProjectConfiguration(projectRwTestName, platformWin32Name
+                            , confMTReleaseStaticName);
+                            
+var projectConfRwTestDebugDll =
+    new ProjectConfiguration(projectRwTestName, platformWin32Name
+                            , confDebugDllName);
+
+var projectConfRwTestReleaseDll =
+    new ProjectConfiguration(projectRwTestName, platformWin32Name
+                            , confReleaseDllName);
+                            
+var projectConfRwTestMTDebugDll =
+    new ProjectConfiguration(projectRwTestName, platformWin32Name
+                            , confMTDebugDllName);
+
+var projectConfRwTestMTReleaseDll =
+    new ProjectConfiguration(projectRwTestName, platformWin32Name
+                            , confMTReleaseDllName);
+                            
+
+///////////////////////////////////////////////////////////////////
+// run_examples project
+var projectRunExamplesName = ".stdlib_examples";
+
+var projectConfRunExamplesDebugStatic =
+    new ProjectConfiguration(projectRunExamplesName, platformWin32Name
+                            , confDebugStaticName);
+                            
+var projectConfRunExamplesReleaseStatic =
+    new ProjectConfiguration(projectRunExamplesName, platformWin32Name
+                            , confReleaseStaticName);
+                            
+var projectConfRunExamplesMTDebugStatic =
+    new ProjectConfiguration(projectRunExamplesName, platformWin32Name
+                            , confMTDebugStaticName);
+                            
+var projectConfRunExamplesMTReleaseStatic =
+    new ProjectConfiguration(projectRunExamplesName, platformWin32Name
+                            , confMTReleaseStaticName);
+                            
+var projectConfRunExamplesDebugDll =
+    new ProjectConfiguration(projectRunExamplesName, platformWin32Name
+                            , confDebugDllName);
+
+var projectConfRunExamplesReleaseDll =
+    new ProjectConfiguration(projectRunExamplesName, platformWin32Name
+                            , confReleaseDllName);
+                            
+var projectConfRunExamplesMTDebugDll =
+    new ProjectConfiguration(projectRunExamplesName, platformWin32Name
+                            , confMTDebugDllName);
+
+var projectConfRunExamplesMTReleaseDll =
+    new ProjectConfiguration(projectRunExamplesName, platformWin32Name
+                            , confMTReleaseDllName);
+                            
+///////////////////////////////////////////////////////////////////
+// run_tests project
+var projectRunTestsName = ".stdlib_tests";
+
+var projectConfRunTestsDebugStatic =
+    new ProjectConfiguration(projectRunTestsName, platformWin32Name
+                            , confDebugStaticName);
+                            
+var projectConfRunTestsReleaseStatic =
+    new ProjectConfiguration(projectRunTestsName, platformWin32Name
+                            , confReleaseStaticName);
+                            
+var projectConfRunTestsMTDebugStatic =
+    new ProjectConfiguration(projectRunTestsName, platformWin32Name
+                            , confMTDebugStaticName);
+                            
+var projectConfRunTestsMTReleaseStatic =
+    new ProjectConfiguration(projectRunTestsName, platformWin32Name
+                            , confMTReleaseStaticName);
+                            
+var projectConfRunTestsDebugDll =
+    new ProjectConfiguration(projectRunTestsName, platformWin32Name
+                            , confDebugDllName);
+
+var projectConfRunTestsReleaseDll =
+    new ProjectConfiguration(projectRunTestsName, platformWin32Name
+                            , confReleaseDllName);
+                            
+var projectConfRunTestsMTDebugDll =
+    new ProjectConfiguration(projectRunTestsName, platformWin32Name
+                            , confMTDebugDllName);
+
+var projectConfRunTestsMTReleaseDll =
+    new ProjectConfiguration(projectRunTestsName, platformWin32Name
+                            , confMTReleaseDllName);
+                            
+////////////////////////////////////////////////////////////////////////
+// solution configurations
+
+// debug static configuration
+var solutionConfDebugStatic = 
+    new SolutionConfiguration(confDebugStaticName);
+
+solutionConfDebugStatic.projectConfigurations.add(
+    projectConfConfigureDebugStatic.projectName, 
+    projectConfConfigureDebugStatic);
+    
+solutionConfDebugStatic.projectConfigurations.add(
+    projectConfExamplesDebugStatic.projectName, 
+    projectConfExamplesDebugStatic);
+    
+solutionConfDebugStatic.projectConfigurations.add(
+    projectConfRwTestDebugStatic.projectName, 
+    projectConfRwTestDebugStatic);
+    
+solutionConfDebugStatic.projectConfigurations.add(
+    projectConfTestsDebugStatic.projectName, 
+    projectConfTestsDebugStatic);
+    
+solutionConfDebugStatic.projectConfigurations.add(
+    projectConfRunExamplesDebugStatic.projectName, 
+    projectConfRunExamplesDebugStatic);
+    
+solutionConfDebugStatic.projectConfigurations.add(
+    projectConfRunTestsDebugStatic.projectName, 
+    projectConfRunTestsDebugStatic);
+    
+    
+// release static configuration
+var solutionConfReleaseStatic = 
+    new SolutionConfiguration(confReleaseStaticName);
+
+solutionConfReleaseStatic.projectConfigurations.add(
+    projectConfConfigureReleaseStatic.projectName, 
+    projectConfConfigureReleaseStatic);
+    
+solutionConfReleaseStatic.projectConfigurations.add(
+    projectConfExamplesReleaseStatic.projectName, 
+    projectConfExamplesReleaseStatic);
+    
+solutionConfReleaseStatic.projectConfigurations.add(
+    projectConfRwTestReleaseStatic.projectName, 
+    projectConfRwTestReleaseStatic);
+    
+solutionConfReleaseStatic.projectConfigurations.add(
+    projectConfTestsReleaseStatic.projectName, 
+    projectConfTestsReleaseStatic);
+    
+solutionConfReleaseStatic.projectConfigurations.add(
+    projectConfRunExamplesReleaseStatic.projectName, 
+    projectConfRunExamplesReleaseStatic);
+    
+solutionConfReleaseStatic.projectConfigurations.add(
+    projectConfRunTestsReleaseStatic.projectName, 
+    projectConfRunTestsReleaseStatic);
+    
+// debug multi-threaded static configuration
+var solutionConfMTDebugStatic = 
+    new SolutionConfiguration(confMTDebugStaticName);
+
+solutionConfMTDebugStatic.projectConfigurations.add(
+    projectConfConfigureMTDebugStatic.projectName, 
+    projectConfConfigureMTDebugStatic);
+    
+solutionConfMTDebugStatic.projectConfigurations.add(
+    projectConfExamplesMTDebugStatic.projectName, 
+    projectConfExamplesMTDebugStatic);
+    
+solutionConfMTDebugStatic.projectConfigurations.add(
+    projectConfRwTestMTDebugStatic.projectName, 
+    projectConfRwTestMTDebugStatic);
+    
+solutionConfMTDebugStatic.projectConfigurations.add(
+    projectConfTestsMTDebugStatic.projectName, 
+    projectConfTestsMTDebugStatic);
+    
+solutionConfMTDebugStatic.projectConfigurations.add(
+    projectConfRunExamplesMTDebugStatic.projectName, 
+    projectConfRunExamplesMTDebugStatic);
+    
+solutionConfMTDebugStatic.projectConfigurations.add(
+    projectConfRunTestsMTDebugStatic.projectName, 
+    projectConfRunTestsMTDebugStatic);
+    
+// release multi-threaded static configuration
+var solutionConfMTReleaseStatic = 
+    new SolutionConfiguration(confMTReleaseStaticName);
+
+solutionConfMTReleaseStatic.projectConfigurations.add(
+    projectConfConfigureMTReleaseStatic.projectName, 
+    projectConfConfigureMTReleaseStatic);
+    
+solutionConfMTReleaseStatic.projectConfigurations.add(
+    projectConfExamplesMTReleaseStatic.projectName, 
+    projectConfExamplesMTReleaseStatic);
+    
+solutionConfMTReleaseStatic.projectConfigurations.add(
+    projectConfRwTestMTReleaseStatic.projectName, 
+    projectConfRwTestMTReleaseStatic);
+    
+solutionConfMTReleaseStatic.projectConfigurations.add(
+    projectConfTestsMTReleaseStatic.projectName, 
+    projectConfTestsMTReleaseStatic);
+    
+solutionConfMTReleaseStatic.projectConfigurations.add(
+    projectConfRunExamplesMTReleaseStatic.projectName, 
+    projectConfRunExamplesMTReleaseStatic);
+    
+solutionConfMTReleaseStatic.projectConfigurations.add(
+    projectConfRunTestsMTReleaseStatic.projectName, 
+    projectConfRunTestsMTReleaseStatic);
+    
+// debug dll configuration
+var solutionConfDebugDll = 
+    new SolutionConfiguration(confDebugDllName);
+    
+solutionConfDebugDll.projectConfigurations.add(
+    projectConfConfigureDebugDll.projectName, 
+    projectConfConfigureDebugDll);
+    
+solutionConfDebugDll.projectConfigurations.add(
+    projectConfExamplesDebugDll.projectName, 
+    projectConfExamplesDebugDll);
+    
+solutionConfDebugDll.projectConfigurations.add(
+    projectConfRwTestDebugDll.projectName, 
+    projectConfRwTestDebugDll);
+    
+solutionConfDebugDll.projectConfigurations.add(
+    projectConfTestsDebugDll.projectName, 
+    projectConfTestsDebugDll);
+    
+solutionConfDebugDll.projectConfigurations.add(
+    projectConfRunExamplesDebugDll.projectName, 
+    projectConfRunExamplesDebugDll);
+    
+solutionConfDebugDll.projectConfigurations.add(
+    projectConfRunTestsDebugDll.projectName, 
+    projectConfRunTestsDebugDll);
+    
+// release dll configuration
+var solutionConfReleaseDll = 
+    new SolutionConfiguration(confReleaseDllName);
+    
+solutionConfReleaseDll.projectConfigurations.add(
+    projectConfConfigureReleaseDll.projectName, 
+    projectConfConfigureReleaseDll);
+    
+solutionConfReleaseDll.projectConfigurations.add(
+    projectConfExamplesReleaseDll.projectName, 
+    projectConfExamplesReleaseDll);
+    
+solutionConfReleaseDll.projectConfigurations.add(
+    projectConfRwTestReleaseDll.projectName, 
+    projectConfRwTestReleaseDll);
+    
+solutionConfReleaseDll.projectConfigurations.add(
+    projectConfTestsReleaseDll.projectName, 
+    projectConfTestsReleaseDll);
+    
+solutionConfReleaseDll.projectConfigurations.add(
+    projectConfRunExamplesReleaseDll.projectName, 
+    projectConfRunExamplesReleaseDll);
+    
+solutionConfReleaseDll.projectConfigurations.add(
+    projectConfRunTestsReleaseDll.projectName, 
+    projectConfRunTestsReleaseDll);
+    
+    
+// debug multi-threaded dll configuration
+var solutionConfMTDebugDll = 
+    new SolutionConfiguration(confMTDebugDllName);
+    
+solutionConfMTDebugDll.projectConfigurations.add(
+    projectConfConfigureMTDebugDll.projectName, 
+    projectConfConfigureMTDebugDll);
+    
+solutionConfMTDebugDll.projectConfigurations.add(
+    projectConfExamplesMTDebugDll.projectName, 
+    projectConfExamplesMTDebugDll);
+    
+solutionConfMTDebugDll.projectConfigurations.add(
+    projectConfRwTestMTDebugDll.projectName, 
+    projectConfRwTestMTDebugDll);
+    
+solutionConfMTDebugDll.projectConfigurations.add(
+    projectConfTestsMTDebugDll.projectName, 
+    projectConfTestsMTDebugDll);
+    
+solutionConfMTDebugDll.projectConfigurations.add(
+    projectConfRunExamplesMTDebugDll.projectName, 
+    projectConfRunExamplesMTDebugDll);
+    
+solutionConfMTDebugDll.projectConfigurations.add(
+    projectConfRunTestsMTDebugDll.projectName, 
+    projectConfRunTestsMTDebugDll);
+    
+// release multi-threaded dll configuration
+var solutionConfMTReleaseDll = 
+    new SolutionConfiguration(confMTReleaseDllName);
+    
+solutionConfMTReleaseDll.projectConfigurations.add(
+    projectConfConfigureMTReleaseDll.projectName, 
+    projectConfConfigureMTReleaseDll);
+    
+solutionConfMTReleaseDll.projectConfigurations.add(
+    projectConfExamplesMTReleaseDll.projectName, 
+    projectConfExamplesMTReleaseDll);
+    
+solutionConfMTReleaseDll.projectConfigurations.add(
+    projectConfRwTestMTReleaseDll.projectName, 
+    projectConfRwTestMTReleaseDll);
+    
+solutionConfMTReleaseDll.projectConfigurations.add(
+    projectConfTestsMTReleaseDll.projectName, 
+    projectConfTestsMTReleaseDll);
+    
+solutionConfMTReleaseDll.projectConfigurations.add(
+    projectConfRunExamplesMTReleaseDll.projectName, 
+    projectConfRunExamplesMTReleaseDll);
+    
+solutionConfMTReleaseDll.projectConfigurations.add(
+    projectConfRunTestsMTReleaseDll.projectName, 
+    projectConfRunTestsMTReleaseDll);
+    
+//////////////////////////////////////////////////////////////////
+// base solution
+var solution = new Solution("Solution");
+
+solution.configurations.add(
+        solutionConfDebugStatic.name, solutionConfDebugStatic);
+        
+solution.configurations.add(
+        solutionConfReleaseStatic.name, solutionConfReleaseStatic);
+        
+solution.configurations.add(
+        solutionConfMTDebugStatic.name, solutionConfMTDebugStatic);
+        
+solution.configurations.add(
+        solutionConfMTReleaseStatic.name, solutionConfMTReleaseStatic);
+                            
+solution.configurations.add(
+        solutionConfDebugDll.name, solutionConfDebugDll);
+        
+solution.configurations.add(
+        solutionConfReleaseDll.name, solutionConfReleaseDll);
+        
+solution.configurations.add(
+        solutionConfMTDebugDll.name, solutionConfMTDebugDll);
+        
+solution.configurations.add(
+        solutionConfMTReleaseDll.name, solutionConfMTReleaseDll);
+        
+/////////////////////////////////////////////////////////////////
+// projects
+var projectConfigure = new Project(projectConfigureName);
+solution.projects.add(projectConfigure.name, projectConfigure);
+
+var projectExamples = new Project(projectExamplesName);
+solution.projects.add(projectExamples.name, projectExamples);
+
+var projectRwTest = new Project(projectRwTestName);
+projectRwTest.dependencies.add(projectConfigure.name, projectConfigure);
+solution.projects.add(projectRwTest.name, projectRwTest);
+
+var projectTests = new Project(projectTestsName);
+projectTests.dependencies.add(projectRwTestName, projectRwTest);
+solution.projects.add(projectTests.name, projectTests);
+
+var projectRunExamples = new Project(projectRunExamplesName);
+solution.projects.add(projectRunExamples.name, projectRunExamples);
+
+var projectRunTests = new Project(projectRunTestsName);
+solution.projects.add(projectRunTests.name, projectRunTests);
+
+/////////////////////////////////////////////////////////////////
+// platforms
+var platformWin32 = new Platform(platformWin32Name);
+
+var platformWin32Conf = platformWin32.clone();
+var platformWin32Ex = platformWin32.clone();
+var platformWin32Tst = platformWin32.clone();
+var platformWin32Rw = platformWin32.clone();
+
+//////////////////////////////////////////////////////////////////
+// platform configurations
+
+// for configure
+projectConfigure.platforms.add(platformWin32Conf.name, platformWin32Conf);
+
+var confConfDebugStatic = 
+    new Configuration(
+        confDebugStaticName, configTypeLib, 
+        confDebugStaticOut, confDebugStaticOut);
+platformWin32Conf.configurations.add(
+    confConfDebugStatic.name, confConfDebugStatic);
+
+var confConfReleaseStatic = 
+    new Configuration(
+        confReleaseStaticName, configTypeLib,
+        confReleaseStaticOut, confReleaseStaticOut);
+platformWin32Conf.configurations.add(
+    confConfReleaseStatic.name, confConfReleaseStatic);
+
+var confConfMTDebugStatic = 
+    new Configuration(
+        confMTDebugStaticName, configTypeLib,
+        confMTDebugStaticOut, confMTDebugStaticOut);
+platformWin32Conf.configurations.add(
+    confConfMTDebugStatic.name, confConfMTDebugStatic);
+
+var confConfMTReleaseStatic = 
+    new Configuration(
+        confMTReleaseStaticName, configTypeLib,
+        confMTReleaseStaticOut, confMTReleaseStaticOut);
+platformWin32Conf.configurations.add(
+    confConfMTReleaseStatic.name, confConfMTReleaseStatic);
+
+var confConfDebugDll = 
+    new Configuration(
+        confDebugDllName, configTypeDll,
+        confDebugDllOut, confDebugDllOut);
+platformWin32Conf.configurations.add(
+    confConfDebugDll.name, confConfDebugDll);
+
+var confConfReleaseDll = 
+    new Configuration(
+        confReleaseDllName, configTypeDll,
+        confReleaseDllOut, confReleaseDllOut);
+platformWin32Conf.configurations.add(
+    confConfReleaseDll.name, confConfReleaseDll);
+    
+var confConfMTDebugDll = 
+    new Configuration(
+        confMTDebugDllName, configTypeDll,
+        confMTDebugDllOut, confMTDebugDllOut);
+platformWin32Conf.configurations.add(
+    confConfMTDebugDll.name, confConfMTDebugDll);
+
+var confConfMTReleaseDll = 
+    new Configuration(
+        confMTReleaseDllName, configTypeDll,
+        confMTReleaseDllOut, confMTReleaseDllOut);
+platformWin32Conf.configurations.add(
+    confConfMTReleaseDll.name, confConfMTReleaseDll);
+
+
+// for examples
+projectExamples.platforms.add(platformWin32Ex.name, platformWin32Ex);
+
+var confExDebugStatic = 
+    new Configuration(
+        confDebugStaticName, configTypeExe,
+        confDebugStaticOut, confDebugStaticOut);
+platformWin32Ex.configurations.add(
+    confExDebugStatic.name, confExDebugStatic);
+
+var confExReleaseStatic = 
+    new Configuration(
+        confReleaseStaticName, configTypeExe,
+        confReleaseStaticOut, confReleaseStaticOut);
+platformWin32Ex.configurations.add(
+    confExReleaseStatic.name, confExReleaseStatic);
+
+var confExMTDebugStatic = 
+    new Configuration(
+        confMTDebugStaticName, configTypeExe,
+        confMTDebugStaticOut, confMTDebugStaticOut);
+platformWin32Ex.configurations.add(
+    confExMTDebugStatic.name, confExMTDebugStatic);
+
+var confExMTReleaseStatic = 
+    new Configuration(
+        confMTReleaseStaticName, configTypeExe,
+        confMTReleaseStaticOut, confMTReleaseStaticOut);
+platformWin32Ex.configurations.add(
+    confExMTReleaseStatic.name, confExMTReleaseStatic);
+
+var confExDebugDll = 
+    new Configuration(
+        confDebugDllName, configTypeExe,
+        confDebugDllOut, confDebugDllOut);
+platformWin32Ex.configurations.add(
+    confExDebugDll.name, confExDebugDll);
+
+var confExReleaseDll = 
+    new Configuration(
+        confReleaseDllName, configTypeExe,
+        confReleaseDllOut, confReleaseDllOut);
+platformWin32Ex.configurations.add(
+    confExReleaseDll.name, confExReleaseDll);
+    
+var confExMTDebugDll = 
+    new Configuration(
+        confMTDebugDllName, configTypeExe,
+        confMTDebugDllOut, confMTDebugDllOut);
+platformWin32Ex.configurations.add(
+    confExMTDebugDll.name, confExMTDebugDll);
+
+var confExMTReleaseDll = 
+    new Configuration(
+        confMTReleaseDllName, configTypeExe,
+        confMTReleaseDllOut, confMTReleaseDllOut);
+platformWin32Ex.configurations.add(
+    confExMTReleaseDll.name, confExMTReleaseDll);
+
+
+// for tests
+projectTests.platforms.add(platformWin32Tst.name, platformWin32Tst);
+
+var confTstDebugStatic = 
+    new Configuration(
+        confDebugStaticName, configTypeExe,
+        confDebugStaticOut, confDebugStaticOut);
+platformWin32Tst.configurations.add(
+    confTstDebugStatic.name, confTstDebugStatic);
+
+var confTstReleaseStatic = 
+    new Configuration(
+        confReleaseStaticName, configTypeExe,
+        confReleaseStaticOut, confReleaseStaticOut);
+platformWin32Tst.configurations.add(
+    confTstReleaseStatic.name, confTstReleaseStatic);
+
+var confTstMTDebugStatic = 
+    new Configuration(
+        confMTDebugStaticName, configTypeExe,
+        confMTDebugStaticOut, confMTDebugStaticOut);
+platformWin32Tst.configurations.add(
+    confTstMTDebugStatic.name, confTstMTDebugStatic);
+
+var confTstMTReleaseStatic = 
+    new Configuration(
+        confMTReleaseStaticName, configTypeExe,
+        confMTReleaseStaticOut, confMTReleaseStaticOut);
+platformWin32Tst.configurations.add(
+    confTstMTReleaseStatic.name, confTstMTReleaseStatic);
+
+var confTstDebugDll = 
+    new Configuration(
+        confDebugDllName, configTypeExe,
+        confDebugDllOut, confDebugDllOut);
+platformWin32Tst.configurations.add(
+    confTstDebugDll.name, confTstDebugDll);
+
+var confTstReleaseDll = 
+    new Configuration(
+        confReleaseDllName, configTypeExe,
+        confReleaseDllOut, confReleaseDllOut);
+platformWin32Tst.configurations.add(
+    confTstReleaseDll.name, confTstReleaseDll);
+    
+var confTstMTDebugDll = 
+    new Configuration(
+        confMTDebugDllName, configTypeExe,
+        confMTDebugDllOut, confMTDebugDllOut);
+platformWin32Tst.configurations.add(
+    confTstMTDebugDll.name, confTstMTDebugDll);
+
+var confTstMTReleaseDll = 
+    new Configuration(
+        confMTReleaseDllName, configTypeExe,
+        confMTReleaseDllOut, confMTReleaseDllOut);
+platformWin32Tst.configurations.add(
+    confTstMTReleaseDll.name, confTstMTReleaseDll);
+
+
+// for rwtest
+projectRwTest.platforms.add(platformWin32Rw.name, platformWin32Rw);
+
+var confRwDebugStatic = 
+    new Configuration(
+        confDebugStaticName, configTypeLib,
+        confDebugStaticOut, confDebugStaticOut);
+platformWin32Rw.configurations.add(
+    confRwDebugStatic.name, confRwDebugStatic);
+
+var confRwReleaseStatic = 
+    new Configuration(
+        confReleaseStaticName, configTypeLib,
+        confReleaseStaticOut, confReleaseStaticOut);
+platformWin32Rw.configurations.add(
+    confRwReleaseStatic.name, confRwReleaseStatic);
+
+var confRwMTDebugStatic = 
+    new Configuration(
+        confMTDebugStaticName, configTypeLib,
+        confMTDebugStaticOut, confMTDebugStaticOut);
+platformWin32Rw.configurations.add(
+    confRwMTDebugStatic.name, confRwMTDebugStatic);
+
+var confRwMTReleaseStatic = 
+    new Configuration(
+        confMTReleaseStaticName, configTypeLib,
+        confMTReleaseStaticOut, confMTReleaseStaticOut);
+platformWin32Rw.configurations.add(
+    confRwMTReleaseStatic.name, confRwMTReleaseStatic);
+
+var confRwDebugDll = 
+    new Configuration(
+        confDebugDllName, configTypeLib,
+        confDebugDllOut, confDebugDllOut);
+platformWin32Rw.configurations.add(
+    confRwDebugDll.name, confRwDebugDll);
+
+var confRwReleaseDll = 
+    new Configuration(
+        confReleaseDllName, configTypeLib,
+        confReleaseDllOut, confReleaseDllOut);
+platformWin32Rw.configurations.add(
+    confRwReleaseDll.name, confRwReleaseDll);
+    
+var confRwMTDebugDll = 
+    new Configuration(
+        confMTDebugDllName, configTypeLib,
+        confMTDebugDllOut, confMTDebugDllOut);
+platformWin32Rw.configurations.add(
+    confRwMTDebugDll.name, confRwMTDebugDll);
+
+var confRwMTReleaseDll = 
+    new Configuration(
+        confMTReleaseDllName, configTypeLib,
+        confMTReleaseDllOut, confMTReleaseDllOut);
+platformWin32Rw.configurations.add(
+    confRwMTReleaseDll.name, confRwMTReleaseDll);
+
+// for RunExamples
+var platformWin32RunEx = platformWin32Conf.clone();
+projectRunExamples.platforms.add(platformWin32RunEx.name, 
+    platformWin32RunEx);
+
+// for RunTests
+var platformWin32RunTests = platformWin32Conf.clone();
+projectRunTests.platforms.add(platformWin32RunTests.name, 
+    platformWin32RunTests);
+
+/////////////////////////////////////////////////////////////////////////
+// tools
+
+// compilers
+var compiler = new Compiler();
+compiler.defines.add("_RWSTD_USE_CONFIG");
+
+var compilerWin32 = compiler.clone();
+// compilerWin32.defines.add("WIN32");
+
+// linkers
+var linker = new Linker();
+
+// librarians
+var librarian = new Librarian();
+
+////////////////////////////////////////////////////////////////////////
+// functions
+
+// returns solution by its name
+function getSolution(name)
+{
+    return configurations.get(name);
+}
+

Propchange: incubator/stdcxx/trunk/etc/config/windows/data.js
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp?rev=349027&view=auto
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp (added)
+++ incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp Fri Nov 25 14:16:34 2005
@@ -0,0 +1,70 @@
+extern "C"
+{
+    typedef void (*funptr_t)();
+}
+
+// take the address of the function in a way
+// that foils even clever optimizers
+
+union {
+    funptr_t      pf;
+    unsigned long ul;
+} funptri;
+
+#ifdef CHECK_DECL
+
+#  if defined (__linux__) && defined (__GNUG__) && __GNUG__ < 3
+     // prevent empty exception specifications from triggering
+     // gcc 2.9x -fhonor-std link errors looking for std::terminate()
+#    include <features.h>
+#    undef __THROW
+#    define __THROW
+#  endif   // gcc < 3 on Linux
+
+#  include HDRNAME
+
+#  ifndef NONAMESPACE
+
+namespace std { }
+using namespace std;
+
+#  endif   // NONAMESPACE
+
+int main (int argc, char**)
+{
+    // with gcc, prevent intrinsics from causing false positives
+
+#  if TAKE_ADDR
+
+    funptri.pf = (funptr_t)&FUNNAME;
+
+    return (argc < 1 ? !funptri.ul : !!funptri.ul) + 0;
+    
+#  else   // if !TAKE_ADDR
+
+    // disable warnings about an unused variable
+    (void)&argc;
+
+    // call the function using the supplied arguments
+    (void)FUN;
+
+    return 0;
+
+#  endif   // TAKE_ADDR
+
+}
+
+#else   // if !defined (CHECK_DECL)
+
+extern "C" void FUNNAME ();
+
+int main (int argc, char**)
+{
+    funptri.pf = (funptr_t)&FUNNAME;
+
+    return (argc < 1 ? !funptri.ul : !!funptri.ul) + 0;
+}
+
+#endif   // CHECK_DECL
+
+

Propchange: incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message