com php-src: refactor zts related config: win32/build/config.w32 win32/build/config.w32.phpize.in win32/build/confutils.js

From: Date: Tue, 11 Nov 2014 17:24:19 +0000
Subject: com php-src: refactor zts related config: win32/build/config.w32 win32/build/config.w32.phpize.in win32/build/confutils.js
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83023@lists.php.net to get a copy of this message
Commit: c0db5cd93d8ce040a71eb883650723107c562e43 Author: Anatol Belski <ab@php.net> Tue, 11 Nov 2014 15:22:06 +0100 Parents: 3e8975bc95767630a050702494fa3e6b46f5c3ba Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c0db5cd93d8ce040a71eb883650723107c562e43 Log: refactor zts related config Changed paths: M win32/build/config.w32 M win32/build/config.w32.phpize.in M win32/build/confutils.js Diff: diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 85a96f1..8e63fc8 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -87,33 +87,7 @@ toolset_setup_common_libs(); // Set some debug/release specific options toolset_setup_build_mode(); -if (PHP_ZTS == "yes") { - ADD_FLAG("CFLAGS", "/D ZTS=1"); - ADD_FLAG("ZTS", "1"); -} else { - ADD_FLAG("ZTS", "0"); -} - -DEFINE("PHP_ZTS_ARCHIVE_POSTFIX", PHP_ZTS == "yes" ? '' : "-nts"); - -// set up the build dir and DLL name -if (PHP_DEBUG == "yes" && PHP_ZTS == "yes") { - DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Debug_TS"); - DEFINE("PHPDLL", "php" + PHP_VERSION + "ts_debug.dll"); - DEFINE("PHPLIB", "php" + PHP_VERSION + "ts_debug.lib"); -} else if (PHP_DEBUG == "yes" && PHP_ZTS == "no") { - DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Debug"); - DEFINE("PHPDLL", "php" + PHP_VERSION + "_debug.dll"); - DEFINE("PHPLIB", "php" + PHP_VERSION + "_debug.lib"); -} else if (PHP_DEBUG == "no" && PHP_ZTS == "yes") { - DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Release_TS"); - DEFINE("PHPDLL", "php" + PHP_VERSION + "ts.dll"); - DEFINE("PHPLIB", "php" + PHP_VERSION + "ts.lib"); -} else if (PHP_DEBUG == "no" && PHP_ZTS == "no") { - DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Release"); - DEFINE("PHPDLL", "php" + PHP_VERSION + ".dll"); - DEFINE("PHPLIB", "php" + PHP_VERSION + ".lib"); -} +setup_zts_stuff(); // CFLAGS, LDFLAGS and BUILD_DIR are defined // Add compiler and link flags if PGO options are selected diff --git a/win32/build/config..w32.phpize.in b/win32/build/config.w32.phpize.in index 52947c1..a82369a 100644 --- a/win32/build/config.w32.phpize.in +++ b/win32/build/config.w32.phpize.in @@ -77,38 +77,7 @@ toolset_setup_common_libs(); // Set some debug/release specific options toolset_setup_build_mode(); -if (PHP_ZTS == "yes") { - ADD_FLAG("CFLAGS", "/D ZTS=1"); -} - -DEFINE("PHP_ZTS_ARCHIVE_POSTFIX", PHP_ZTS == "yes" ? '' : "-nts"); - -// set up the build dir and DLL name -if (PHP_DEBUG == "yes" && PHP_ZTS == "yes") { - DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Debug_TS"); - if (!MODE_PHPIZE) { - DEFINE("PHPDLL", "php" + PHP_VERSION + "ts_debug.dll"); - DEFINE("PHPLIB", "php" + PHP_VERSION + "ts_debug.lib"); - } -} else if (PHP_DEBUG == "yes" && PHP_ZTS == "no") { - DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Debug"); - if (!MODE_PHPIZE) { - DEFINE("PHPDLL", "php" + PHP_VERSION + "_debug.dll"); - DEFINE("PHPLIB", "php" + PHP_VERSION + "_debug.lib"); - } -} else if (PHP_DEBUG == "no" && PHP_ZTS == "yes") { - DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Release_TS"); - if (!MODE_PHPIZE) { - DEFINE("PHPDLL", "php" + PHP_VERSION + "ts.dll"); - DEFINE("PHPLIB", "php" + PHP_VERSION + "ts.lib"); - } -} else if (PHP_DEBUG == "no" && PHP_ZTS == "no") { - DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Release"); - if (!MODE_PHPIZE) { - DEFINE("PHPDLL", "php" + PHP_VERSION + ".dll"); - DEFINE("PHPLIB", "php" + PHP_VERSION + ".lib"); - } -} +setup_zts_stuff(); if (MODE_PHPIZE) { DEFINE("PHPDLL", PHP_DLL); diff --git a/win32/build/confutils.js b/win32/build/confutils.js index c7e8c11..da2ffc6 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2640,3 +2640,42 @@ function object_out_dir_option_handle() } } +function setup_zts_stuff() +{ + if (PHP_ZTS == "yes") { + ADD_FLAG("CFLAGS", "/D ZTS=1"); + ADD_FLAG("ZTS", "1"); + } else { + ADD_FLAG("ZTS", "0"); + } + + DEFINE("PHP_ZTS_ARCHIVE_POSTFIX", PHP_ZTS == "yes" ? '' : "-nts"); + + // set up the build dir and DLL name + if (PHP_DEBUG == "yes" && PHP_ZTS == "yes") { + DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Debug_TS"); + if (!MODE_PHPIZE) { + DEFINE("PHPDLL", "php" + PHP_VERSION + "ts_debug.dll"); + DEFINE("PHPLIB", "php" + PHP_VERSION + "ts_debug.lib"); + } + } else if (PHP_DEBUG == "yes" && PHP_ZTS == "no") { + DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Debug"); + if (!MODE_PHPIZE) { + DEFINE("PHPDLL", "php" + PHP_VERSION + "_debug.dll"); + DEFINE("PHPLIB", "php" + PHP_VERSION + "_debug.lib"); + } + } else if (PHP_DEBUG == "no" && PHP_ZTS == "yes") { + DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Release_TS"); + if (!MODE_PHPIZE) { + DEFINE("PHPDLL", "php" + PHP_VERSION + "ts.dll"); + DEFINE("PHPLIB", "php" + PHP_VERSION + "ts.lib"); + } + } else if (PHP_DEBUG == "no" && PHP_ZTS == "no") { + DEFINE("BUILD_DIR", PHP_OBJECT_OUT_DIR + "Release"); + if (!MODE_PHPIZE) { + DEFINE("PHPDLL", "php" + PHP_VERSION + ".dll"); + DEFINE("PHPLIB", "php" + PHP_VERSION + ".lib"); + } + } +} +

« previous php.cvs (#83023) next »