stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r548779 - /incubator/stdcxx/trunk/etc/config/windows/configure.wsf
Date Tue, 19 Jun 2007 16:00:41 GMT
Author: faridz
Date: Tue Jun 19 09:00:40 2007
New Revision: 548779

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

	* configure.wsf (cleanQuit): New function to clean and quit.
	(configure): Use cleanQuit() instead of WScript.Quit().

Modified:
    incubator/stdcxx/trunk/etc/config/windows/configure.wsf

Modified: incubator/stdcxx/trunk/etc/config/windows/configure.wsf
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/configure.wsf?view=diff&rev=548779&r1=548778&r2=548779
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/configure.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/configure.wsf Tue Jun 19 09:00:40 2007
@@ -79,6 +79,27 @@
 
 var description = new configure; // run
 
+// clean tests folder
+// print msg to the StdErr, if specified
+// quit with exitcode
+function cleanQuit(exitcode, msg)
+{
+    // clean Tests folder
+    if (fso.FolderExists(stageDir))
+    {
+        try
+        {
+            fso.DeleteFolder(stageDir, true);
+        }
+        catch (e) { }
+    }
+
+    if (typeof(msg) != "undefined")
+        WScript.StdErr.WriteLine(msg);
+
+    WScript.Quit(exitcode);
+}
+
 // the main function of the script
 function configure()
 {
@@ -231,13 +252,11 @@
                " /NODEFAULTLIB:libcpmt /NODEFAULTLIB:libcpmtd" +
                " /NODEFAULTLIB:msvcprt /NODEFAULTLIB:msvcprtd";
 
+    var exitmsg = "You may see log here: " + logFileNameURI;
+
     // sanity check
     if (0 == checkSanity())
-    {
-        WScript.StdErr.WriteLine(
-            "You may see log here: " + logFileNameURI);
-        WScript.Quit(1);
-    }
+        cleanQuit(1, exitmsg);
         
     // check architecture
     checkArchitecture();
@@ -247,22 +266,14 @@
 
     // compile .lib.cpp s
     if (0 == compileLibs(confInfo.dll))
-    {
-        WScript.StdErr.WriteLine(
-            "You may see log here: " + logFileNameURI);
-        WScript.Quit(1);
-    }
+        cleanQuit(1, exitmsg);
     
     // compile, link and run .cpp's (if possible)
     if (0 == runExeTests())
-    {
-        WScript.StdErr.WriteLine(
-            "You may see log here: " + logFileNameURI);
-        WScript.Quit(1);
-    }
+        cleanQuit(1, exitmsg);
     
-    fso.MoveFile(stageFile , configFile);
-    WScript.Quit(0);
+    fso.MoveFile(stageFile, configFile);
+    cleanQuit(0);
 }
 
 // performs compiler and linker sanity checks



Mime
View raw message