We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4bb026 commit b384345Copy full SHA for b384345
src/Package/Target/micro.php
@@ -0,0 +1,22 @@
1
+<?php
2
+
3
+declare(strict_types=1);
4
5
+namespace Package\Target;
6
7
+use StaticPHP\Attribute\Package\BeforeStage;
8
+use StaticPHP\Attribute\Package\Target;
9
+use StaticPHP\Attribute\PatchDescription;
10
+use StaticPHP\Package\TargetPackage;
11
+use StaticPHP\Util\FileSystem;
12
13
+#[Target('php-micro')]
14
+class micro
15
+{
16
+ #[BeforeStage('php', 'unix-make-embed', 'php-micro')]
17
+ #[PatchDescription('Patch Makefile to build only libphp.la for embedding')]
18
+ public function patchBeforeEmbed(TargetPackage $package): void
19
+ {
20
+ FileSystem::replaceFileStr("{$package->getSourceDir()}/Makefile", 'OVERALL_TARGET =', 'OVERALL_TARGET = libphp.la');
21
+ }
22
+}
0 commit comments