summaryrefslogtreecommitdiff
path: root/buildscripts/phpbuilder
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/phpbuilder')
-rw-r--r--buildscripts/phpbuilder/build.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/buildscripts/phpbuilder/build.php b/buildscripts/phpbuilder/build.php
index 6df74923..4f427388 100644
--- a/buildscripts/phpbuilder/build.php
+++ b/buildscripts/phpbuilder/build.php
@@ -43,11 +43,12 @@ foreach($lines as $line)
echo 'adding '.FRAMEWORK_DIR.'/'.$line."\n";
$input=file_get_contents(FRAMEWORK_DIR.'/'.$line);
$input = strip_comments($input);
- $input=strtr($input,"\r",' ');
+ $input=strtr($input,"\r",'');
$input=preg_replace("/\s*(\n+\s*){2,}\s*/m","\n",$input);
$input=preg_replace('/^Prado::using\([^\*]*?\);/mu','',$input);
$input=preg_replace('/^(require|require_once)\s*\(.*?;/mu','',$input);
$input=preg_replace('/^(include|include_once)\s*\(.*?;/mu','',$input);
+ $input=preg_replace('/^\s*/m','',$input);
//remove internal logging
$input=preg_replace('/^\s*Prado::trace.*\s*;\s*$/mu','',$input);
@@ -55,6 +56,8 @@ foreach($lines as $line)
$output.=$input;
}
+$output=str_replace('?><?php','',$output);
+
file_put_contents(FRAMEWORK_DIR.'/'.OUTPUT_FILE,$output);
function strip_comments($source)