cvs: phpdoc /scripts xml_proto.php

From: Date: Thu, 22 May 2003 16:57:19 +0000
Subject: cvs: phpdoc /scripts xml_proto.php
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969353751@lists.php.net to get a copy of this message
philip Thu May 22 12:57:19 2003 EDT Modified files: /phpdoc/scripts xml_proto.php Log: Added some error handling (warnings for already existing dirs, fatal if no php source files can be found). And added some FYI NOTE's that basically say "this script isn't perfect and requires human intervention." Index: phpdoc/scripts/xml_proto.php diff -u phpdoc/scripts/xml_proto.php:1.7 phpdoc/scripts/xml_proto.php:1.8 --- phpdoc/scripts/xml_proto.php:1.7 Thu May 22 11:56:41 2003 +++ phpdoc/scripts/xml_proto.php Thu May 22 12:57:18 2003 @@ -16,7 +16,7 @@ # | Authors: Brad House <bradmssw@php.net> | # +----------------------------------------------------------------------+ # -# $Id: xml_proto.php,v 1.7 2003/05/22 15:56:41 philip Exp $ +# $Id: xml_proto.php,v 1.8 2003/05/22 16:57:18 philip Exp $ */ /* @@ -726,6 +726,10 @@ $source_files[$num+$j]=$temp_source_files[$j]; } $total=count($source_files); + + if ($total == 0) { + die("FATAL ERROR: Could not find any PHP source files to parse\n"); + } } $unknown_arg++; } @@ -756,17 +760,39 @@ /* Generating it all, create directory structure */ if ($generate_constants && $generate_functions) { - mkdir("./" . $extension_name); - mkdir("./" . $extension_name . "/functions"); + if (is_dir("./" . $extension_name)) { + echo "Warning: ./$extension_name already exists, continuing...\n"; + } else { + mkdir("./" . $extension_name); + } + if (is_dir("./" . $extension_name . "/functions")) { + echo "Warning: ./$extension_name/functions already exists, continuing...\n"; + } else { + mkdir("./" . $extension_name . "/functions"); + } } create_xml_docs(); - echo "\n"; - echo "Note: If you are documenting a new extension, you will need to add a new line\n"; - echo " to the /manual.xml.in file under the <part id=\"funcref\"> section following\n"; - echo " the format \"&reference.<extension name>.reference;\", but please try\n"; - echo " to maintain the alphabetical order!\n\n"; +echo <<<NOTES + +Note: If you are documenting a new extension, you will need to add a new line + to the /manual.xml.in file under the <part id="funcref"> section following + the format "&reference.<extension name>.reference;", but please try + to maintain the alphabetical order! + +Note: Also be sure to double check the documentation before commit as this + script is still being tested. Things to check: + + a) The parameter names in the prototype must be alphanumeric (no spaces + or other characters). Sometimes this isn't the case in the PHP sources. + b) Be sure optional parameters are listed as such, and vice versa. + c) The script defaults to --with-{ext} but it could be different, like + maybe --enable-{ext} OR a directory path is required or optional + d) If you're writing over files in CVS, be 100% sure to check unified + diffs before commit! + e) Report problems to phpdoc@lists.php.net +NOTES; ?>

« previous php.doc (#969353751) next »