stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r358881 [1/2] - /incubator/stdcxx/trunk/etc/config/windows/
Date Fri, 23 Dec 2005 23:16:30 GMT
Author: sebor
Date: Fri Dec 23 15:16:15 2005
New Revision: 358881

URL: http://svn.apache.org/viewcvs?rev=358881&view=rev
Log:
2005-12-22  Anton Pevtsov  <antonp@moscow.vdiweb.com>

	* config.js (Linker): Added library directories collection.
	* configure.wsf: Corrected helper xml comments, updated error hadling
	- the script tells the user where to look for the log file. Added
	option for the icc-9.0 Defines to avoid problems with '*' symbol
	in 19 package version of the Intel 9.0 C++ compiler, function tests
	updated correspondingly.
	* data.js: The solution names were moved to this file to be used
	in all other script files.
	* fun_present_check.cpp (FUN_PARAMS): New helper define to avoid
	problem with Compilation for Intel 9.0 C++ 19 package '*' problem
	workaround.
	* generate.js: Added icc-specific functions for the solution
	generation.
	(checkEnvironment): New function for all configurations (it checks
	that all utilities required for the solution generation are available).
	(generateSolution): Implemented for icc (msvc implementation updated),
	added helper functions for the source files filters.
	* generate.wsf: corrected helper xml comments, updated builddir
	variable to use config in the directory name.
	(checkEnvironment): New step to the solution generation workflow,
	modified the final output.
	(generateBuildBatch): Updated to be config-independent and accept
	the config as first parameter.
	(generateUpdateBatch): Same.
	* makelog.wsf: Corrected helper xml comments, updated the log file
	name generation mechanism to use the configrutation in the file name.
	(CONFIG): Added script parameter.
	* runall.wsf: Fixed typo.
	* summary.js: Added mechanism to read compilation output from
	BuildLog.html in non-table data form, updated the BuildLog.html
	reading workflow, changed the log file name generation function
	to use the configuration in the log file name.
	* update.wsf: Corrected helper xml comments.
	(checkEnvironment): Added step to the solution update workflow.
	Added several icc-90 specific steps (i.e converting from icc projects
	structure to msvc and vice versa).
	* utilities.js (converSolutionImpl): New function for the solution
	conversion from Intel projects structure, added special processing
	for the solutions which has cpecific configurations for the configure
	project (icc).
	* msvc-config.js: Added the icc-9.0 solution creation as a copy of
	msvc-7.1 solution. It is here to be sure that icc solution will be
	created after msvc-7.1 creation and configuration. All configure
	tools functions made configuration independent (they receive all
	necessary information via parameters).
	(configureToolsVC71): Changed correspondingly.
	* msvc-config_classes.js: Added processing for the additional
	libraries in linker.
	* icc-config.js: New. Contains "classes" for the icc-9.0 compiler,
	linker, librarian, etc.
	* icc-config_classes.js: New. Contains the icc9.0_config solution
	tools configuration. This special solution is used for configure
	project compilation instead of icc-9.0. Should be included in
	configure.wsf script only.

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

Modified: incubator/stdcxx/trunk/etc/config/windows/config.js
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/config.js?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/config.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/config.js Fri Dec 23 15:16:15 2005
@@ -300,6 +300,7 @@
     this.base = Tool;
     this.base(linkerToolName);
     this.libraries = new Collection();
+    this.libdirs = new Collection();
 }
 
 // Linker class methods

Modified: incubator/stdcxx/trunk/etc/config/windows/configure.wsf
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/configure.wsf?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/configure.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/configure.wsf Fri Dec 23 15:16:15 2005
@@ -21,7 +21,7 @@
                 required="false" type="string"/>
             <named helpstring="Log file name" name="LogFile" 
                 required="false" type="string"/>
-            <example>cscript configure.wsf /SolutionName:VC71 
+            <example>cscript configure.wsf /SolutionName:msvc-7.1 
                 /ConfigurationName:"Release Static"
             </example>
             <usage>
@@ -29,7 +29,7 @@
 /ConfigurationName:@Configuration [/OutDir:@OutDir] [/OutFile:@OutFile] 
 [/SrcDir:@SrcDir] [/LogFile:@LogFile],
 where
-@Solution is VC71,
+@Solution is msvc-7.1 or icc-9.0,
 @Configuration = 11s Debug Static | 11d Debug Dll , etc
 @OutDir - output directory (default: script_directory\tests),
 @OutFile - output file name (default: config.h),
@@ -41,8 +41,10 @@
         <object id="WshShell" progid="WScript.Shell"/>
         <script language="JScript" src="config.js"/>
         <script language="JScript" src="msvc-config_classes.js"/>
+        <script language="JScript" src="icc-config_classes.js"/>
         <script language="JScript" src="data.js"/>
         <script language="JScript" src="msvc-config.js"/>
+        <script language="JScript" src="icc-config.js"/>
         <script language="JScript" src="utilities.js"/>
         <script id="configure" language="JScript">
 <![CDATA[
@@ -217,20 +219,37 @@
         activeCompiler.defines.add("_RWBUILD_std");
     }
     
+    var logFileNameURI = "file://" + logFileName.replace(/\\/mg, "/");
+    
     // sanity check
-    checkSanity();
+    if (0 == checkSanity())
+    {
+        WScript.StdErr.WriteLine(
+            "You may see log here: " + logFileNameURI);
+        WScript.Quit(1);
+    }
         
     // check architecture
     checkArchitecture();
         
     // headers and functions check
-    checkHeaders();
+    checkHeaders(WScript.Arguments.Named("SolutionName"));
 
     // compile .lib.cpp s
-    compileLibs();
+    if (0 == compileLibs())
+    {
+        WScript.StdErr.WriteLine(
+            "You may see log here: " + logFileNameURI);
+        WScript.Quit(1);
+    }
     
     // compile, link and run .cpp's (if possible)
-    runExeTests();
+    if (0 == runExeTests())
+    {
+        WScript.StdErr.WriteLine(
+            "You may see log here: " + logFileNameURI);
+        WScript.Quit(1);
+    }
     
     fso.MoveFile(stageFile , configFile);
     WScript.Quit(0);
@@ -253,7 +272,7 @@
     {
         WScript.StdErr.WriteLine(
             "Configure: Fatal error: Compiler failed sanity check");
-        WScript.Quit(1);
+        return 0;
     }
     
     var exeName = "sanity.exe";
@@ -269,7 +288,7 @@
     {
         WScript.StdErr.WriteLine(
             "Configure: Fatal error: Linker failed sanity check");
-        WScript.Quit(1);
+        return 0;
     }
     
     WScript.StdOut.Write("Checking if run environment is sane... ");
@@ -283,8 +302,10 @@
         WScript.StdErr.WriteLine(
             "Configure: Fatal error: \
                 Runtime environment failed sanity check");
-        WScript.Quit(1);
+        return 0;
     }
+    
+    return 1;
 }
 
 // removes file if it exists
@@ -376,8 +397,13 @@
 }
 
 // perform headers presence check
-function checkHeaders()
+function checkHeaders(currentCfg)
 {
+    // for some strange reasons Intel C++ 9.0 Compiler
+    // crashes when '*' symbol presents in compiler defines
+    // or do another strange things
+    var useStarInDefines = (currentCfg != icc90SolutionName);
+    
     var hdrs = "assert ctype errno float iso646 limits locale math setjmp";
     hdrs += " signal stdarg stddef stdio stdlib string time wchar wctype";
     hdrs += " new typeinfo";
@@ -488,6 +514,7 @@
     var lib;
     for (i in headers)
     {
+        var fun_params = "";
         var hdr_base = headers[i];
         switch (hdr_base)
         {
@@ -564,29 +591,50 @@
             break;
             case "string":
             funs = 
-                "memchr((char*)0,0,0) memcmp memcpy memmove memset strcat";
+                useStarInDefines ? "memchr((char*)0,0,0)" : "memchr(0,0,0)";
+            funs += " memcmp memcpy memmove memset strcat";
+            funs += 
+                useStarInDefines ? " strchr((char*)0,0)" : " strchr(0,0)";
             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)";
+                " strcmp strcoll strcpy strcspn strerror strlen";
+            funs += " strncat strncmp strncpy"
+            funs += useStarInDefines ? 
+                " strpbrk((char*)0,(char*)0)" : " strpbrk(0,0)";
+            funs += 
+                useStarInDefines ? " strrchr((char*)0,0)" : " strrchr(0,0)";
+            funs += " strspn"
+            funs += useStarInDefines ? 
+                " strstr((char*)0,(char*)0)" : " strstr(0,0)";
             funs += " strtok strxfrm";
             funs = funs.split(" ");
             lib = "c";
             break;
-            case "wchar":
+        case "wchar":
+            fun_params = "wchar_t t[] = {'a'}";
             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 += " vwprintf vwscanf wcrtomb wcscat"
+            funs += 
+             useStarInDefines ? " wcschr((wchar_t*)0,0)" : " wcschr(t,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 += " wcsncmp wcsncpy"
+            funs += useStarInDefines ? 
+                " wcspbrk((wchar_t*)0,(wchar_t*)0)" : " wcspbrk(t,0)";
+            funs += useStarInDefines ? 
+                " wcsrchr((wchar_t*)0,0)" : " wcsrchr(t,0)";
+            funs += " wcsrtombs wcsspn";
+            funs += useStarInDefines ? 
+                " wcsstr((wchar_t*)0,(wchar_t*)0)" : " wcsstr(t,0)";
             funs += 
-             " wcsstr((wchar_t*)0,(wchar_t*)0) wcstod wcstod wcstof wcstok";
+             " wcstod wcstod wcstof wcstok";
             funs += 
                 " wcstol wcstold wcstoll wcstombs wcstoul wcstoull wcsxfrm";
-            funs += " wctob wctomb wmemchr((wchar_t*)0,0,0) wmemcmp wmemcpy";
+            funs += " wctob wctomb"
+            funs += useStarInDefines ? 
+                " wmemchr((wchar_t*)0,0,0)" : " wmemchr(t,0,0)";
+            funs += " wmemcmp wmemcpy";
             funs += " wmemmove wmemset wprintf wscanf";
             funs = funs.split(" ");         
             lib = "c";
@@ -649,6 +697,10 @@
             {
                 defines.push("NONAMESPACE");
             }
+            if (paramsIndx != -1 && fun_params != "")
+            {
+                defines.push("FUN_PARAMS=" + fun_params);
+            }
             var ret = compileFiles(srcFile, defines);
             if (ret == 0)
             {
@@ -749,9 +801,11 @@
             WScript.StdErr.WriteLine(
                 "Configure: Fatal error: Failed to build library " 
                     + outLibName);
-            WScript.Quit(1);
+            return 0;
         }
     }
+    
+    return 1;
 }
 
 // gets description from text if present
@@ -867,7 +921,7 @@
                                 "Configure: Fatal error: Test " + test
                                  + " failed to complete in " + timeOut / 1000
                                  + " seconds");
-                            WScript.Quit(3);
+                            return 0;
                         }
                     }
                     result = exec.ExitCode;
@@ -907,11 +961,13 @@
                 var srcText = readTextFile(srcFile);
                 checkDependencies(srcText, configText, true);               
             }
