stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r573571 - in /incubator/stdcxx/trunk: etc/config/windows/filterdef.js etc/config/windows/projectdef.js etc/config/windows/projects.js src/atomic.asm src/i86/atomic.asm src/i86/atomic.inc src/i86_64/atomic.asm src/i86_64/atomic.inc
Date Fri, 07 Sep 2007 13:19:17 GMT
Author: faridz
Date: Fri Sep  7 06:19:16 2007
New Revision: 573571

URL: http://svn.apache.org/viewvc?rev=573571&view=rev
Log:
2007-09-07 Farid Zaripov <Farid_Zaripov@epam.com>

	* src/atomic.asm: New file to define __rw_atomicxxx() functions.
	* i86/atomic.asm: File renamed ...
	* i86/atomic.inc: ... to this.
	* i86_64/atomic.asm: File renamed ...
	* i86_64/atomic.inc: ... to this.
	* projects.js (CreateProjectsDefs): Removed platform dependent files array.
	* projectdef.js: InitAsmTool() function moved ...
	* filterdef.js: ... to this. Removed platform dependent files processing.

Added:
    incubator/stdcxx/trunk/src/atomic.asm   (with props)
    incubator/stdcxx/trunk/src/i86/atomic.inc
      - copied, changed from r573534, incubator/stdcxx/trunk/src/i86/atomic.asm
    incubator/stdcxx/trunk/src/i86_64/atomic.inc
      - copied, changed from r573534, incubator/stdcxx/trunk/src/i86_64/atomic.asm
Removed:
    incubator/stdcxx/trunk/src/i86/atomic.asm
    incubator/stdcxx/trunk/src/i86_64/atomic.asm
Modified:
    incubator/stdcxx/trunk/etc/config/windows/filterdef.js
    incubator/stdcxx/trunk/etc/config/windows/projectdef.js
    incubator/stdcxx/trunk/etc/config/windows/projects.js

Modified: incubator/stdcxx/trunk/etc/config/windows/filterdef.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/filterdef.js?rev=573571&r1=573570&r2=573571&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/filterdef.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/filterdef.js Fri Sep  7 06:19:16 2007
@@ -56,23 +56,30 @@
     return str;
 }
 
-//------------------------------------------------
-// CustomFileDef class
-//------------------------------------------------
+// common macros
+var cmnMacros = new Array();
 
-// CustomFileDef .ctor
-function CustomFileDef(filepath, platform, initfun)
+// init custom build rule for .asm files
+function InitAsmTool(VCFile)
 {
-    this.filepath = filepath;
-    this.platform = platform;
-    this.initfun  = initfun;
-}
-
-// global array with platform dependent files definitions
-var customFileDefs = new Array();
+    var cfgs = VCFile.FileConfigurations;
+    for (var i = 1; i <= cfgs.Count; ++i)
+    {
+        var cfg = cfgs.Item(i);
+        if ((typeof(cfg.Tool.ToolKind) != "undefined" &&
+            cfg.Tool.ToolKind != "VCCustomBuildTool") ||
+            cfg.Tool.ToolName != "Custom Build Tool")
+        {
+            cfg.Tool = cfg.ProjectConfiguration.FileTools.Item("VCCustomBuildTool");
+        }
 
-// common macros
-var cmnMacros = new Array();
+        var tool = cfg.Tool;
+        tool.Description = "Compiling .asm file...";
+        tool.Outputs = "$(IntDir)\\$(InputName).obj";
+        tool.CommandLine = AS + " /c /nologo /D" + PLATFORM + " /Fo" + tool.Outputs +
+                           " /W3 /Zi /Ta" + VCFile.RelativePath;
+    }
+}
 
 //------------------------------------------------
 // FilterDef class
@@ -144,26 +151,6 @@
 
     var customFileDef = null;
 
-    if (!exclude)
-    {
-        // find the platform dependent file definition
-        for (var i = 0; i < customFileDefs.length; ++i)
-        {
-            var custFileDef = customFileDefs[i];
-            var pos = VCFile.FullPath.length - custFileDef.filepath.length;
-            if (0 <= pos && pos == VCFile.FullPath.indexOf(custFileDef.filepath))
-            {
-                customFileDef = custFileDef;
-                break;
-            }
-        }
-
-        // exclude this file from build if current platform
-        // is not custom file target platform
-        if (null != customFileDef && customFileDef.platform != PLATFORM)
-            exclude = true;
-    }
-    
     if (exclude)
     {
         var cfgs = VCFile.FileConfigurations;
@@ -181,12 +168,8 @@
             cfg.ExcludedFromBuild = exclude;
         }
     }
-    else if (null != customFileDef &&
-             "undefined" != typeof(customFileDef.initfun))
-    {
-        // init
-        customFileDef.initfun(VCFile);
-    }
+    else if (".asm" == VCFile.Extension)
+        InitAsmTool(VCFile);
 }
 
 // create VCFilter object from the FilterDef definition

Modified: incubator/stdcxx/trunk/etc/config/windows/projectdef.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projectdef.js?rev=573571&r1=573570&r2=573571&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/projectdef.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/projectdef.js Fri Sep  7 06:19:16 2007
@@ -945,25 +945,3 @@
 
     return projectDef;
 }
