DevHeads.net

com web/rmtools: fix obj dir handlning when pgo is not setup yet: include/BuildVC.php script/snap.php

Link: <a href="http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=e9fc367e4725d7345cfc736096798a914e3dccd3" title="http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=e9fc367e4725d7345cfc736096798a914e3dccd3">http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=e9fc367e4725d7345cf...</a>

Log:
fix obj dir handlning when pgo is not setup yet

Changed paths:
M include/BuildVC.php
M script/snap.php

Diff:
diff --git a/include/BuildVC.php b/include/BuildVC.php
index f962cd2..d357dbf 100644
--- a/include/BuildVC.php
+++ b/include/BuildVC.php
@@ -170,10 +170,9 @@ class BuildVC {
if (is_dir($this->obj_dir) && $rm_obj === true) {
rmdir_rf($this->obj_dir);
}
- if (is_dir($this->obj_dir)) {
- $this->clean();
+ if (!is_dir($this->obj_dir)) {
+ mkdir($this->obj_dir, 0655, true);
}
- mkdir($this->obj_dir, 0655, true);
$ret = exec_single_log($cmd, $this->build_dir, $this->env);
if (!$ret) {
throw new \Exception('Configure failed');
diff --git a/script/snap.php b/script/snap.php
index 6b4c37b..d0ca3d3 100644
--- a/script/snap.php
+++ b/script/snap.php
@@ -127,15 +127,16 @@ for ($i = 0; $i < count($builds_top) && ($force || $branch->hasNewRevision()); $
only needs to be done once for setup. In further
also, if there are any difference with TS/NTS,
there might be some separate setup needed. */
+ $rm_obj_dir = false;
if (!$build->isPgoSetup()) {
echo "Preparing PGO training environment\n";
$build->configure();
$build->make();
$build->pgoInit();
- $build->make(' clean-all');
+ $rm_obj_dir = true;
}
echo "Creating PGI build\n";
- $build->configure(' "--enable-pgi" ');
+ $build->configure(' "--enable-pgi" ', $rm_obj_dir);
}
else {
$build->configure();