-            WScript.Quit(1);
+            return 0;
         }
         srcs = postponed;
     }
     while (srcs.length != 0);
+    
+    return 1;
 }
 
 // located dependencies (symbols _RWSTD_XXX and _RWSTD_NO_XXX) in a text

Modified: incubator/stdcxx/trunk/etc/config/windows/data.js
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/data.js?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/data.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/data.js Fri Dec 23 15:16:15 2005
@@ -829,3 +829,14 @@
     return configurations.get(name);
 }
 
+////////////////////////////////////////////////////////////////////////
+// solution names
+
+// VC71 solution 
+var vc71SolutionName = "msvc-7.1";
+
+// ICC90 solution 
+var icc90SolutionName = "icc-9.0";
+
+// ICC90 configuration solution
+var icc90CfgSolutionName = icc90SolutionName + "_config";

Modified: 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=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp (original)
+++ incubator/stdcxx/trunk/etc/config/windows/fun_present_check.cpp Fri Dec 23 15:16:15 2005
@@ -46,6 +46,9 @@
     (void)&argc;
 
     // call the function using the supplied arguments
+    #ifdef FUN_PARAMS
+        FUN_PARAMS;
+    #endif
     (void)FUN;
 
     return 0;

Modified: incubator/stdcxx/trunk/etc/config/windows/generate.js
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/generate.js?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/generate.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/generate.js Fri Dec 23 15:16:15 2005
@@ -35,6 +35,8 @@
 var runExamplesLog = "runexamples.log";
 var runTestsLog = "runtests.log";
 
+var iccConversionUtility = "ICProjConvert90.exe";
+
 function fillProjectsFromFolders(result, solution, srcDir, 
                     projectTemplateName, projectNamePrefix, projectFolder, 
                     includeOffset, excludedFolders, excludedFiles,
@@ -335,6 +337,7 @@
 
     var result = solution.shallowClone();
     result.generateSolution = solution.generateSolution;
+    result.checkEnvironment = solution.checkEnvironment;
     // clone build configurations
     result.configurations = solution.configurations.clone();
     
@@ -394,7 +397,7 @@
                         cfgProjectSrcFolder);
                     project.sourceFiles.add(filter.name, filter);
                     
-                    filter = createIncludesFilter(srcDir, 
+                    filter = createExcludedIncludesFilter(srcDir, 
                         cfgProjectIncludeFolder);                        
                     project.sourceFiles.add(filter.name, filter);
                 
@@ -403,7 +406,7 @@
                 case projectStdLibName:
                     project.folder = stdlibProjectFolder;
                     
-                    var filter = createSourcesFilter(srcDir + "\\"
+                    var filter = createCppSourcesFilter(srcDir + "\\"
                         + stdlibProjectFolder, stdlibSrcFolder);
                     project.sourceFiles.add(filter.name, filter);
                     
@@ -420,7 +423,7 @@
                 case projectRwTestName:
                 
                     project.folder = rwtestProjectFolder;
-                    var filter = createSourcesFilter(srcDir + "\\"
+                    var filter = createCppSourcesFilter(srcDir + "\\"
                         + rwtestProjectFolder, rwtestSrcFolder);
                     project.sourceFiles.add(filter.name, filter);
                     
@@ -495,7 +498,7 @@
                     tool.dependencies = configureDependencies;
                     newCfg.tools.add(tool.name, tool);
                     // add a fake linker to suppress dependency on output
-                    tool = new FakeLinkerVC();
+                    tool = getFakeLinker(solution.name);
                     newCfg.tools.add(tool.name, tool);
                     
                     newCfg.outputDir = "include\\" + newCfg.outputDir;
@@ -575,7 +578,7 @@
                                                     
                     newCfg.tools.add(tool.name, tool);
                     // add a fake linker to suppress dependency on output
-                    tool = new FakeLinkerVC();
+                    tool = getFakeLinker(solution.name);
                     newCfg.tools.add(tool.name, tool);
                 
                     platform.configurations.add(newCfg.name, newCfg);
@@ -603,7 +606,7 @@
                                                     
                     newCfg.tools.add(tool.name, tool);
                     // add a fake linker to suppress dependency on output
-                    tool = new FakeLinkerVC();
+                    tool = getFakeLinker(solution.name);
                     newCfg.tools.add(tool.name, tool);
                 
                     platform.configurations.add(newCfg.name, newCfg);
@@ -618,8 +621,8 @@
         }
     }
     
-    WScript.Echo("Library amd configure projects are created");
-    logFile.WriteLine("Library amd configure projects are created");
+    WScript.Echo("Library and configure projects are created");
+    logFile.WriteLine("Library and configure projects are created");
     
     logFile.WriteLine("Creating examples");
     WScript.Echo("Creating examples...");
@@ -655,6 +658,14 @@
     return filter;
 }
 
+function createCppSourcesFilter(projectDir, offsetDir)
+{
+    var filter = createFilter(projectDir, offsetDir, 
+        "Source Files", "cpp;cxx;s", /^.+\.cc|.+\.c$/i);
+    filter.id = "{4FC737F1-C7A5-4376-A066-2A32D752A2FF}";
+    return filter;
+}
+
 function createIncludesFilter(projectDir, offsetDir)
 {
     var filter = createFilter(projectDir, offsetDir, 
@@ -676,6 +687,14 @@
     return filter;
 }
 
+function createExcludedIncludesFilter(projectDir, offsetDir)
+{
+    var filter = createFilter(projectDir, offsetDir, 
+        "Header Files", "h;hpp;hxx", /^.+\.cc|.+\.c|.+\.hpp|.+\.hxx$/i);
+    filter.id = "{93995380-89BD-4b04-88EB-625FBE52EBFB}";
+    return filter;
+}
+
 var rxExcludedFolders = 
     new RegExp("^(?:\\.svn|Release.*|Debug.*|in|out|CVS)$","i");
 
@@ -832,6 +851,17 @@
 }
 
 
+function getFakeLinker(solutionName)
+{
+    if (solutionName == vc71SolutionName)
+        return new FakeLinkerVC();
+        
+    if (solutionName == icc90SolutionName)
+        return new FakeLinkerICC();
+        
+    return new FakeLinkerVC();
+}
+
 // creates real solution based on the template
 function fillSolutionTemplateLight(solution, oldProjects, srcDir, outDir, logStream)
 {
@@ -853,6 +883,7 @@
 
     var result = solution.shallowClone();
     result.generateSolution = solution.generateSolution;
+    result.checkEnvironment = solution.checkEnvironment;
     // clone build configurations
     result.configurations = solution.configurations.clone();
     
@@ -968,6 +999,13 @@
                             removeLeadingDot(projectStdLibName) + 
                             newCfg.outputDir + ".dll";
                     }
+                    else
+                    {
+                        var tool = newCfg.tools[librarianToolName];
+                        tool.outputFile = 
+                            removeLeadingDot(projectStdLibName) +
+                            newCfg.outputDir + ".lib";
+                    }
                 }
                 
                 platform.configurations.add(newCfg.name, newCfg);
@@ -1130,16 +1168,17 @@
     vcproj.Close();
 }
 