-
-// init custom build rule for .asm files
-function InitAsmTool(VCFile)
-{
-    var cfgs = VCFile.FileConfigurations;
-    for (var i = 1; i <= cfgs.Count; ++i)
-    {
-        var cfg = cfgs.Item(i);
-        if ((typeof(cfg.Tool.ToolKind) != "undefined" &&
-            cfg.Tool.ToolKind != "VCCustomBuildTool") ||
-            cfg.Tool.ToolName != "Custom Build Tool")
-        {
-            cfg.Tool = cfg.ProjectConfiguration.FileTools.Item("VCCustomBuildTool");
-        }
-
-        var tool = cfg.Tool;
-        tool.Description = "Compiling .asm file...";
-        tool.Outputs = "$(IntDir)\\$(InputName).obj";
-        tool.CommandLine = AS + " /c /nologo /Fo" + tool.Outputs +
-                           " /W3 /Zi /Ta" + VCFile.RelativePath;
-    }
-}

Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?rev=573571&r1=573570&r2=573571&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/projects.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/projects.js Fri Sep  7 06:19:16 2007
@@ -85,14 +85,10 @@
     projectDefs.push(new Array(configureDef));
 
 ///////////////////////////////////////////////////////////////////////////////
-    // add platform dependent files
-    customFileDefs.push(new CustomFileDef("i86\\atomic.asm", "Win32", InitAsmTool));
-    customFileDefs.push(new CustomFileDef("i86_64\\atomic.asm", "x64", InitAsmTool));
-
     var stdcxxDef = new ProjectDef(".stdcxx", typeLibrary);
     stdcxxDef.VCProjDir = ProjectsDir;
     stdcxxDef.FilterDefs.push(
-        new FilterDef(sourceFilterName, sourceFilterUuid, sourceFilterExts, eFileTypeCppCode,
false).
+        new FilterDef(sourceFilterName, sourceFilterUuid, sourceFilterExts + ";.inc", eFileTypeCppCode,
false).
             addFilesByMask("%SRCDIR%\\src", rxExcludedFolders, null));
     stdcxxDef.FilterDefs.push(
         new FilterDef(headerFilterName, headerFilterUuid, headerFilterExts, eFileTypeCppHeader,
true).

Added: incubator/stdcxx/trunk/src/atomic.asm
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/atomic.asm?rev=573571&view=auto
==============================================================================
--- incubator/stdcxx/trunk/src/atomic.asm (added)
+++ incubator/stdcxx/trunk/src/atomic.asm Fri Sep  7 06:19:16 2007
@@ -0,0 +1,36 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+; atomic.asm
+;
+; $Id$
+;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+; Licensed to the Apache Software  Foundation (ASF) under one or more
+; contributor  license agreements.  See  the NOTICE  file distributed
+; with  this  work  for  additional information  regarding  copyright
+; ownership.   The ASF  licenses this  file to  you under  the Apache
+; License, Version  2.0 (the  "License"); you may  not use  this file
+; except in  compliance with the License.   You may obtain  a copy of
+; the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the  License is distributed on an  "AS IS" BASIS,
+; WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+; implied.   See  the License  for  the  specific language  governing
+; permissions and limitations under the License.
+;
+; Copyright 2003-2006 Rogue Wave Software.
+; 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+ifdef Win32
+  include <i86/atomic.inc>
+elseifdef x64
+  include <i86_64/atomic.inc>
+endif
+
+end

Propchange: incubator/stdcxx/trunk/src/atomic.asm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/src/atomic.asm
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/stdcxx/trunk/src/i86/atomic.inc (from r573534, incubator/stdcxx/trunk/src/i86/atomic.asm)
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/i86/atomic.inc?p2=incubator/stdcxx/trunk/src/i86/atomic.inc&p1=incubator/stdcxx/trunk/src/i86/atomic.asm&r1=573534&r2=573571&rev=573571&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/i86/atomic.asm (original)
+++ incubator/stdcxx/trunk/src/i86/atomic.inc Fri Sep  7 06:19:16 2007
@@ -1,6 +1,6 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;
-; i86/atomic.asm
+; i86/atomic.inc
 ;
 ; $Id$
 ;
@@ -174,5 +174,3 @@
                 add     eax, edx             ; return %eax + inc        
                 ret
 ___rw_atomic_add32 endp
-
-                end

Copied: incubator/stdcxx/trunk/src/i86_64/atomic.inc (from r573534, incubator/stdcxx/trunk/src/i86_64/atomic.asm)
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/i86_64/atomic.inc?p2=incubator/stdcxx/trunk/src/i86_64/atomic.inc&p1=incubator/stdcxx/trunk/src/i86_64/atomic.asm&r1=573534&r2=573571&rev=573571&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/i86_64/atomic.asm (original)
+++ incubator/stdcxx/trunk/src/i86_64/atomic.inc Fri Sep  7 06:19:16 2007
@@ -1,6 +1,6 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;
-; i86_64/atomic.asm
+; i86_64/atomic.inc
 ;
 ; $Id$
 ;
@@ -182,5 +182,3 @@
                 add     rax, rdx          ; return %eax + inc
                 ret
 __rw_atomic_add64 endp
-
-                end



Mime
View raw message