Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 94392 invoked from network); 19 Jun 2007 16:01:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2007 16:01:02 -0000 Received: (qmail 44878 invoked by uid 500); 19 Jun 2007 16:01:06 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 44862 invoked by uid 500); 19 Jun 2007 16:01:06 -0000 Mailing-List: contact stdcxx-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-commits@incubator.apache.org Received: (qmail 44847 invoked by uid 99); 19 Jun 2007 16:01:05 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 09:01:05 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 09:01:01 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 668FB1A981A; Tue, 19 Jun 2007 09:00:41 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r548779 - /incubator/stdcxx/trunk/etc/config/windows/configure.wsf Date: Tue, 19 Jun 2007 16:00:41 -0000 To: stdcxx-commits@incubator.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070619160041.668FB1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 * 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