3 namespace pharext\Task
;
10 * Run make in the source dir
12 class Make
implements Task
31 * @param string $cwd working directory
32 * @param array $args make's arguments
33 * @param string $sudo sudo command
35 public function __construct($cwd, array $args = null, $sudo = null) {
43 * @param bool $verbose
44 * @throws \pharext\Exception
46 public function run($verbose = false) {
48 if (!chdir($this->cwd
)) {
52 $cmd = new ExecCmd("make", $verbose);
53 if (isset($this->sudo
)) {
54 $cmd->setSu($this->sudo
);
58 $args = array_merge((array) $args, ["-s"]);