Exemple #1
0
 public static function findPHP()
 {
     self::$PHP = Projects_Maker::find_executable('php');
 }
Exemple #2
0
 public function make($history, $force)
 {
     // if it is currently being made, wait until it is done
     if ($this->is_making()) {
         return $this->wait();
     }
     // make dependency
     if (in_array($this->id, $history)) {
         $loop = 'dependency loop:' . html_wikilink($this->id);
         foreach ($history as $dep) {
             $loop . ' ' . html_wikilink($dep);
         }
         $this->add_error($loop);
         return $this->status;
     }
     $date = $this->modified_date;
     $this->status = new Projects_make_progress($this, $history);
     $history[] = $this->id;
     if ($this->dependency) {
         foreach ($this->dependency as $dep => $auto) {
             $this->progress();
             $file = Projects_Maker::dependence($dep);
             if (!$file) {
                 $this->add_error('do not know how to make the dependence ' . html_wikilink($dep));
                 return $this->status;
             }
             //			echo "<pre>"; var_dump($file); echo "</pre>";
             $result = $file->make($history, !file_exists($file->file_path()));
             if (is_array($result)) {
                 $this->status = $result;
                 $this->add_error('failed to generate ' . html_wikilink($dep));
                 return $this->status;
             }
             if ($result > $date) {
                 $date = $result;
             }
         }
     }
     $this->progress();
     // make this file
     return $date;
 }