\r
clean-all:\r
@echo Cleaning standard build dirs\r
+ cd $(BUILD_DIR)\r
@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @rd /s /q %D\r
-@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\r
\r
clean: clean-pecl\r
@echo Cleaning distribution build dirs\r
+ cd $(BUILD_DIR)\r
@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @del /F /Q %D\*.* > NUL\r
-@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\r
\r
* 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");
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;
}