pajoye Mon Jul 7 13:48:23 2008 UTC
Modified files:
/php-src/win32/build config.w32 confutils.js
Log:
- move common functions to confutil
- MFB: allow to disable the summary (and move test in the function)
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32?r1=1.74&r2=1.75&diff_format=u
Index: php-src/win32/build/config.w32
diff -u php-src/win32/build/config.w32:1.74 php-src/win32/build/config.w32:1.75
--- php-src/win32/build/config.w32:1.74 Sun Jul 6 09:56:01 2008
+++ php-src/win32/build/config.w32 Mon Jul 7 13:48:23 2008
@@ -1,5 +1,5 @@
// vim:ft=javascript
-// $Id: config.w32,v 1.74 2008/07/06 09:56:01 pajoye Exp $
+// $Id: config.w32,v 1.75 2008/07/07 13:48:23 pajoye Exp $
// "Master" config file; think of it as a configure.in
// equivalent.
@@ -8,38 +8,16 @@
if (!CL) {
ERROR("MS C++ compiler is required");
}
-// Which version of the compiler do we have ?
-function probe_binary(EXE, what)
-{
- // tricky escapes to get stderr redirection to work
- var command = 'cmd /c ""' + EXE;
- if (what == "version") {
- command = command + '" -v"';
- }
- var version = execute(command + '" 2>&1"');
-
- if (what == "64") {
- if (version.match(/x64/)) {
- return 1;
- }
- } else {
- if (version.match(/(\d+\.\d+(\.\d+)?(\.\d+)?)/)) {
- return RegExp.$1;
- }
- }
- return 0;
-}
-
-// Which version of the compiler do we have?
-VCVERS = probe_binary(CL);
-VCVERS = VCVERS.substr(0, 2) + VCVERS.substr(3, 2);
-STDOUT.WriteLine("Detected MS compiler version " + VCVERS);
// 1200 is VC6
// 1300 is vs.net 2002
// 1310 is vs.net 2003
// 1400 is vs.net 2005
// 1500 is vs.net 2008
+// Which version of the compiler do we have?
+VCVERS = probe_binary(CL).substr(0, 5).replace('.', '');
+STDOUT.WriteLine(" Detected compiler " + VC_VERSIONS[VCVERS]);
+AC_DEFINE('COMPILER', VC_VERSIONS[VCVERS], "Detected compiler version");
// do we use x64 or 80x86 version of compiler?
X64 = probe_binary(CL, 64);
@@ -402,3 +380,5 @@
}
DEFINE('SNAPSHOT_TEMPLATE', PHP_SNAPSHOT_TEMPLATE);
+
+ARG_ENABLE('summary', 'Enable configuration summary', 'yes');
http://cvs.php.net/viewvc.cgi/php-src/win32/build/confutils.js?r1=1.75&r2=1.76&diff_format=u
Index: php-src/win32/build/confutils.js
diff -u php-src/win32/build/confutils.js:1.75
php-src/win32/build/confutils.js:1.76
--- php-src/win32/build/confutils.js:1.75 Sat Jul 5 19:52:45 2008
+++ php-src/win32/build/confutils.js Mon Jul 7 13:48:23 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-// $Id: confutils.js,v 1.75 2008/07/05 19:52:45 pajoye Exp $
+// $Id: confutils.js,v 1.76 2008/07/07 13:48:23 pajoye Exp $
var STDOUT = WScript.StdOut;
var STDERR = WScript.StdErr;
@@ -31,11 +31,11 @@
var sapi_enabled = new Array();
var VC_VERSIONS = new Array();
-VC_VERSIONS[1200] = 'VC6';
-VC_VERSIONS[1300] = 'Visual C++ 2002';
-VC_VERSIONS[1310] = 'Visual C++ 2003';
-VC_VERSIONS[1400] = 'Visual C++ 2005';
-VC_VERSIONS[1500] = 'Visual C++ 2008';
+VC_VERSIONS[1200] = 'MSVC6 (Visual C++ 6.0)';
+VC_VERSIONS[1300] = 'MSVC7 (Visual C++ 2002)';
+VC_VERSIONS[1310] = 'MSVC7.1 (Visual C++ 2003)';
+VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)';
+VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)';
if (PROGRAM_FILES == null) {
PROGRAM_FILES = "C:\\Program Files";
@@ -108,6 +108,27 @@
return ret;
}
+function probe_binary(EXE, what)
+{
+ // tricky escapes to get stderr redirection to work
+ var command = 'cmd /c ""' + EXE;
+ if (what == "version") {
+ command = command + '" -v"';
+ }
+ var version = execute(command + '" 2>&1"');
+
+ if (what == "64") {
+ if (version.match(/x64/)) {
+ return 1;
+ }
+ } else {
+ if (version.match(/(\d+\.\d+(\.\d+)?(\.\d+)?)/)) {
+ return RegExp.$1;
+ }
+ }
+ return 0;
+}
+
function condense_path(path)
{
path = FSO.GetAbsolutePathName(path);
@@ -1376,6 +1397,9 @@
function write_summary()
{
var ar = new Array();
+ if (PHP_SUMMARY == "no") {
+ return;
+ }
STDOUT.WriteBlankLines(2);
@@ -1426,7 +1450,6 @@
generate_config_h();
STDOUT.WriteLine("Done.");
STDOUT.WriteBlankLines(1);
-
write_summary();
if (PHP_SNAPSHOT_BUILD != "no") {
@@ -1732,7 +1755,6 @@
return items;
}
-
// for snapshot builders, this option will attempt to enable everything
// and you can then build everything, ignoring fatal errors within a module
// by running "nmake snap"
@@ -1743,5 +1765,3 @@
// several objects at once, reducing overhead of starting new
// compiler processes.
ARG_ENABLE('one-shot', 'Optimize for fast build - best for release and
snapshot builders, not so hot for edit-and-rebuild hacking', 'no');
-
-
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php