-function generateSolutionVC(srcDir, outDir, logStream, genVCPROJs)
+function generateSolutionVCImpl (solution, srcDir, outDir, 
+                                 logStream, genVCPROJs)
 {
-    var slnFileName = outDir + "\\" + this.name + ".sln";
+    var slnFileName = outDir + "\\" + solution.name + ".sln";
     var sln = fso.CreateTextFile(slnFileName, true, false);
     // header
     sln.WriteLine(
         "Microsoft Visual Studio Solution File, Format Version 8.00");
-    for (i in this.projects)
+    for (i in solution.projects)
     {
-        var project = this.projects[i];
+        var project = solution.projects[i];
         if (project.name) //really a project
         {
             if (true == genVCPROJs)
@@ -1154,9 +1193,11 @@
             sln.Write("\"" + project.name + "\"");
             var projectPath = project.folder.length > 0 ?
                 outDir + project.folder + "\\" : outDir + "";
+            var projectRelPath = project.folder.length > 0 ?
+                removeLeadingSymbol(project.folder, "\\") + "\\" : "";
             var projectSrcPath = project.folder.length > 0 ?
                 srcDir + project.folder + "\\" : srcDir + "";
-            var projectFile = projectPath + 
+            var projectFile = projectRelPath + 
                 removeLeadingDot(project.name) + ".vcproj";
             sln.Write(", \"" + projectFile + "\"");
             sln.WriteLine(", \"" + project.id + "\"");
@@ -1166,7 +1207,7 @@
                 "\tProjectSection(ProjectDependencies) = postProject");
             for (j in project.dependencies)
             {
-                var depProject = this.projects[j];
+                var depProject = solution.projects[j];
                 if (depProject.name)
                 {
                     sln.WriteLine("\t\t" + depProject.id
@@ -1188,9 +1229,9 @@
     sln.WriteLine("Global");
     // solution configurations
     sln.WriteLine("\tGlobalSection(SolutionConfiguration) = preSolution");
-    for (j in this.configurations)
+    for (j in solution.configurations)
     {
-        var slnCfg = this.configurations[j];
+        var slnCfg = solution.configurations[j];
         if (slnCfg.name)
         {           
             sln.WriteLine("\t\t" + slnCfg.name + " = " + slnCfg.name);
@@ -1199,9 +1240,9 @@
     sln.WriteLine("\tEndGlobalSection");
     // project configurations
     sln.WriteLine("\tGlobalSection(ProjectConfiguration) = postSolution");
-    for (j in this.configurations)
+    for (j in solution.configurations)
     {
-        var slnCfg = this.configurations[j];
+        var slnCfg = solution.configurations[j];
         if (slnCfg.name)
         {
             for (k in slnCfg.projectConfigurations)
@@ -1209,7 +1250,7 @@
                 var projectCfg = slnCfg.projectConfigurations[k];
                 if (projectCfg.projectName)
                 {
-                    var project = this.projects[projectCfg.projectName];
+                    var project = solution.projects[projectCfg.projectName];
                     if (!project)
                     {
                         WScript.StdErr.WriteLine(
@@ -1310,6 +1351,170 @@
     }
 }
 
+function generateSolutionVC(srcDir, outDir, logStream, genVCPROJs)
+{
+    generateSolutionVCImpl(this, srcDir, outDir, logStream, genVCPROJs);
+}
+
+
+function checkEnvironmentVC(logStream)
+{
+    try
+    {
+        var testGUID = createUUID();
+        if (testGUID == "")
+        {
+            WScript.Echo("Error: uuidgen failed.");
+            logStream.WriteLine("Error: uuidgen failed.");
+            return false;
+        }
+    }
+    catch(e)
+    {
+        WScript.Echo("Error: cannot find the uuidgen utility.");
+        logStream.WriteLine("Error: cannot find the uuidgen utility.");
+        return false;
+    }
+    
+    return true;
+}
+
+////////////////////////////////////////////////////////////////////
+// ICC 
+function setProjectAdditionalDependencies(solution, outDir, prj)
+{
+    if (!prj || !solution)
+        return;
+        
+    for (dep in prj.dependencies)
+    {
+        var depPrj = solution.projects[dep];
+        if (! depPrj.name || ! depPrj.platforms)
+            continue;
+
+        if (depPrj.name != projectStdLibName && 
+            depPrj.name != projectRwTestName)
+                continue;
+               
+        for (j in prj.platforms)
+        {
+            var platform = prj.platforms[j];
+            var depPlatform = depPrj.platforms[j];
+
+            if (!platform.configurations || !depPlatform.configurations)
+                continue;
+                    
+            for (k in platform.configurations)
+            {
+                var cfg = platform.configurations[k];
+                var depCfg = depPlatform.configurations[k];
+                if (!cfg.tools || !depCfg.tools)
+                    continue;
+
+                var lnkTool = cfg.tools[linkerToolName];
+                if (! lnkTool)
+                    continue;
+                    
+                var depLnkTool = depCfg.tools[linkerToolName];
+                var depLibTool = depCfg.tools[librarianToolName];
+                                  
+                if (depLnkTool && depLnkTool.outputFile)
+                {
+                    var addlib = depLnkTool.outputFile;
+                    var idxDll = addlib.lastIndexOf(".dll");
+                    if (-1 != idxDll)
+                        addlib = addlib.substr(0, idxDll);
+                    addlib += ".lib";
+                        
+                    lnkTool.libraries.add(addlib);
+                    lnkTool.libdirs.add(outDir + depPrj.folder + 
+                        "\\" + depCfg.outputDir);
+                }
+                else if (depLibTool && depLibTool.outputFile)
+                {                        
+                    var addlib = depLibTool.outputFile;
+                    lnkTool.libraries.add(addlib);
+                    lnkTool.libdirs.add(outDir + depPrj.folder + 
+                        "\\" + depCfg.outputDir);
+                }
+            }
+        }
+    }
+}
+
+function setAdditionalDependencies(solution, outDir)
+{
+    for (i in solution.projects)
+    {
+        var prj = solution.projects[i];
+        if (! prj.platforms || ! prj.dependencies)
+            continue;
+            
+        setProjectAdditionalDependencies(solution, outDir, prj);
+    }
+}
+
+function convertSolution(outDir, solName, toICC)
+{   
+    var slnICFileName = outDir + "\\" + solName + ".sln";
+    convertSolutionImpl(slnICFileName, toICC, null);
+}
+
+function generateSolutionICC(srcDir, outDir, logStream, genICPROJs)
+{
+    if (false == genICPROJs)
+    {
+        generateSolutionVCImpl(this, srcDir, outDir, logStream, genICPROJs);
+        return;
+    }
+            
+    setAdditionalDependencies(this, outDir);
+    
+    generateSolutionVCImpl(this, srcDir, outDir, logStream, genICPROJs);
+    
+    var slnICFileName = outDir + "\\" + this.name + ".sln";
+    convertSolutionImpl(slnICFileName, true, logStream);
+}
+
+function checkEnvironmentICC(logStream)
+{
+    try
+    {
+        var testGUID = createUUID();
+        if (testGUID == "")
+        {
+            WScript.Echo("Error: uuidgen failed.");
+            logStream.WriteLine("Error: uuidgen failed.");
+            return false;
+        }
+    }
+    catch(e1)
+    {
+        WScript.Echo("Error: cannot find the uuidgen utility.");
+        logStream.WriteLine("Error: cannot find the uuidgen utility.");
+        return false;
+    }
+    
+    try
+    {
+        var cmdICConvTest = iccConversionUtility + " /?";
+        var ret = WshShell.Run(cmdICConvTest, 7, true);
+    }
+    catch(e2)
+    {
+        logStream.WriteLine(
+            iccConversionUtility + " conversion utility not found");
+        
+        WScript.Echo("Error: " + 
+            iccConversionUtility + " conversion utility not found");
+            
+        return false;
+    }
+    
+    return true;
+}
+
+/////////////////////////////////////////////////////////////////////////////
 function readSolutionGUIDs(solFileName)
 {
     if (! fso.FileExists(solFileName))
@@ -1356,5 +1561,10 @@
 }
 
 
-var solutionVC71 = getSolution("VC71");
+var solutionVC71 = getSolution(vc71SolutionName);
 solutionVC71.generateSolution = generateSolutionVC;
+solutionVC71.checkEnvironment = checkEnvironmentVC;
+
+var solutionICC90 = getSolution(icc90SolutionName);
+solutionICC90.generateSolution = generateSolutionICC;
+solutionICC90.checkEnvironment = checkEnvironmentICC;

Modified: incubator/stdcxx/trunk/etc/config/windows/generate.wsf
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/generate.wsf?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/generate.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/generate.wsf Fri Dec 23 15:16:15 2005
@@ -16,14 +16,14 @@
             <named helpstring="Output directory for modules" 
                 name="BUILDDIR" required="true" type="string"/>
             <example>cscript generate.wsf /TOPDIR:"C:\stdcxx" 
-                /BUILDDIR:"C:\stdcxx\build" /CONFIG:VC71
+                /BUILDDIR:"C:\stdcxx\build" /CONFIG:msvc-7.1
             </example>
             <usage>
 Usage: cscript generate.wsf /CONFIG:@CONFIG 
 /BUILDDIR:@BUILDDIR [/TOPDIR:@TOPDIR] 
 [/BUILDTYPE:@BUILDTYPE] [/BUILDONLY:@BUILDONLY]
 where
-@CONFIG is VC71,
+@CONFIG is msvc-7.1 or icc-9.0,
 @TOPDIR - stdcxx main directory,
 @BUILDDIR - output directory for a build.
             </usage>
@@ -32,6 +32,7 @@
         <object id="WshShell" progid="WScript.Shell"/>
         <script language="JScript" src="config.js"/>
         <script language="JScript" src="msvc-config_classes.js"/>
+        <script language="JScript" src="icc-config_classes.js"/>
         <script language="JScript" src="data.js"/>
         <script language="JScript" src="msvc-config.js"/>
         <script language="JScript" src="utilities.js"/>
@@ -46,6 +47,7 @@
 var scriptDir = getParentFolder(WScript.ScriptFullName);
 var srcDir = getParentFolder(getParentFolder(getParentFolder(scriptDir)));
 var outDir = srcDir;
+var outDirBase = outDir;
 var logFile = "slngen.log";
 var logStream = null;
 var currentCfg = "";
@@ -63,8 +65,6 @@
 var etcDir = "\\etc";
 var configDir = "\\etc\\config";
 
-var tempBuildBatchName = "buildsol.bat";
-
 var description = new generate; // run
 
 function generate()
@@ -75,6 +75,9 @@
     readAndCheckArguments();
     createBuildDirs();
     
+    outDirBase = outDir;
+    outDir += "\\" + currentCfg;
+    
     if (srcDir[srcDir.length - 1] != "\\")
         srcDir += "\\";
             
@@ -105,15 +108,29 @@
     {
             WScript.StdErr.WriteLine(
                 "Generate: Solution with the name "
-                + solution + " does not support IDE project generation");
+                + solution.name + " does not support IDE project generation");
                 
             logStream.WriteLine("Solution with the name "
-                + solution + " does not support IDE project generation");
+                + solution.name + " does not support IDE project generation");
                 
             logStream.Close();
             WScript.Quit(2);        
     }
     
+    if (!solution.checkEnvironment(logStream))
+    {
+            WScript.StdErr.WriteLine(
+                "Generate: Environment for the " + solution.name + 
+                " solution generation is not configured");
+                
+            logStream.WriteLine(
+                "Generate: Environment for the " + solution.name + 
+                " solution generation is not configured");
+                
+            logStream.Close();
+            WScript.Quit(2);   
+    }
+    
     WScript.Echo("Creating projects...");
    
     //make solution structure
@@ -124,14 +141,17 @@
     WScript.Echo("Writing projects on disk...");
     fullSolution.generateSolution(srcDir, outDir, logStream, true);
 
-    generateBuildBatch(srcDir, outDir, currentCfg, fullSolution);
-    generateUpdateBatch(srcDir, outDir, currentCfg);
+    generateBuildBatch(srcDir, outDirBase, fullSolution);
+    generateUpdateBatch(srcDir, outDirBase);
     
     logStream.WriteLine("Solution created");
     logStream.Close();
     
-    WScript.Echo("Solution was generated successfully. See " + outDir + 
-        currentCfg + "slngen.log" + " for details.");
+    var logPath = outDir + currentCfg + "slngen.log";
+    var resLogPath = "file://" + logPath.replace(/\\/mg, "/");
+    
+    WScript.Echo("Solution was generated successfully. See " + 
+        resLogPath + " for details.");
         
     WScript.Quit(0);
 }
@@ -205,6 +225,11 @@
         if (! fso.FolderExists(builddir))
             fso.CreateFolder(builddir); 
             
+        builddir += "\\" + currentCfg;
+        
+        if (! fso.FolderExists(builddir))
+            fso.CreateFolder(builddir); 
+            
         if (! fso.FolderExists(builddir + includeDir))
             fso.CreateFolder(builddir + includeDir);    
             
@@ -236,17 +261,20 @@
     }
     catch(e)
     {
-        WScript.StdErr.WriteLine("RunGem: Fatal error: Failed to"
+        WScript.StdErr.WriteLine("Generate: Fatal error: Failed to"
             + " open folder " + builddir);
         WScript.Quit(3);
     }
 }
 
-function generateBuildBatch(sourcesDir, buildDir, curCfg, curSol)
+function generateBuildBatch(sourcesDir, buildDir, curSol)
 {
     try
     {
-        var buildBatchFileName = buildDir + "build.bat";
+        var buildBatchFileName = buildDir + "\\" + "build.bat";
+        if (fso.FileExists(buildBatchFileName))
+            return 1;
+            
         var buildBatchFile = fso.CreateTextFile(buildBatchFileName);
         
         buildBatchFile.WriteLine("@echo off");        
@@ -255,11 +283,23 @@
         
         buildBatchFile.WriteLine("set topdir=" + sourcesDir);
         buildBatchFile.WriteLine("set builddir=" + buildDir);
-        buildBatchFile.WriteLine("set config=" + curCfg);
         buildBatchFile.WriteLine("set scriptdir=etc\\config\\windows");
         buildBatchFile.WriteLine("set makelog=makelog.wsf");
         buildBatchFile.WriteLine("set cfg=");
         buildBatchFile.WriteLine("set cfgbrief=");
+        buildBatchFile.WriteLine("set useenv=");
+        buildBatchFile.WriteLine("");
+        
+        buildBatchFile.WriteLine("set config=%1");
+        buildBatchFile.WriteLine("");
+        
+        buildBatchFile.WriteLine(
+            "if \"%1\"==\"" + icc90SolutionName + "\" ("); 
+        buildBatchFile.WriteLine("set useenv=/useenv");
+        buildBatchFile.WriteLine(")");
+        buildBatchFile.WriteLine("");
+            
+        buildBatchFile.WriteLine("shift");
         buildBatchFile.WriteLine("");
         
         buildBatchFile.WriteLine(":cfgloop");
@@ -290,13 +330,14 @@
         buildBatchFile.WriteLine(")");
         buildBatchFile.WriteLine("");
         
-        buildBatchFile.WriteLine("devenv \"%builddir%\\%config%.sln\"" 
-            + " /build \"%cfg%\"");
+        buildBatchFile.WriteLine("devenv \"%builddir%\\%config%\\%config%.sln\"" 
+            + " %useenv% /build \"%cfg%\"");
             
         buildBatchFile.WriteLine("");
         buildBatchFile.WriteLine("cscript /nologo "
             + "\"%topdir%%scriptdir%\\%makelog%\""
-            + " /BUILDDIR:\"%builddir%\" /BUILDTYPE:%cfgbrief%");
+            + " /BUILDDIR:\"%builddir%\" /BUILDTYPE:%cfgbrief%"
+            + " /CONFIG:%config%");
         buildBatchFile.WriteLine("");
         
         buildBatchFile.WriteLine(":nextcfg");
@@ -318,11 +359,14 @@
     }
 }
 
-function generateUpdateBatch(sourcesDir, buildDir, curCfg)
+function generateUpdateBatch(sourcesDir, buildDir)
 {
     try
     {
-        var updateBatchFileName = buildDir + "update.bat";
+        var updateBatchFileName = buildDir + "\\" + "update.bat";
+        if (fso.FileExists(updateBatchFileName))
+            return 1;
+            
         var updateBatchFile = fso.CreateTextFile(updateBatchFileName);
         
         updateBatchFile.WriteLine("@echo off");        
@@ -331,16 +375,18 @@
         
         updateBatchFile.WriteLine("set topdir=" + sourcesDir);
         updateBatchFile.WriteLine("set builddir=" + buildDir);
-        updateBatchFile.WriteLine("set config=" + curCfg);
         updateBatchFile.WriteLine("set scriptdir=etc\\config\\windows");
         updateBatchFile.WriteLine("set cupdate=update.wsf");
         updateBatchFile.WriteLine("");
+        
+        updateBatchFile.WriteLine("set config=%1");
+        updateBatchFile.WriteLine("");
                   
         updateBatchFile.WriteLine("");
         updateBatchFile.WriteLine("cscript /nologo "
             + "\"%topdir%%scriptdir%\\%cupdate%\""
             + " /TOPDIR:\"%topdir%\""
-            + " /BUILDDIR:\"%builddir%\" /CONFIG:%config%");
+            + " /BUILDDIR:\"%builddir%\\%config%\" /CONFIG:%config%");
         updateBatchFile.WriteLine("");
         
         updateBatchFile.WriteLine("echo update complete");

Added: incubator/stdcxx/trunk/etc/config/windows/icc-config.js
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/icc-config.js?rev=358881&view=auto
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/icc-config.js (added)
+++ incubator/stdcxx/trunk/etc/config/windows/icc-config.js Fri Dec 23 15:16:15 2005
@@ -0,0 +1,69 @@
+// ICC solution configuration for configure script
+// not use this for the solution generation
+
+//clone generic solution
+var solutionICC90Cfg = solution.clone();
+solutionICC90Cfg.name = icc90CfgSolutionName;
+configurations.add(icc90CfgSolutionName.name, solutionICC90Cfg);
+configureToolsICC90();
+
+function configureToolsICC90()
+{
+    // ICC compilers
+    var compilerICCRelease = new CompilerICC(compilerWin32);
+    
+    var compilerICCDebug = compilerICCRelease.clone();
+    compilerICCDebug.isDebug = true;
+    
+    compilerICCRelease.optimization = "Size";
+    compilerICCRelease.debugInfoFormat = "PDB";
+    
+    compilerICCDebug.debugInfoFormat = "PDB";
+    
+    var compilerICC90Release = new CompilerICC90(compilerICCRelease);
+    var compilerICC90Debug = new CompilerICC90(compilerICCDebug);
+    
+    // ICC linkers
+    var linkerICCDebug = new LinkerICC(linker);
+    linkerICCDebug.subsystem = "Console";
+    linkerICCDebug.incremental = "No";
+    var linkerICCRelease = linkerICCDebug.clone();
+    linkerICCRelease.optimizeRefs = "Remove";
+    linkerICCRelease.comdatFolding = "Remove";
+
+    // ICC librarian
+    var librarianICC = new LibrarianICC(librarian);
+ 
+    // ICC custom
+    var customICC = new CustomBuildICC();
+    
+    // ICC post build
+    var postICC = new PostBuildICC();
+    
+    // configure projects tools
+    configureToolsConfigure(icc90SolutionName, compilerICC90Debug, 
+        compilerICC90Release, linkerICCDebug, linkerICCRelease, 
+        librarianICC, customICC, postICC);
+        
+    /* not needed in this pseudo-solution
+    configureToolsExamples(icc90SolutionName, compilerICC90Debug, 
+        compilerICC90Release, linkerICCDebug, linkerICCRelease, 
+        librarianICC, customICC, postICC);
+
+    configureToolsTests(icc90SolutionName, compilerICC90Debug, 
+        compilerICC90Release, linkerICCDebug, linkerICCRelease, 
+        librarianICC, customICC, postICC);
+        
+    configureToolsRwTest(icc90SolutionName, compilerICC90Debug, 
+        compilerICC90Release, linkerICCDebug, linkerICCRelease, 
+        librarianICC, customICC, postICC);
+        
+    configureToolsRunExamples(icc90SolutionName, compilerICC90Debug, 
+        compilerICC90Release, linkerICCDebug, linkerICCRelease, 
+        librarianICC, customICC, postICC);
+        
+    configureToolsRunTests(icc90SolutionName, compilerICC90Debug, 
+        compilerICC90Release, linkerICCDebug, linkerICCRelease, 
+        librarianICC, customICC, postICC);
+    */
+}

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

Added: incubator/stdcxx/trunk/etc/config/windows/icc-config_classes.js
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/icc-config_classes.js?rev=358881&view=auto
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/icc-config_classes.js (added)
+++ incubator/stdcxx/trunk/etc/config/windows/icc-config_classes.js Fri Dec 23 15:16:15 2005
@@ -0,0 +1,785 @@
+// file should be included after base_config_classes
+
+// IC compiler, linker and librarian
+
+//------------------------------------------------
+// CompilerICC class
+//------------------------------------------------
+
+// ICC compiler options
+// optimization = Disabled (0, /Od) | Size (1, /O1) | Speed (2, /O2)
+//                  | Full (3, /Ox) (custom is not supported)
+// minimalRebuild = true (TRUE, /Gm)| false (FALSE, "")
+// runtime = 
+//      SingleDebug (5, /MLd) | Single (4, /ML) | MultiDebugDll (3, /MDd)
+//              | MultiDll (2, /MD) | MultiDebug (1, MTd) | Multi (0, /MT)
+// exceptions = true (TRUE, /EHsc) | false (FALSE, "")
+// precompiledHeader = 
+//      Use (3, /Yu) | Auto (2, /YX) | Create (1, /Yc) | No (0, "")
+// pchName = <name of the pchfile>
+// pchBuildFrom = <name of the .h file>
+// warningsLevel = 0 (/W0) | 1 (/W1) | 2 (/W2)| 3 (/W3)| 4 (/W4)
+// debugInfoFormat = Disabled (0, "") | C7 (1, /Z7) | LinesOnly (2, /Zd)
+//                      | PDB (3, /Zi) | EditContinue (4, /ZI)
+// pdbName = <name of pdb file>
+// nologo = true (TRUE, /nologo) | FALSE (FALSE, "")
+
+//.ctor from base compiler
+function CompilerICC(compilerBase)
+{
+    if (!compilerBase)
+    {
+        compilerBase = new Compiler();
+    }
+    compilerBase.cloneTo(this);
+    this.optimization = "Disabled";
+    this.minimalRebuild = true;
+    this.runtime = "MultiDebugDll";
+    this.exceptions = true;
+    this.precompiledHeader = "No";
+    this.pchName = "";
+    this.pchBuildFrom = "";
+    this.warningsLevel = 3;
+    this.debugInfoFormat = "PDB";
+    this.pdbName = "";
+    this.nologo = true;
+
+    this.cloneTo = genericCloneTo;
+    this.clone = genericClone;
+    this.getOutputDir = getOutputDir;
+    this.getIntermDir = getIntermDir;
+    this.getCommandLine = getCommandLineCompilerICC;
+    this.getPreprocessCommandLine = getPreprocessCommandLineCompilerICC;
+}
+
+function getCommandLineCompilerICC()
+{
+    var cmdLine = "icl /c";
+    // nologo
+    if (this.nologo)
+    {
+        cmdLine += " /nologo";
+    }
+    // defines
+    cmdLine += buildOptionsVC(this.defines, "/D");
+    // includes
+    cmdLine += buildOptionsVC(this.includeDirectories, "/I");
+    // warnings
+    cmdLine += " /W" + this.warningsLevel;
+    // exceptions
+    if (this.exceptions)
+    {
+        cmdLine += " /EHsc";
+    }
+    // runtime
+    switch (this.runtime.toUpperCase())
+    {
+    case "MULTI":
+        cmdLine += " /MT";
+        break;
+    case "MULTIDEBUG":
+        cmdLine += " /MTd";
+        break;
+    case "MULTIDLL":
+        cmdLine += " /MD";
+        break;
+    case "MULTIDEBUGDLL":
+        cmdLine += " /MDd";
+        break;
+    case "SINGLE":
+        cmdLine += " /ML";
+        break;
+    default: // SingleDebug
+        cmdLine += " /MLd";
+    }
+    // minimalRebuild
+    if (this.minimalRebuild)
+    {
+        cmdLine += " /Gm";
+    }
+    switch (this.optimization.toUpperCase())
+    {
+    case "FULL":
+        cmdLine += " /Ox";
+        break;
+    case "SPEED":
+        cmdLine += " /O2";
+        break;
+    case "SIZE":
+        cmdLine += " /O1";
+        break;
+    default: // Diasbled
+        cmdLine += " /Od";
+    }
+    /*
+    // outfolder
+    var outDir = this.getOutputDir() + "\\";
+    if (outDir.length > 0)
+    {
+        cmdLine += " /Fo\"" + outDir + "\\\"";
+    }
+    */
+    // outfolder
+    var outDir = this.getIntermDir() + "\\";
+    if (outDir.length > 0)
+    {
+        cmdLine += " /Fo\"" + outDir + "\\\"";
+    }
+    // pch
+    var usePCH = true;
+    switch (this.precompiledHeader.toUpperCase())
+    {
+    case "USE":
+        cmdLine += " /Yu";
+        break;
+    case "AUTO":
+        cmdLine += " /YX";
+        break;
+    case "CREATE":
+        cmdLine += " /Yc";
+        break;
+    default:
+        usePCH = false;
+    }
+    if (usePCH)
+    {
+        if (this.pchBuildFrom.length > 0)
+        {
+            cmdLine += "\"" + this.pchBuildFrom + "\"";
+        }
+        else
+        {
+            cmdLine += "\"stdafx.h\"";
+        }
+        if (this.pchName.length > 0)
+        {
+            cmdLine += " /Fp\"" + outFir + this.pchName + "\"";
+        }
+    }
+    // pdb
+    var usePDB = true;
+    switch (this.debugInfoFormat.toUpperCase())
+    {
+    case "C7":
+        cmdLine += " /Z7";
+        break;
+    case "LINESONLY":
+        cmdLine += " /Zd";
+        break;
+    case "PDB":
+        cmdLine += " /Zi";
+        break;
+    case "EDITCONTINUE":
+        cmdLine += " /ZI";
+        break;
+    default:
+        usePDB = false;
+    }
+    if (usePDB && this.pdbName.length > 0)
+    {
+        cmdLine += " /Fd\"" + outDir + this.pdbName + "\"";
+    }
+    // output
+    if (this.outputFile.length > 0)
+    {
+        cmdLine += " /Fe\"" + outDir + this.outputFile + "\"";
+    }
+    // inputs
+    cmdLine += buildOptionsVC(this.inputFiles, "");
+    return cmdLine;
+}
+
+function writeSolutionSettingsCompilerICC(icproj, outDir)
+{
+    icproj.WriteLine("\t\t\t<Tool")
+    icproj.WriteLine("\t\t\t\tName=\"CppCmplrTool\"");
+    var opt = 0;
+    switch (this.optimization.toUpperCase())
+    {
+    case "SIZE":
+        opt = 1;
+        break;
+    case "SPEED":
+        opt = 2;
+        break;
+    case "FULL":
+        opt = 3;
+        break;
+    default:
+        // leave 0 (Disabled)
+    }
+    icproj.WriteLine("\t\t\t\tOptimization=\"" + opt + "\"");
+    var includesArray = new Array();
+    for (i in this.includeDirectories)
+    {
+        if (!this.includeDirectories[i])
+        {
+            var findex = i.indexOf(varSign);
+            if (findex == 0)
+                includesArray.push(i.substr(varSign.length));
+            else
+                includesArray.push(outDir + i);
+        }
+    }
+    icproj.WriteLine("\t\t\t\tAdditionalIncludeDirectories=\""
+                        + xmlencode(includesArray.join(";")) + "\"");
+    
+    var defsArray = new Array();
+    for (i in this.defines)
+    {
+        if (!this.defines[i])
+        {
+            defsArray.push(i);
+        }
+    }
+    icproj.WriteLine("\t\t\t\tPreprocessorDefinitions=\""
+                    + xmlencode(defsArray.join(";")) + "\"");
+    icproj.WriteLine("\t\t\t\tMinimalRebuild=\""
+                    + this.minimalRebuild.toString().toUpperCase() + "\"");
+    icproj.WriteLine("\t\t\t\tExceptionHandling=\""
+                    + this.exceptions.toString().toUpperCase() + "\"");
+                        
+    //TODO: customize following 2 lines later
+    //icproj.WriteLine("\t\t\t\tBasicRuntimeChecks=\"3\"");
+    icproj.WriteLine("\t\t\t\tDetect64BitPortabilityProblems=\"FALSE\"");
+    
+    icproj.WriteLine("\t\t\t\tSuppressStartupBanner=\""
+                        + this.nologo.toString().toUpperCase() + "\"");
+    
+    var runtime = "0";
+    switch (this.runtime.toUpperCase())
+    {
+        case "SINGLEDEBUG":
+            runtime = "5";
+            break;
+        case "SINGLE":
+            runtime = "4";
+            break;
+        case "MULTIDEBUGDLL":
+            runtime = "3";
+            break;
+        case "MULTIDLL":
+            runtime = "2";
+            break;
+        case "MULTIDEBUG":
+            runtime = "1";
+            break;
+        default:
+            // Multi, 0
+    }
+    icproj.WriteLine("\t\t\t\tRuntimeLibrary=\"" + runtime + "\"");
+    if (this.pchBuildFrom.length > 0)
+    {
+        icproj.WriteLine("\t\t\t\tPrecompiledHeaderThrough=\""
+                            + xmlencode(this.pchBuildFrom) + "\"");
+    }
+    if (this.pchName.length > 0)
+    {
+        icproj.WriteLine("\t\t\t\tPrecompiledHeaderFile=\""
+                            + xmlencode(this.pchName) + "\"");
+    }
+    var usePh = "0";
+    switch (this.precompiledHeader.toUpperCase())
+    {
+    case "USE":
+        usePh = "3";
+        break;
+    case "AUTO":
+        usePh = "2";
+        break;
+    case "CREATE":
+        usePh = "1";
+        break;
+    default:
+        // No, 0        
+    }
+    icproj.WriteLine("\t\t\t\tUsePrecompiledHeader=\"" + usePh + "\"");
+    
+    if (this.pdbName.length > 0)
+    {
+        icproj.WriteLine("\t\t\t\tProgramDataBaseFileName=\""
+            + xmlencode(this.getIntermDir() + "\\" + this.pdbName) + "\"");
+    }
+    
+    icproj.WriteLine("\t\t\t\tWarningLevel=\""
+                        + this.warningsLevel + "\"");
+    var diFormat = "0";
+    switch (this.debugInfoFormat.toUpperCase())
+    {
+        case "C7":
+            diFormat = "1";
+            break;
+        case "LINESONLY":
+            diFormat = "2";
+            break;
+        case "PDB":
+            diFormat = "3";
+            break;
+        case "EDITCONTINUE":
+            diFormat = "4";
+            break;
+        default:
+            // Disabled, 0
+    }   
+    icproj.WriteLine("\t\t\t\tObjectFile=\""
+        + xmlencode(this.getIntermDir() + "\\" + this.outputFile) + "\"");
+
+    icproj.WriteLine(
+        "\t\t\t\tDebugInformationFormat=\"" + diFormat + "\"/>");   
+}
+
+
+function getPreprocessCommandLineCompilerICC()
+{
+    return this.getCommandLine() + " /E";
+}
+
+// compilerICC class methods
+CompilerICC.prototype.cloneTo = genericCloneTo;
+CompilerICC.prototype.clone = genericClone;
+CompilerICC.prototype.getOutputDir = getOutputDir;
+CompilerICC.prototype.getIntermDir = getIntermDir;
+CompilerICC.prototype.getCommandLine = getCommandLineCompilerICC;
+CompilerICC.prototype.getPreprocessCommandLine =
+                        getPreprocessCommandLineCompilerICC;
+CompilerICC.prototype.writeSolutionSettings =
+                        writeSolutionSettingsCompilerICC;
+
+//------------------------------------------------
+// LinkerICC class
+//------------------------------------------------
+
+// ICC linker options
+// incremental = Yes (2, /INCREMENTAL) | 
+//      No (1, /INCREMENTAL:NO) | Default (0, "")
+// debugInfo = true (TRUE, /DEBUG) | false (FALSE, "")
+// pdbFile = <file name w/o directory>
+// subsystem = Default (0, "") | Console (1, /SUBSYSTEM:CONSOLE)
+//              | Windows (2, /SUBSYSTEM:WINDOWS)
+// optimizeRefs = Remove (2, /OPT:REF) | 
+//      Leave (1, /OPT:NOREF) | Default (0, "")
+// comdatFolding = Remove (2, /OPT:ICF) | 
+//      Leave (1, /OPT:NOICF) | Default (0, "")
+// machine = X86 (1, /MACHINE:X86) | Default (0, "")
+// nologo = true (TRUE, /nologo) | FALSE (FALSE, "")
+// isDLL = true (?, /DLL) | false (?, "") 
+//determined by a configuration type in solution!
+
+// .ctor from base linker
+function LinkerICC(linkerBase)
+{
+    if (!linkerBase)
+    {
+        linkerBase = new Linker();
+    }
+    linkerBase.cloneTo(this);
+    this.incremental = "Default";
+    this.debugInfo = true;
+    this.pdbFile = "";
+    this.subsystem = "";
+    this.optimizeRef = "";
+    this.comdatFolding = "";
+    this.machine = "X86";
+    this.nologo = true;
+    this.isDLL = false;
+
+    this.cloneTo = genericCloneTo;
+    this.clone = genericClone;
+    this.getOutputDir = getOutputDir;
+    this.getIntermDir = getIntermDir;
+    this.getCommandLine = getCommandLineLinkerICC;
+}
+
+function getCommandLineLinkerICC()
+{
+    var cmdLine = "xilink -qnoipo";
+    // nologo
+    if (this.nologo)
+    {
+        cmdLine += " /NOLOGO";
+    }
+    if (this.isDLL)
+    {
+        cmdLine += " /DLL";
+    }
+    // machine
+    switch (this.machine.toUpperCase())
+    {
+    case "X86":
+        cmdLine += " /MACHINE:X86";
+        break;
+    default:
+        // do nothing
+    }
+    // comdatFolding
+    switch (this.comdatFolding.toUpperCase())
+    {
+    case "REMOVE":
+        cmdLine += " /OPT:ICF";
+        break;
+    case "LEAVE":
+        cmdLine += " /OPT:NOICF";
+        break;
+    default:
+        // do nothing
+    }
+    // optimizeRef
+    switch (this.optimizeRef.toUpperCase())
+    {
+    case "REMOVE":
+        cmdLine += " /OPT:REF";
+        break;
+    case "LEAVE":
+        cmdLine += " /OPT:NOREF";
+        break;
+    default:
+        // do nothing
+    }
+    // subsystem
+    switch (this.subsystem.toUpperCase())
+    {
+    case "WINDOWS":
+    case "CONSOLE":
+        cmdLine += " /SUBSYSTEM:" + this.subsystem.toUpperCase();
+        break;
+    default:
+        // do nothing
+    }
+    // debug info
+    if (this.debugInfo)
+    {
+        cmdLine += " /DEBUG";
+    }
+    // incremental
+    switch (this.incremental.toUpperCase())
+    {
+    case "YES":
+        cmdLine += " /INCREMENTAL";
+        break;
+    case "NO":
+        cmdLine += " /INCREMENTAL:NO";
+        break;
+    default:
+        // do nothing
+    }
+    // PDB
+    var intDir = this.getIntermDir() + "\\";
+    if (this.pdbFile.length > 0)
+    {
+        cmdLine += " /PDB:\"" + intDir + this.pdbFile + "\"";
+    }
+    // output
+    var outDir = this.getOutputDir() + "\\";
+    if (this.outputFile.length > 0)
+    {
+        cmdLine += " /OUT:\"" + outDir + this.outputFile + "\"";
+    }
+    // inputs
+    cmdLine += buildOptionsVC(this.inputFiles, "");
+    cmdLine += buildOptionsVC(this.libraries, "");
+    return cmdLine;
+}
+
+function writeSolutionSettingsLinkerICC(icproj, outDir)
+{
+    icproj.WriteLine("\t\t\t<Tool")
+    icproj.WriteLine("\t\t\t\tName=\"LinkerTool\"");
+    var inc = "0";
+    switch (this.incremental.toUpperCase())
+    {
+        case "YES":
+            inc = "2";
+            break;
+        case "NO":
+            inc = "1";
+            break;
+        default:        
+            // leave 0
+    }
+    icproj.WriteLine("\t\t\t\tLinkIncremental=\"" + inc + "\"");
+    icproj.WriteLine("\t\t\t\tSuppressStartupBanner=\""
+                        + this.nologo.toString().toUpperCase() + "\"");
+    icproj.WriteLine("\t\t\t\tGenerateDebugInformation=\""
+                        + this.debugInfo.toString().toUpperCase() + "\"");
+    var subsys = "0";
+    switch (this.subsystem.toUpperCase())
+    {
+        case "WINDOWS":
+            subsys = "2";
+            break;
+        case "CONSOLE":
+            subsys = "1";
+            break;
+        default:
+            // leave as it is
+    }
+    icproj.WriteLine("\t\t\t\tSubSystem=\"" + subsys + "\"");
+    var opt = "0";
+    switch (this.optimizeRef.toUpperCase())
+    {
+        case "REMOVE":
+            opt = "2";
+            break;
+        case "LEAVE":
+            opt = "1";
+            break;
+        default:
+            // leave as it is
+    }   
+    icproj.WriteLine("\t\t\t\tOptimizeReferences=\"" + opt + "\"");
+    opt = "0";
+    switch (this.comdatFolding.toUpperCase())
+    {
+        case "REMOVE":
+            opt = "2";
+            break;
+        case "LEAVE":
+            opt = "1";
+            break;
+        default:
+            // leave as it is
+    }   
+    icproj.WriteLine("\t\t\t\tEnableCOMDATFolding=\"" + opt + "\"");
+    icproj.WriteLine("\t\t\t\tTargetMachine=\""
+                        + (this.machine.toUpperCase() == "X86" ?
+                                "1" : "0") + "\""); 
+    if (this.pdbFile.length > 0)
+    {
+        icproj.WriteLine("\t\t\t\tProgramDatabaseFile=\""
+                    + xmlencode(this.getOutputDir() + "\\" + this.pdbFile)
+                    + "\"");
+    }
+    
+    icproj.WriteLine("\t\t\t\tOutputFile=\""
+        + xmlencode(this.getOutputDir() + "\\" + this.outputFile)
+        + "\"/>");
+}
+
+// linkerICC class methods
+LinkerICC.prototype.cloneTo = genericCloneTo;
+LinkerICC.prototype.clone = genericClone;
+LinkerICC.prototype.getOutputDir = getOutputDir;
+LinkerICC.prototype.getIntermDir = getIntermDir;
+LinkerICC.prototype.getCommandLine = getCommandLineLinkerICC;
+LinkerICC.prototype.writeSolutionSettings =
+                    writeSolutionSettingsLinkerICC;
+
+//------------------------------------------------
+// LibrarianICC class
+//------------------------------------------------
+
+// ICC librarian options
+// nologo = true (TRUE, /nologo) | FALSE (FALSE, "")
+
+// .ctor from base librarian
+function LibrarianICC(librarianBase)
+{
+    if (!librarianBase)
+    {
+        librarianBase = new Librarian();
+    }
+    librarianBase.cloneTo(this);
+    this.nologo = true;
+
+    this.cloneTo = genericCloneTo;
+    this.clone = genericClone;
+    this.getOutputDir = getOutputDir;
+    this.getCommandLine = getCommandLineLibrarianICC;
+}
+
+function getCommandLineLibrarianICC()
+{
+    var cmdLine = "xilib";
+    //nologo
+    if (this.nologo)
+    {
+        cmdLine += " /NOLOGO";
+    }
+    //output
+    if (this.outputFile.length > 0)
+    {
+        cmdLine += " /OUT:\"" + this.getOutputDir() + "\\"
+            + this.outputFile + "\"";
+    }
+    //inputs
+    cmdLine += buildOptionsVC(this.inputFiles, "");
+    return cmdLine;
+}
+
+function writeSolutionSettingsLibrarianICC(icproj, outDir)
+{
+    icproj.WriteLine("\t\t\t<Tool")
+    icproj.WriteLine("\t\t\t\tName=\"LibrarianTool\"");
+    icproj.WriteLine("\t\t\t\tOutputFile=\""
+        + xmlencode(this.getOutputDir() + "\\" + this.outputFile)
+        + "\"/>");
+}
+
+// librarianICC class methods
+LibrarianICC.prototype.cloneTo = genericCloneTo;
+LibrarianICC.prototype.clone = genericClone;
+LibrarianICC.prototype.getOutputDir = getOutputDir;
+LibrarianICC.prototype.getIntermDir = getIntermDir;
+LibrarianICC.prototype.getCommandLine = getCommandLineLibrarianICC;
+LibrarianICC.prototype.writeSolutionSettings =
+                        writeSolutionSettingsLibrarianICC;
+
+
+// CustomBuildICC class
+// .ctor from base CustomBuild
+function CustomBuildICC(customBase)
+{
+    if (!customBase)
+    {
+        customBase = new CustomBuild();
+    }
+    customBase.cloneTo(this);
+
+    this.cloneTo = genericCloneTo;
+    this.clone = genericClone;
+}
+
+function writeSolutionSettingsCustomICC(icproj, outDir)
+{
+    icproj.WriteLine("\t\t\t<Tool")
+    icproj.WriteLine("\t\t\t\tName=\"CustomTool\"");
+    icproj.Write("\t\t\t\tCommandLine=\""
+                    + xmlencode(this.command) + "\"");
+    if (this.output.length > 0)
+    {
+        icproj.WriteLine("");
+        icproj.Write("\t\t\t\tOutputs=\"" + this.output + "\"");
+    }
+    var deps = new Array();
+    for (i in this.dependencies)
+    {
+        if (!this.dependencies[i])
+        {
+            deps.push(i);
+        }
+    }
+    if (deps.length > 0)
+    {
+        icproj.WriteLine("");
+        icproj.Write("\t\t\t\tAdditionalDependencies=\""
+                        + deps.join(";") + "\"");
+    }
+    icproj.WriteLine("/>");
+}
+
+CustomBuildICC.prototype.cloneTo = genericCloneTo;
+CustomBuildICC.prototype.clone = genericClone;
+CustomBuildICC.prototype.writeSolutionSettings =
+                            writeSolutionSettingsCustomICC;
+
+// encodes special xml characters
+function xmlencode(str)
+{
+    return str.replace(/\"/g, "&quot;");
+}
+
+//------------------------------------------------
+// FakeLinkerICC class
+// Used in Configure project just to set "Ignore Import library" option
+//------------------------------------------------
+
+// .ctor from base linker
+function FakeLinkerICC()
+{
+    this.base = Tool;
+    this.base(linkerToolName);
+}
+
+function writeSolutionSettingsFakeLinkerICC(icproj, outDir)
+{
+    icproj.WriteLine("\t\t\t<Tool")
+    icproj.WriteLine("\t\t\t\tName=\"LinkerTool\"");
+    icproj.WriteLine("\t\t\t\tIgnoreImportLibrary=\"TRUE\"/>");
+}
+
+// FakeLinkerICC class methods
+FakeLinkerICC.prototype.cloneTo = genericCloneTo;
+FakeLinkerICC.prototype.clone = genericClone;
+FakeLinkerICC.prototype.writeSolutionSettings =
+            writeSolutionSettingsFakeLinkerICC;
+            
+            
+//------------------------------------------------
+// PostBuildICC class
+// Used in Examples projects to copy necessary files
+//------------------------------------------------
+// .ctor from base PostBuild
+function PostBuildICC(postBase)
+{
+    if (!postBase)
+    {
+        postBase = new PostBuild();
+    }
+    postBase.cloneTo(this);
+
+    this.cloneTo = genericCloneTo;
+    this.clone = genericClone;
+}
+
+function writeSolutionSettingsPostBuildICC(icproj, outDir)
+{
+    icproj.WriteLine("\t\t\t<Tool")
+    icproj.WriteLine("\t\t\t\tName=\"PostBuildEventTool\"");
+    icproj.Write("\t\t\t\tCommandLine=\"");
+    for (i in this.commands)
+    {
+        var index = i.indexOf("$");
+        if (index != -1)
+        {
+            icproj.WriteLine(xmlencode(this.commands[i]));
+        }
+    }
+    icproj.Write("\"");
+    icproj.WriteLine("/>");
+}
+
+PostBuildICC.prototype.cloneTo = genericCloneTo;
+PostBuildICC.prototype.clone = genericClone;
+PostBuildICC.prototype.writeSolutionSettings =
+                            writeSolutionSettingsPostBuildICC;
+                            
+                            
+//------------------------------------------------
+// CompilerICC90 class
+//------------------------------------------------
+
+// ICC 9.0 compiler options
+
+// .ctor from base compiler
+function CompilerICC90(compilerICC)
+{
+    if (!compilerICC)
+    {
+        compilerICC = new CompilerICC();
+    }   
+    compilerICC.cloneTo(this);
+    //TODO: add
+    // basicRuntimeChecks
+    // detect64BitProblems = true | false
+    
+    this.cloneTo = genericCloneTo;
+    this.clone = genericClone;  
+    this.getOutputDir = getOutputDir;
+    this.getIntermDir = getIntermDir;
+    //TODO: change this line when new options will be added
+    this.getCommandLine = getCommandLineCompilerICC;
+    this.getPreprocessCommandLine = getPreprocessCommandLineCompilerICC;
+    
+}
+
+//compilerICC90 class methods
+CompilerICC90.prototype.cloneTo = genericCloneTo;
+CompilerICC90.prototype.clone = genericClone;
+CompilerICC90.prototype.getOutputDir = getOutputDir;
+CompilerICC90.prototype.getIntermDir = getIntermDir;
+//TODO: change this line when new options will be added
+CompilerICC90.prototype.getCommandLine = getCommandLineCompilerICC;
+CompilerICC90.prototype.getPreprocessCommandLine =
+    getPreprocessCommandLineCompilerICC;
+CompilerICC90.prototype.writeSolutionSettings =
+                        writeSolutionSettingsCompilerICC;

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

Modified: incubator/stdcxx/trunk/etc/config/windows/makelog.wsf
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/makelog.wsf?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/makelog.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/makelog.wsf Fri Dec 23 15:16:15 2005
@@ -13,14 +13,18 @@
                 required="true" type="string"/>         
             <named helpstring="The build type" name="BUILDTYPE" 
                 required="true" type="string"/>
+            <named helpstring="The configuration" name="CONFIG" 
+                required="true" type="string"/>
             <example>
-        cscript makebuildlog.wsf /BUILDDIR"C:\stdcxx\build" /BUILDTYPE:11d
+cscript makelog.wsf /BUILDDIR"C:\stdcxx\build" /BUILDTYPE:11d /CONFIG:msvc-7.1
             </example>
             <usage>
-Usage: cscript makebuildlog.wsf /BUILDDIR:@BUILDDIR /BUILDTYPE:@BUILDTYPE 
+Usage: cscript makebuildlog.wsf /BUILDDIR:@BUILDDIR 
+/BUILDTYPE:@BUILDTYPE /CONFIG:@CONFIG
 where
 @BUILDDIR is the build directory,
 @BUILDTYPE is the build type (11d, 11s, etc).
+@CONFIG is the configuration (msvc-7.1, icc-9.0, etc).
             </usage>
         </runtime>
         <object id="fso" progid="Scripting.FileSystemObject"/>
@@ -34,13 +38,15 @@
 // Summary build log maker script
 //
 
-var buildDir = ""; // path to the root directory containing executables
-var buildType = ""      // the buid type (11d, 11s, etc)
+var buildDir = "";      // path to the root directory containing executables
+var buildDirBase = "";  // path to the root directory containing executables
+var buildType = "";     // the buid type (11d, 11s, etc)
+var buildCfg = "";      // the build configuration (MSVC-7.1, ICC-9.0, etc)
 
 var buildlogFile = "BuildLog.htm";
 var summaryFileName = "Summary.htm";
 var htmFolderName = "temphtm";
-var buildSummaryPrefix = "vc71-";
+var buildSummaryPrefix = "msvc-7.1-";
 
 var libBuildDir = "src";
 var examplesBuildDir = "examples";
@@ -67,8 +73,9 @@
         buildlogFile, sumTempFileNameTst, htmFolderName, false);
         
     // make build summary log file
-    var fSum = makeSummaryLog(buildDir, buildSummaryPrefix, buildType);
-    var logPath = getSummaryLogPath(buildDir, buildSummaryPrefix, buildType);
+    var fSum = makeSummaryLog(buildDirBase, buildSummaryPrefix, buildType);
+    var logPath = getSummaryLogPath(buildDirBase, 
+        buildSummaryPrefix, buildType);
     
     // read information about library
     var libInfo = new ItemBuildInfo(".stdlib");
@@ -103,7 +110,8 @@
     
     deleteTemporaryFiles();
     
-    WScript.Echo("Summary log was generated in " + logPath);
+    var resLogPath = logPath.replace(/\\/mg, "/");  
+    WScript.Echo("Summary log was generated in file://" + resLogPath);
     
     WScript.Quit(0);
 }
@@ -119,21 +127,24 @@
     }
     
     buildDir =  WScript.Arguments.Named("BUILDDIR");
+    buildDirBase = buildDir;
     
-    if (WScript.Arguments.Named.Exists("BUILDTYPE"))
-        buildType = WScript.Arguments.Named("BUILDTYPE");
-    else
-        buildType = "11d";
-        
-    /*
-    if (!WScript.Arguments.Named.Exists("BUILDTYPE"))
+    if (!WScript.Arguments.Named.Exists("CONFIG"))
     {
         WScript.StdErr.WriteLine(
-            "Generate: Missing required argument BUILDTYPE.");
+            "Generate: Missing required argument CONFIG.");
         WScript.Arguments.ShowUsage();
         WScript.Quit(2);
     }
-    */
+    
+    buildCfg =  WScript.Arguments.Named("CONFIG");
+    buildSummaryPrefix = buildCfg + "-";
+    buildDir = buildDir + "\\" + buildCfg;
+    
+    if (WScript.Arguments.Named.Exists("BUILDTYPE"))
+        buildType = WScript.Arguments.Named("BUILDTYPE");
+    else
+        buildType = "11d";
     
     if (! fso.FolderExists(buildDir))
     {
@@ -145,7 +156,7 @@
 }
 
 function getLibraryBuildInfo(libDir, bType, libInfo)
-{
+{   
     var logDir = libDir + "\\" + bType;
     if (! fso.FolderExists(logDir))
         return;

Modified: incubator/stdcxx/trunk/etc/config/windows/msvc-config.js
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/msvc-config.js?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/msvc-config.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/msvc-config.js Fri Dec 23 15:16:15 2005
@@ -27,17 +27,34 @@
 var varCmdCopyOut = "$$copy_out";
 var varCmdCopyDll = "$$copy_dll";
 
+////////////////////////////////////////////////////////////////////
+// solutions
+
+// VC71 solution configuration
+
 //clone generic solution
 var solutionVC71 = solution.clone();
-solutionVC71.name = "VC71";
-configureToolsVC71();
+solutionVC71.name = vc71SolutionName;
 configurations.add(solutionVC71.name, solutionVC71);
 
+// configure the solution
+configureToolsVC71();
+
+// ICC solution configuration
+
+//clone VC71 solution
+var solutionICC90 = solutionVC71.clone();
+solutionICC90.name = icc90SolutionName;
+configurations.add(solutionICC90.name, solutionICC90);
+
+////////////////////////////////////////////////////////////////////
+// implementation
 
-function configureToolsVC71Configure(
+function configureToolsConfigure (solutionName,
             compilerDebug, compilerRelease, 
             linkerDebug, linkerRelease, 
-            librarianTool, customTool)
+            librarianTool, customTool, 
+            postBuildTool)
 {
     var compilerDebugConfigure = compilerDebug.clone();
     var compilerReleaseConfigure = compilerRelease.clone();
@@ -49,7 +66,15 @@
     compilerDebugConfigure.pdbName = "MSVC.pdb";
     compilerReleaseConfigure.pdbName = "MSVC.pdb";
     
-    var configureProj = solutionVC71.projects.get(projectConfigureName);
+    if (solutionName == icc90SolutionName)
+    {
+        compilerDebugConfigure.pdbName = "ICC.pdb";
+        compilerReleaseConfigure.pdbName = "ICC.pdb";
+    }
+    
+    //var configureProj = solutionVC71.projects.get(projectConfigureName);
+    var solutionCfg = getSolution(solutionName);
+    var configureProj = solutionCfg.projects.get(projectConfigureName);
     var platform = configureProj.platforms.get(platformWin32Name);
     
     // debug static
@@ -145,17 +170,19 @@
     configuration.tools.add(customBuildToolName, customConfigure);
 }
 
-function configureToolsVC71Examples(
+function configureToolsExamples( solutionName,
             compilerDebug, compilerRelease, 
             linkerDebug, linkerRelease, 
-            librarianTool, customTool)
+            librarianTool, customTool,
+            postBuildTool)
 {
     var compilerDebugExamples = compilerDebug.clone();
     var compilerReleaseExamples = compilerRelease.clone();
     var linkerDebugExamples = linkerDebug.clone();
     var linkerReleaseExamples = linkerRelease.clone();
     
-    var postExamplesDll = new PostBuildVC();
+    //var postExamplesDll = new PostBuildVC();
+    var postExamplesDll = postBuildTool.clone();
     postExamplesDll.commands.add(varCmdCopyDll, varCmdCopyDll);
     
     compilerDebugExamples.includeDirectories.add(samplesBaseIncludeDir);
@@ -166,7 +193,9 @@
     compilerReleaseExamples.includeDirectories.add(samplesIncludeDir);
     compilerReleaseExamples.includeDirectories.add(samplesBaseAnsiIncludeDir);
     
-    var examplesProj = solutionVC71.projects.get(projectExamplesName);
+    //var examplesProj = solutionVC71.projects.get(projectExamplesName);
+    var solutionCfg = getSolution(solutionName);
+    var examplesProj = solutionCfg.projects.get(projectExamplesName);
     var platform = examplesProj.platforms.get(platformWin32Name);
   
     // debug static
@@ -279,17 +308,19 @@
 }
 
 
-function configureToolsVC71Tests(
+function configureToolsTests( solutionName,
             compilerDebug, compilerRelease, 
             linkerDebug, linkerRelease, 
-            librarianTool, customTool)
+            librarianTool, customTool,
+            postBuildTool)
 {
     var compilerDebugTests = compilerDebug.clone();
     var compilerReleaseTests = compilerRelease.clone();
     var linkerDebugTests = linkerDebug.clone();
     var linkerReleaseTests = linkerRelease.clone();
     
-    var postTestsDll = new PostBuildVC();
+    //var postTestsDll = new PostBuildVC();
+    var postTestsDll = postBuildTool.clone();
     postTestsDll.commands.add(varCmdCopyDll, varCmdCopyDll);
     
     compilerDebugTests.includeDirectories.add(testsBaseIncludeDir);
@@ -300,7 +331,9 @@
     compilerReleaseTests.includeDirectories.add(testsIncludeDir);
     compilerReleaseTests.includeDirectories.add(testsBaseAnsiIncludeDir);
     
-    var testsProj = solutionVC71.projects.get(projectTestsName);
+    //var testsProj = solutionVC71.projects.get(projectTestsName);
+    var solutionCfg = getSolution(solutionName);
+    var testsProj = solutionCfg.projects.get(projectTestsName);
     var platform = testsProj.platforms.get(platformWin32Name);
   
     // debug static
@@ -417,10 +450,11 @@
 }
 
 
-function configureToolsVC71RwTest(
+function configureToolsRwTest( solutionName,
             compilerDebug, compilerRelease, 
             linkerDebug, linkerRelease, 
-            librarianTool, customTool)
+            librarianTool, customTool,
+            postBuildTool)
 {
     var compilerDebugRwTest = compilerDebug.clone();
     var compilerReleaseRwTest = compilerRelease.clone();
@@ -434,7 +468,9 @@
     compilerReleaseRwTest.includeDirectories.add(includeSecondParentDir);
     compilerReleaseRwTest.includeDirectories.add(includeSecondParentAnsiDir);
     
-    var rwTestProj = solutionVC71.projects.get(projectRwTestName);
+    //var rwTestProj = solutionVC71.projects.get(projectRwTestName);
+    var solutionCfg = getSolution(solutionName);
+    var rwTestProj = solutionCfg.projects.get(projectRwTestName);
     var platform = rwTestProj.platforms.get(platformWin32Name);
     
     librarianRwTest.outputFile = rwTestProj.name + ".lib";
@@ -537,14 +573,17 @@
 }
 
 
-function configureToolsVC71RunExamples(
+function configureToolsRunExamples( solutionName,
             compilerDebug, compilerRelease, 
             linkerDebug, linkerRelease, 
-            librarianTool, customTool)
+            librarianTool, customTool,
+            postBuildTool)
 {
     var customRunEx = customTool.clone();
     
-    var runExProj = solutionVC71.projects.get(projectRunExamplesName);
+    //var runExProj = solutionVC71.projects.get(projectRunExamplesName);
+    var solutionCfg = getSolution(solutionName);
+    var runExProj = solutionCfg.projects.get(projectRunExamplesName);
     var platform = runExProj.platforms.get(platformWin32Name);
   
     // debug static
@@ -589,14 +628,17 @@
 }
 
 
-function configureToolsVC71RunTests(
+function configureToolsRunTests( solutionName,
             compilerDebug, compilerRelease, 
             linkerDebug, linkerRelease, 
-            librarianTool, customTool)
+            librarianTool, customTool,
+            postBuildTool)
 {
     var customRunEx = customTool.clone();
     
-    var runTestsProj = solutionVC71.projects.get(projectRunTestsName);
+    //var runTestsProj = solutionVC71.projects.get(projectRunTestsName);
+    var solutionCfg = getSolution(solutionName);
+    var runTestsProj = solutionCfg.projects.get(projectRunTestsName);
     var platform = runTestsProj.platforms.get(platformWin32Name);
   
     // debug static
@@ -647,7 +689,7 @@
     var compilerVCRelease = new CompilerVC(compilerWin32);
     
     var compilerVCDebug = compilerVCRelease.clone();
-    compilerVCDebug.isDebug =true;
+    compilerVCDebug.isDebug = true;
     
     compilerVCRelease.optimization = "Size";
     compilerVCRelease.debugInfoFormat = "PDB";
@@ -671,24 +713,33 @@
     // VC custom
     var customVC = new CustomBuildVC();
     
+    // VC post build
+    var postVC = new PostBuildVC();
+    
     // configure projects tools
-    configureToolsVC71Configure(compilerVC71Debug, compilerVC71Release,
-        linkerVCDebug, linkerVCRelease, librarianVC, customVC);
-        
-    configureToolsVC71Examples(compilerVC71Debug, compilerVC71Release,
-        linkerVCDebug, linkerVCRelease, librarianVC, customVC);
-
-    configureToolsVC71Tests(compilerVC71Debug, compilerVC71Release,
-        linkerVCDebug, linkerVCRelease, librarianVC, customVC);
-        
-    configureToolsVC71RwTest(compilerVC71Debug, compilerVC71Release,
-        linkerVCDebug, linkerVCRelease, librarianVC, customVC);
-        
-    configureToolsVC71RunExamples(compilerVC71Debug, compilerVC71Release,
-        linkerVCDebug, linkerVCRelease, librarianVC, customVC);
-        
-    configureToolsVC71RunTests(compilerVC71Debug, compilerVC71Release,
-        linkerVCDebug, linkerVCRelease, librarianVC, customVC);
+    configureToolsConfigure(vc71SolutionName, compilerVC71Debug, 
+        compilerVC71Release, linkerVCDebug, linkerVCRelease, 
+        librarianVC, customVC, postVC);
+        
+    configureToolsExamples(vc71SolutionName, compilerVC71Debug, 
+        compilerVC71Release, linkerVCDebug, linkerVCRelease, 
+        librarianVC, customVC, postVC);
+
+    configureToolsTests(vc71SolutionName, compilerVC71Debug, 
+        compilerVC71Release, linkerVCDebug, linkerVCRelease, 
+        librarianVC, customVC, postVC);
+        
+    configureToolsRwTest(vc71SolutionName, compilerVC71Debug, 
+        compilerVC71Release, linkerVCDebug, linkerVCRelease, 
+        librarianVC, customVC, postVC);
+        
+    configureToolsRunExamples(vc71SolutionName, compilerVC71Debug, 
+        compilerVC71Release, linkerVCDebug, linkerVCRelease, 
+        librarianVC, customVC, postVC);
+        
+    configureToolsRunTests(vc71SolutionName, compilerVC71Debug, 
+        compilerVC71Release, linkerVCDebug, linkerVCRelease, 
+        librarianVC, customVC, postVC);
 }
 
 

Modified: incubator/stdcxx/trunk/etc/config/windows/msvc-config_classes.js
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/msvc-config_classes.js?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/msvc-config_classes.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/msvc-config_classes.js Fri Dec 23 15:16:15 2005
@@ -515,6 +515,36 @@
 {
     vcproj.WriteLine("\t\t\t<Tool")
     vcproj.WriteLine("\t\t\t\tName=\"VCLinkerTool\"");
+    
+    // additional libraries, if any
+    var addlibsArray = new Array();
+    for (al in this.libraries)
+    {
+        if (!this.libraries[al])
+        {
+            addlibsArray.push(al);
+        }
+    }
+    if (addlibsArray.length > 0)
+    {
+        vcproj.WriteLine("\t\t\t\tAdditionalDependencies=\""
+                        + xmlencode(addlibsArray.join(" ")) + "\"");
+    }
+    
+    var addlibdirsArray = new Array();
+    for (ald in this.libdirs)
+    {
+        if (!this.libdirs[ald])
+        {
+            addlibdirsArray.push(ald);
+        }
+    }
+    if (addlibdirsArray.length > 0)
+    {
+        vcproj.WriteLine("\t\t\t\tAdditionalLibraryDirectories=\""
+                        + xmlencode(addlibdirsArray.join(";")) + "\"");
+    }
+    
     var inc = "0";
     switch (this.incremental.toUpperCase())
     {

Modified: incubator/stdcxx/trunk/etc/config/windows/runall.wsf
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/runall.wsf?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/runall.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/runall.wsf Fri Dec 23 15:16:15 2005
@@ -194,7 +194,7 @@
             
         // run example
         var runCmd = exeDir + "\\" + exeFileName;
-        WScript.Echo("running1 " + exeFileName);
+        WScript.Echo("running " + exeFileName);
         fileLog.WriteLine("running " + exeFileName);
             
         exRun++;

Modified: incubator/stdcxx/trunk/etc/config/windows/summary.js
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/summary.js?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/summary.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/summary.js Fri Dec 23 15:16:15 2005
@@ -84,9 +84,14 @@
     
     // skip first line in the summary as not needed at all
     var posPrjName = summaryData.indexOf(buildlogFile);
-    posPrjName = summaryData.indexOf("\r\n", posPrjName);
+    var posPrjTmp = posPrjName;
+    posPrjName = summaryData.indexOf(String.fromCharCode(10), posPrjTmp);
     if (-1 == posPrjName)
-        return posStart + summaryData.length;
+    {
+        posPrjName = summaryData.indexOf("\r\n", posPrjTmp);
+        if (-1 == posPrjName)
+            return posStart + summaryData.length;
+    }
         
     var prjSummary = summaryData.substr(posPrjName);
     
@@ -111,6 +116,27 @@
     return posStart + summaryData.length;
 }
 
+function extractTextBlockData(blogData, posTextBlock)
+{
+    var nextTableBlock = blogData.indexOf("<table", posTextBlock);
+    
+    var textData = "";
+    if (nextTableBlock > 0)
+    {
+        textData = 
+            blogData.substr(posTextBlock, nextTableBlock - posTextBlock);
+    }
+    else
+    {
+        textData = blogData.substr(posTextBlock);
+    }
+    
+    var posPreTag = textData.indexOf("<pre", 0);
+    if (-1 == posPreTag)
+        textData = "<pre>" + textData + "</pre>";
+        
+    return textData;
+}
 
 function extractTableData(blogData, posStart)
 {
@@ -118,6 +144,11 @@
     if (-1 == posMainTable)
         return "";
         
+    // check that we have data in table form
+    var posFirstCloseTable = blogData.indexOf("</table>", posStart);
+    if (-1 != posFirstCloseTable && posMainTable - posFirstCloseTable > 20)
+        return extractTextBlockData(blogData, posFirstCloseTable + 8);
+        
     // lookup for the main table close tag 
     var posCloseTag = posMainTable;
     var posOpenTag = posMainTable;
@@ -325,18 +356,18 @@
 
 function getSummaryLogPath(buildDir, buildSummaryPrefix, buildType)
 {
-    var outDir = buildDir + "\\" + buildType;
-    return outDir + "\\" + buildSummaryPrefix + buildType + ".htm";
+    var outDir = buildDir;
+    return outDir + "\\" + buildSummaryPrefix + buildType + ".html";
 }
 
 function makeSummaryLog(buildDir, buildSummaryPrefix, buildType)
 {
-    var outDir = buildDir + "\\" + buildType;
+    var outDir = buildDir;
     if (! fso.FolderExists(outDir))
         fso.CreateFolder(outDir);
         
     var oFolder = fso.GetFolder(outDir);
-    var sumFileName = buildSummaryPrefix + buildType + ".htm";
+    var sumFileName = buildSummaryPrefix + buildType + ".html";
     var fSum = oFolder.CreateTextFile(sumFileName);
     
     fSum.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");

Modified: incubator/stdcxx/trunk/etc/config/windows/update.wsf
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/windows/update.wsf?rev=358881&r1=358880&r2=358881&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/update.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/update.wsf Fri Dec 23 15:16:15 2005
@@ -16,13 +16,13 @@
             <named helpstring="Output directory for modules" 
                 name="BUILDDIR" required="true" type="string"/>
             <example>cscript update.wsf /TOPDIR:"C:\stdcxx" 
-                /BUILDDIR:"C:\stdcxx\build" /CONFIG:VC71
+                /BUILDDIR:"C:\stdcxx\build" /CONFIG:msvc-7.1
             </example>
             <usage>
 Usage: cscript update.wsf /CONFIG:@CONFIG 
 /BUILDDIR:@BUILDDIR [/TOPDIR:@TOPDIR] [BUILDTYPE:@BUILDTYPE]
 where
-@CONFIG is VC71,
+@CONFIG is msvc-7.1 or icc-9.0,
 @TOPDIR - stdcxx main directory,
 @BUILDDIR - output directory for a build.
             </usage>
@@ -52,7 +52,6 @@
 var winconfigDir = "\\etc\\config\\windows";
 
 var buildType = "";
-var tempBuildBatchName = "buildsol.bat";
 
 var description = new update; // run
 
@@ -71,13 +70,13 @@
         
     WScript.Echo("Checking consistence...");
     var logStream;
-    if (fso.FileExists(outDir + currentCfg + logFile))
+    if (fso.FileExists(outDir + logFile))
     {
-        logStream = fso.OpenTextFile(outDir + currentCfg + logFile, 8);
+        logStream = fso.OpenTextFile(outDir + logFile, 8);
     }
     else
     {
-        logStream = fso.CreateTextFile(outDir + currentCfg + logFile, 
+        logStream = fso.CreateTextFile(outDir + logFile, 
             true, false);
     }
 
@@ -101,15 +100,32 @@
     {
             WScript.StdErr.WriteLine(
                 "Generate: Solution with the name "
-                + solution + " does not support IDE project generation");
+                + solution.name + " does not support IDE project generation");
                 
             logStream.WriteLine("Solution with the name "
-                + solution + " does not support IDE project generation");
+                + solution.name + " does not support IDE project generation");
                 
             logStream.Close();
             WScript.Quit(2);        
     }
     
+    if (!solution.checkEnvironment(logStream))
+    {
+            WScript.StdErr.WriteLine(
+                "Generate: Environment for the " + solution.name + 
+                " solution generation is not configured");
+                
+            logStream.WriteLine(
+                "Generate: Environment for the " + solution.name + 
+                " solution generation is not configured");
+                
+            logStream.Close();
+            WScript.Quit(2);   
+    }
+    
+    if (icc90SolutionName == currentCfg)
+        convertSolution(outDir, currentCfg, false);
+    
     //read existing solution file
     WScript.Echo("Reading solution...");
     var slnFileName = outDir + "\\" + currentCfg + ".sln";
@@ -125,14 +141,23 @@
         srcDir, outDir, logStream);
         
     //save solution
+    if (icc90SolutionName == currentCfg)
+        setProjectDependencies(fullSolution, modProjects);
+    
     WScript.Echo("Writing modified projects on disk...");
     saveModifiedProjects(modProjects, srcDir, outDir, logStream);
     
+    if (icc90SolutionName == currentCfg)
+        convertSolution(outDir, currentCfg, true);
+    
     logStream.WriteLine("Solution updated");
     logStream.Close();
     
+    var logPath = outDir + currentCfg + "slnupd.log";
+    var resLogPath = "file://" + logPath.replace(/\\/mg, "/");
+    
     WScript.Echo("Solution was updated successfully. See " 
-                + outDir + currentCfg + "slnupd.log" + " for details.");
+                + resLogPath + " for details.");
     WScript.Quit(0);
 }
 
@@ -201,7 +226,7 @@
         {
             WScript.StdErr.WriteLine(
                 "Update: Unable to read destination folder "
-                + srcDir);
+                + outDir);
             WScript.Quit(2);
         }
     }
@@ -252,6 +277,15 @@
         generateVCPROJ(modProjects[i], srcDir, outDir);
         
         logStream.WriteLine(modProjects[i].name + " saved");
+    }
+}
+
+function setProjectDependencies(fullSolution, modProjects)
+{
+    for(var i = 0; i < modProjects.length; i++)
+    {      
+        setProjectAdditionalDependencies(fullSolution, 
+            outDir, modProjects[i]);
     }
 }
 



Mime
View raw message