From: alex <bin...@li...> - 2001-10-01 23:39:58
|
alex Mon Oct 1 16:39:53 2001 EDT Added files: /r2/binarycloud/make BCC.php /r2/binarycloud/make/handlers README Log: Added make/ hierarchy... Index: r2/binarycloud/make/BCC.php +++ r2/binarycloud/make/BCC.php #!/usr/local/php4/bin/php -q <?php // {{{ Header /* * -File $Id: BCC.php,v 1.1 2001/10/01 23:39:53 alex Exp $ * -License LGPL (http://www.gnu.org/copyleft/lesser.html) * -Copyright 2001, Intacct Corp. * -Author odysseas tsatalos, ody...@ya... * -Author Andris Spruds, an...@do... * -Author Andreas Aderhold, a.a...@th... */ // }}} // main entry point {{{ function main(&$_argv) { if ( sizeof($_argv) != 5 ) { _PrintUsage($_argv[0]); } $bcLang = $_argv[1]; $bcBuildPath = $_argv[2]; /* this is the constant for lang/htdocs */ define('BC_PATH_RESOURCES', '/'.$bcLang); include_once($bcBuildPath. '/prepend.php'); $in = realpath($_argv[3]); $out = $_argv[4]; $Bcc =& _InitBcc(); // setup parser and engage $Bcc->Compile($in, $out); } // }}} // display usage information function _PrintUsage($_self) { $strSyntax = "Usage: $_self langcode buildpath infile outfile\n"; die($strSyntax); } // }}} // Init bcc function &_InitBcc() { import('binarycloud.mod.bcc.Bcc'); $bcc =& new Bcc; // register and import (internal to bcc) compiler classes $bcc->RegisterTag('BC:MODULE', "BccModuleCompiler"); $bcc->RegisterTag('BC:IMG', "BccImgCompiler"); return $bcc; } // }}} main($HTTP_SERVER_VARS['argv']); // }}} end /* * Local Variables: * mode: php * tab-width: 4 * c-basic-offset: 4 * End: */ ?> |