3 namespace pharext\Task
;
10 * Runs extension's configure
12 class Configure
implements Task
25 * @param string $cwd working directory
26 * @param array $args configure args
27 * @param string $prefix install prefix, e.g. /usr/local
28 * @param string $common_name PHP programs common name, e.g. php5
30 public function __construct($cwd, array $args = null, $prefix = null, $common_name = "php") {
32 $cmd = $common_name . "-config";
34 $cmd = $prefix . "/bin/" . $cmd;
36 $this->args
= ["--with-php-config=$cmd"];
38 $this->args
= array_merge($this->args
, $args);
42 public function run($verbose = false) {
44 if (!chdir($this->cwd
)) {
48 $cmd = new ExecCmd("./configure", $verbose);
49 $cmd->run($this->args
);