diff --git a/src/SPC/builder/linux/LinuxBuilder.php b/src/SPC/builder/linux/LinuxBuilder.php index bae67765..4ea38a6b 100644 --- a/src/SPC/builder/linux/LinuxBuilder.php +++ b/src/SPC/builder/linux/LinuxBuilder.php @@ -10,6 +10,7 @@ use SPC\builder\traits\UnixBuilderTrait; use SPC\exception\FileSystemException; use SPC\exception\RuntimeException; use SPC\exception\WrongUsageException; +use SPC\store\FileSystem; use SPC\store\SourcePatcher; class LinuxBuilder extends BuilderBase @@ -223,6 +224,9 @@ class LinuxBuilder extends BuilderBase } if ($enableEmbed) { logger()->info('building embed'); + if ($enableMicro) { + FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/Makefile', 'OVERALL_TARGET =', 'OVERALL_TARGET = libphp.la'); + } $this->buildEmbed($extra_libs, $use_lld); } diff --git a/src/SPC/builder/macos/MacOSBuilder.php b/src/SPC/builder/macos/MacOSBuilder.php index bbf4a791..49643678 100644 --- a/src/SPC/builder/macos/MacOSBuilder.php +++ b/src/SPC/builder/macos/MacOSBuilder.php @@ -10,6 +10,7 @@ use SPC\builder\traits\UnixBuilderTrait; use SPC\exception\FileSystemException; use SPC\exception\RuntimeException; use SPC\exception\WrongUsageException; +use SPC\store\FileSystem; use SPC\store\SourcePatcher; class MacOSBuilder extends BuilderBase @@ -195,6 +196,9 @@ class MacOSBuilder extends BuilderBase } if ($enableEmbed) { logger()->info('building embed'); + if ($enableMicro) { + FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/Makefile', 'OVERALL_TARGET =', 'OVERALL_TARGET = libphp.la'); + } $this->buildEmbed(); } diff --git a/src/SPC/store/SourcePatcher.php b/src/SPC/store/SourcePatcher.php index 7fbfb1b5..1bbe0476 100644 --- a/src/SPC/store/SourcePatcher.php +++ b/src/SPC/store/SourcePatcher.php @@ -141,6 +141,8 @@ class SourcePatcher } FileSystem::replaceFileRegex(SOURCE_PATH . '/php-src/main/php_config.h', '/^#define HAVE_OPENPTY 1$/m', ''); + FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/Makefile', 'install-micro', ''); + // call extension patch before make foreach ($builder->getExts() as $ext) { if ($ext->patchBeforeMake() === true) {