]> granicus.if.org Git - php/commitdiff
Make for exclusion per regex
authorAnatol Belski <ab@php.net>
Thu, 31 Aug 2017 21:56:42 +0000 (23:56 +0200)
committerAnatol Belski <ab@php.net>
Thu, 31 Aug 2017 21:56:42 +0000 (23:56 +0200)
win32/build/mkdist.php

index 851aff06ad0413a2aae5ec113c05e12a22846bcd..a8ae758c6a2fcb4f11b5a2d7e2e0caab2d147b1c 100644 (file)
@@ -69,6 +69,9 @@ function get_depends($module)
                'vcruntime140.dll',
                'msvcp140.dll',
                );
+       static $no_dist_re = array(
+               "api-ms-win-crt-.+\.dll",
+       );
        global $build_dir, $extra_dll_deps, $ext_targets, $sapi_targets, $pecl_targets, $phpdll, $per_module_deps, $pecl_dll_deps;
        
        $bd = strtolower(realpath($build_dir));
@@ -96,6 +99,17 @@ function get_depends($module)
                /* ignore some well-known system dlls */
                if (in_array(basename($dep), $no_dist)) {
                        continue;
+               } else {
+                       $skip = false;
+                       foreach ($no_dist_re as $re) {
+                               if (preg_match(",$re,", basename($dep)) > 0) {
+                                       $skip = true;
+                                       break;
+                               }
+                       }
+                       if ($skip) {
+                               continue;
+                       }
                }
                
                if ($is_pecl) {