Skip to content

Commit 2eaa47f

Browse files
committed
Fixed for building on windows.
1 parent b18140f commit 2eaa47f

File tree

1 file changed

+9
-7
lines changed
  • build/_resource/Phalcon/Build/Generator

1 file changed

+9
-7
lines changed

build/_resource/Phalcon/Build/Generator/Safe.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class Generator_Safe
3737
/**
3838
* Generator for config.m4 or config.w32
3939
*
40-
* @var Generator_File_ConfigM4|Generator_File_ConfigW32
40+
* @var array
4141
*/
42-
protected $config;
42+
protected $configs = array();
4343

4444
/**
4545
* Generator for Makefile.frag
@@ -62,10 +62,10 @@ public function __construct($rootDir, $outputDir)
6262
$this->phalconH = new Generator_File_PhalconH($this->sourceDir, $outputDir);
6363
$this->phalconC = new Generator_File_PhalconC($rootDir, $this->sourceDir, $configDir, $outputDir);
6464

65+
$this->configs[] = new Generator_File_ConfigM4($this->sourceDir, $outputDir);
66+
6567
if (preg_match('/^WIN/', PHP_OS)) {
66-
$this->config = new Generator_File_ConfigW32($this->sourceDir, $outputDir);
67-
} else {
68-
$this->config = new Generator_File_ConfigM4($this->sourceDir, $outputDir);
68+
$this->configs[] = new Generator_File_ConfigW32($this->sourceDir, $outputDir);
6969
}
7070
}
7171

@@ -89,8 +89,10 @@ protected function generateFiles()
8989
{
9090
$includedHeaderFiles = $this->phalconH->generate();
9191
$this->phalconC->generate($includedHeaderFiles);
92-
93-
$this->config->generate();
92+
93+
foreach($this->configs as $config) {
94+
$config->generate();
95+
}
9496

9597
copy($this->sourceDir . '/php_phalcon.h', $this->outputDir . '/php_phalcon.h');
9698
$this->processKernelGlobals();

0 commit comments

Comments
 (0)