com php-src: fix nmake clean in phpize mode: win32/build/Makefile.phpize win32/build/confutils.js
| From: | Anatol Belski | Date: | Mon, 29 Feb 2016 13:58:49 +0000 |
| Subject: | com php-src: fix nmake clean in phpize mode: win32/build/Makefile.phpize win32/build/confutils.js | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91206@lists.php.net to get a copy of this message | ||
Commit: 273bb7e9c0f8c303f102e763eb672267f23392d6
Author: Anatol Belski <ab@php.net> Mon, 29 Feb 2016 10:58:56 +0100
Parents: 6adfc20f04d3d3d4a0e85896b1651f8613a790c3
Branches: PHP-7.0.4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=273bb7e9c0f8c303f102e763eb672267f23392d6
Log:
fix nmake clean in phpize mode
Changed paths:
M win32/build/Makefile.phpize
M win32/build/confutils.js
Diff:
diff --git a/win32/build/Makefile.phpize b/win32/build/Makefile.phpize
index 1f92f77..cd74336 100644
--- a/win32/build/Makefile.phpize
+++ b/win32/build/Makefile.phpize
@@ -18,11 +18,13 @@ clean-pecl:
clean-all:
@echo Cleaning standard build dirs
+ cd $(BUILD_DIR)
@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @rd /s /q %D
-@del /f /q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.manifest $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk
$(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\*.rc $(BUILD_DIR)\*.dbg
$(BUILD_DIR)\*.bin $(BUILD_DIR)\php*.dll $(BUILD_DIR)\php*.exe > NUL
clean: clean-pecl
@echo Cleaning distribution build dirs
+ cd $(BUILD_DIR)
@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @del /F /Q %D\*.* > NUL
-@del /F /Q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb
$(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\php-$(PHP_VERSION_STRING)-Win32.zip
$(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)-Win32.zip > NUL
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index c8e03a4..95f7985 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -1472,10 +1472,16 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
* is not a problem as buildconf only checks for pecl
* as either a child or a sibling */
if (obj_dir == null) {
- var build_dir = (dirname ? (dir + "\\" + dirname) : dir).replace(new
RegExp("^..\\\\"), "");
+ if (MODE_PHPIZE) {
+ /* In the phpize mode, the subdirs are always relative to BUID_DIR.
+ No need to differentiate by extension, only one gets built. */
+ var build_dir = (dirname ? dirname : "").replace(new RegExp("^..\\\\"),
"");
+ } else {
+ var build_dir = (dirname ? (dir + "\\" + dirname) : dir).replace(new
RegExp("^..\\\\"), "");
+ }
}
else {
- var build_dir = obj_dir.replace(new RegExp("^..\\\\"), "");
+ var build_dir = (dirname ? obj_dir + "\\" + dirname : obj_dir).replace(new
RegExp("^..\\\\"), "");
}
obj = sub_build + build_dir + "\\" + filename.replace(re, ".obj");
@@ -2141,7 +2147,16 @@ function ADD_FLAG(name, flags, target)
if (configure_subst.Exists(name)) {
var curr_flags = configure_subst.Item(name);
- if (curr_flags.indexOf(flags) >= 0) {
+ /* Prefix with a space, thus making sure the
+ current flag is not a substring of some
+ other. It's still not a complete check if
+ some flags with spaces got added.
+
+ TODO rework to use an array, so direct
+ match can be done. This will also
+ help to normalize flags and to not
+ to insert duplicates. */
+ if (curr_flags.indexOf(" " + flags) >= 0) {
return;
}