didou Wed Mar 17 09:05:56 2004 EDT
Modified files: /livedocs TODO mk_peardoc.php mk_phpdoc.php mkindex.php Log: now --with-build-type=peardoc works like a charm http://cvs.php.net/diff.php/livedocs/TODO?r1=1.16&r2=1.17&ty=u Index: livedocs/TODO diff -u livedocs/TODO:1.16 livedocs/TODO:1.17 --- livedocs/TODO:1.16 Wed Mar 17 05:45:50 2004 +++ livedocs/TODO Wed Mar 17 09:05:56 2004 @@ -11,8 +11,6 @@ developed for livedocs (for special PEAR or PHP-GTK needs) : * work in progress for PEAR. TODO : - customize search_parse_dir() in mk_peardoc.php - - reimplement scan_entities() to accept an argument containing the entities files - locations - Better display of how an extension is available (PHP core, bundled ext., PECL ext.) - In livedocs.php, for format_function() : @@ -23,4 +21,4 @@ tags currently in use. -$Revision: 1.16 $ +$Revision: 1.17 $ http://cvs.php.net/diff.php/livedocs/mk_peardoc.php?r1=1.1&r2=1.2&ty=u Index: livedocs/mk_peardoc.php diff -u livedocs/mk_peardoc.php:1.1 livedocs/mk_peardoc.php:1.2 --- livedocs/mk_peardoc.php:1.1 Wed Mar 17 05:45:51 2004 +++ livedocs/mk_peardoc.php Wed Mar 17 09:05:56 2004 @@ -18,11 +18,16 @@ // | Configuration file for peardoc build | // +----------------------------------------------------------------------+ // -// $Id: mk_peardoc.php,v 1.1 2004/03/17 10:45:51 didou Exp $ +// $Id: mk_peardoc.php,v 1.2 2004/03/17 14:05:56 didou Exp $ define('MK_VERSION', false); + $parse_dirs = array('authoring', 'chapters', 'core', 'guide', 'package', 'pecl'); +$top_files = array('manual.xml'); + +$entities_dir = '.'; + function search_parse_dir($path, $section) { global $idx, $toca, $tocd; http://cvs.php.net/diff.php/livedocs/mk_phpdoc.php?r1=1.1&r2=1.2&ty=u Index: livedocs/mk_phpdoc.php diff -u livedocs/mk_phpdoc.php:1.1 livedocs/mk_phpdoc.php:1.2 --- livedocs/mk_phpdoc.php:1.1 Wed Mar 17 05:45:51 2004 +++ livedocs/mk_phpdoc.php Wed Mar 17 09:05:56 2004 @@ -18,11 +18,16 @@ // | Configuration file for phpdoc build | // +----------------------------------------------------------------------+ // -// $Id: mk_phpdoc.php,v 1.1 2004/03/17 10:45:51 didou Exp $ +// $Id: mk_phpdoc.php,v 1.2 2004/03/17 14:05:56 didou Exp $ define('MK_VERSION', true); + $parse_dirs = array('faq', 'reference', 'security', 'chapters', 'appendices'); +$top_files = array('installpart.xml', 'manual.xml'); + +$entities_dir = 'entities'; + function search_parse_dir($path, $section) { global $idx, $toca, $tocd; http://cvs.php.net/diff.php/livedocs/mkindex.php?r1=1.22&r2=1.23&ty=u Index: livedocs/mkindex.php diff -u livedocs/mkindex.php:1.22 livedocs/mkindex.php:1.23 --- livedocs/mkindex.php:1.22 Wed Mar 17 05:45:51 2004 +++ livedocs/mkindex.php Wed Mar 17 09:05:56 2004 @@ -19,7 +19,7 @@ // | construct an index | // +----------------------------------------------------------------------+ // -// $Id: mkindex.php,v 1.22 2004/03/17 10:45:51 didou Exp $ +// $Id: mkindex.php,v 1.23 2004/03/17 14:05:56 didou Exp $ /* just to be on the safe side */ @@ -184,8 +184,7 @@ } $files = array_merge($ents, $language_defs, $fallback_language_defs); $skip = array('chapters.ent');//, 'file-entities.ent'); - $language_def_files = array('language-defs.ent', 'language-snippets.ent'); - $pats = array( '/<!ENTITY\s+([a-zA-Z0-9.-]+)\s+\'([^\']+)\'>/Usm', '/<!ENTITY\s+([a-zA-Z0-9.-]+)\s+"([^"]+)">/Usm' ); + $pats = array('/<!ENTITY\s+([a-zA-Z0-9.-]+)\s+\'([^\']+)\'>/Usm', '/<!ENTITY\s+([a-zA-Z0-9.-]+)\s+"([^"]+)">/Usm'); foreach ($files as $filename) { echo "Entities: $filename\n"; @@ -339,14 +338,15 @@ sqlite_query($idx, $create); sqlite_query($idx, 'BEGIN TRANSACTION'); -if ($BUILDTYPE == 'phpdoc') { - parse_file($PHPDOC . DIRECTORY_SEPARATOR. 'installpart.xml', 'installpart.xml', 0); - $replacements = scan_entities($PHPDOC . DIRECTORY_SEPARATOR . 'entities'); -} elseif ($BUILDTYPE == 'peardoc') { - $replacements = scan_entities($PHPDOC); + +foreach ($top_files as $top_file) { + parse_file($PHPDOC . DIRECTORY_SEPARATOR . $top_file, $top_file, 0); } -parse_file($PHPDOC . DIRECTORY_SEPARATOR. 'manual.xml', 'manual.xml', 0); + +$replacements = scan_entities($PHPDOC . DIRECTORY_SEPARATOR . $entities_dir); + scan_dir($PHPDOC . DIRECTORY_SEPARATOR . $LANG); + if (MK_VERSION) { build_func_list(); }