@@ -1472,10 +1472,16 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
1472
1472
* is not a problem as buildconf only checks for pecl
1473
1473
* as either a child or a sibling */
1474
1474
if ( obj_dir == null ) {
1475
- var build_dir = ( dirname ? ( dir + "\\" + dirname ) : dir ) . replace ( new RegExp ( "^..\\\\" ) , "" ) ;
1475
+ if ( MODE_PHPIZE ) {
1476
+ /* In the phpize mode, the subdirs are always relative to BUID_DIR.
1477
+ No need to differentiate by extension, only one gets built. */
1478
+ var build_dir = ( dirname ? dirname : "" ) . replace ( new RegExp ( "^..\\\\" ) , "" ) ;
1479
+ } else {
1480
+ var build_dir = ( dirname ? ( dir + "\\" + dirname ) : dir ) . replace ( new RegExp ( "^..\\\\" ) , "" ) ;
1481
+ }
1476
1482
}
1477
1483
else {
1478
- var build_dir = obj_dir . replace ( new RegExp ( "^..\\\\" ) , "" ) ;
1484
+ var build_dir = ( dirname ? obj_dir + "\\" + dirname : obj_dir ) . replace ( new RegExp ( "^..\\\\" ) , "" ) ;
1479
1485
}
1480
1486
1481
1487
obj = sub_build + build_dir + "\\" + filename . replace ( re , ".obj" ) ;
@@ -2141,7 +2147,16 @@ function ADD_FLAG(name, flags, target)
2141
2147
if ( configure_subst . Exists ( name ) ) {
2142
2148
var curr_flags = configure_subst . Item ( name ) ;
2143
2149
2144
- if ( curr_flags . indexOf ( flags ) >= 0 ) {
2150
+ /* Prefix with a space, thus making sure the
2151
+ current flag is not a substring of some
2152
+ other. It's still not a complete check if
2153
+ some flags with spaces got added.
2154
+
2155
+ TODO rework to use an array, so direct
2156
+ match can be done. This will also
2157
+ help to normalize flags and to not
2158
+ to insert duplicates. */
2159
+ if ( curr_flags . indexOf ( " " + flags ) >= 0 ) {
2145
2160
return ;
2146
2161
}
2147
2162
0 commit comments