Restructure the documentation folder; add more options to makefile
authorgggeek <giunta.gaetano@gmail.com>
Mon, 27 Apr 2015 20:49:08 +0000 (21:49 +0100)
committergggeek <giunta.gaetano@gmail.com>
Mon, 27 Apr 2015 20:49:08 +0000 (21:49 +0100)
23 files changed:
README.md
doc/build/custom.fo.xsl [moved from doc/custom.fo.xsl with 93% similarity]
doc/build/custom.xsl [moved from doc/custom.xsl with 97% similarity]
doc/custom.dsl [deleted file]
doc/manual/css-docbook/COPYING [moved from doc/docbook-css/COPYING with 98% similarity]
doc/manual/css-docbook/CREDITS [moved from doc/docbook-css/CREDITS with 95% similarity]
doc/manual/css-docbook/core.css [moved from doc/docbook-css/core.css with 100% similarity]
doc/manual/css-docbook/db-bindings.xml [moved from doc/docbook-css/db-bindings.xml with 96% similarity]
doc/manual/css-docbook/driver.css [moved from doc/docbook-css/driver.css with 100% similarity]
doc/manual/css-docbook/l10n.css [moved from doc/docbook-css/l10n.css with 100% similarity]
doc/manual/css-docbook/l10n/de.css [moved from doc/docbook-css/l10n/de.css with 100% similarity]
doc/manual/css-docbook/l10n/en.css [moved from doc/docbook-css/l10n/en.css with 100% similarity]
doc/manual/css-docbook/l10n/es.css [moved from doc/docbook-css/l10n/es.css with 100% similarity]
doc/manual/css-docbook/l10n/pl.css [moved from doc/docbook-css/l10n/pl.css with 100% similarity]
doc/manual/css-docbook/mozilla.css [moved from doc/docbook-css/mozilla.css with 100% similarity]
doc/manual/css-docbook/opera.css [moved from doc/docbook-css/opera.css with 100% similarity]
doc/manual/css-docbook/styles.css [moved from doc/docbook-css/styles.css with 100% similarity]
doc/manual/css-docbook/tables.css [moved from doc/docbook-css/tables.css with 100% similarity]
doc/manual/css-docbook/xmlrpc.css [moved from doc/docbook-css/xmlrpc.css with 100% similarity]
doc/manual/images/debugger.gif [moved from doc/debugger.gif with 100% similarity]
doc/manual/images/progxmlrpc.s.gif [moved from doc/progxmlrpc.s.gif with 100% similarity]
doc/manual/phpxmlrpc_manual.xml [moved from doc/xmlrpc_php.xml with 99% similarity]
pakefile.php

index b0d323b..dfc9631 100644 (file)
--- a/README.md
+++ b/README.md
@@ -8,8 +8,9 @@ Installation instructions are in the [INSTALL.md](INSTALL.md) file.
 
 Docs
 ----
-The manual, in HTML and pdf versions, can be found in the doc/ directory.
-Use of this software is subject to the terms in doc/index.html
+The manual can be found in the doc/manual directory, in HTML and PDF versions for release tarballs and Docbook always.
+
+Use of this software is subject to the terms in the [license.txt](license.txt) file
 
 SSL-certificate
 ---------------
similarity index 93%
rename from doc/custom.fo.xsl
rename to doc/build/custom.fo.xsl
index 1ba937c..b1964c0 100644 (file)
-<?xml version='1.0'?>\r
-<xsl:stylesheet\r
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"\r
-    xmlns:fo="http://www.w3.org/1999/XSL/Format">\r
-<!--\r
- Customization xsl stylesheet for docbook to pdf transform\r
- @author Gaetano Giunta\r
- @copyright (c) 2007-2015 G. Giunta\r
- @license code licensed under the BSD License\r
- @todo make the xsl more dynamic: the path to import docbook.xsl could be f.e. rewritten/injected by the php user\r
--->\r
-\r
-\r
-<!-- import base stylesheet -->\r
-<xsl:import href="../../../vendor/docbook/docbook-xsl/fo/docbook.xsl"/>\r
-\r
-\r
-<!-- customization vars -->\r
-<xsl:param name="fop1.extensions">1</xsl:param>\r
-<xsl:param name="draft.mode">no</xsl:param>\r
-<xsl:param name="funcsynopsis.style">ansi</xsl:param>\r
-<xsl:param name="id.warnings">0</xsl:param>\r
-<xsl:param name="highlight.source">1</xsl:param>\r
-<xsl:param name="highlight.default.language">php</xsl:param>\r
-<xsl:param name="paper.type">A4</xsl:param>\r
-<xsl:param name="shade.verbatim">1</xsl:param>\r
-\r
-<xsl:attribute-set name="verbatim.properties">\r
-  <xsl:attribute name="font-size">80%</xsl:attribute>\r
-</xsl:attribute-set>\r
-\r
-\r
-<!-- elements added / modified -->\r
-<xsl:template match="funcdef/function">\r
-  <xsl:choose>\r
-    <xsl:when test="$funcsynopsis.decoration != 0">\r
-      <fo:inline font-weight="bold">\r
-        <xsl:apply-templates/>\r
-      </fo:inline>\r
-    </xsl:when>\r
-    <xsl:otherwise>\r
-      <xsl:apply-templates/>\r
-    </xsl:otherwise>\r
-  </xsl:choose>\r
-  <xsl:text> </xsl:text>\r
-</xsl:template>\r
-\r
-<xsl:template match="funcdef/type">\r
-  <xsl:apply-templates/>\r
-  <xsl:text> </xsl:text>\r
-</xsl:template>\r
-\r
-<xsl:template match="void">\r
-  <xsl:choose>\r
-    <xsl:when test="$funcsynopsis.style='ansi'">\r
-      <xsl:text>( void )</xsl:text>\r
-    </xsl:when>\r
-    <xsl:otherwise>\r
-      <xsl:text>( )</xsl:text>\r
-    </xsl:otherwise>\r
-  </xsl:choose>\r
-</xsl:template>\r
-\r
-<xsl:template match="varargs">\r
-  <xsl:text>( ... )</xsl:text>\r
-</xsl:template>\r
-\r
-<xsl:template match="paramdef">\r
-  <xsl:variable name="paramnum">\r
-    <xsl:number count="paramdef" format="1"/>\r
-  </xsl:variable>\r
-  <xsl:if test="$paramnum=1">( </xsl:if>\r
-  <xsl:choose>\r
-    <xsl:when test="$funcsynopsis.style='ansi'">\r
-      <xsl:apply-templates/>\r
-    </xsl:when>\r
-    <xsl:otherwise>\r
-      <xsl:apply-templates select="./parameter"/>\r
-    </xsl:otherwise>\r
-  </xsl:choose>\r
-  <xsl:choose>\r
-    <xsl:when test="following-sibling::paramdef">\r
-      <xsl:text>, </xsl:text>\r
-    </xsl:when>\r
-    <xsl:otherwise>\r
-      <xsl:text> )</xsl:text>\r
-    </xsl:otherwise>\r
-  </xsl:choose>\r
-</xsl:template>\r
-\r
-<xsl:template match="paramdef/type">\r
-  <xsl:apply-templates/>\r
-  <xsl:text> </xsl:text>\r
-</xsl:template>\r
-\r
-<!-- default values for function parameters -->\r
-<xsl:template match="paramdef/initializer">\r
-  <xsl:text> = </xsl:text>\r
-  <xsl:apply-templates/>\r
-</xsl:template>\r
-\r
-\r
+<?xml version='1.0'?>
+<xsl:stylesheet
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<!--
+ Customization xsl stylesheet for docbook to pdf transform
+ @author Gaetano Giunta
+ @copyright (c) 2007-2015 G. Giunta
+ @license code licensed under the BSD License
+ @todo make the xsl more dynamic: the path to import docbook.xsl could be f.e. rewritten/injected by the php user
+-->
+
+
+<!-- import base stylesheet -->
+<xsl:import href="../../../../vendor/docbook/docbook-xsl/fo/docbook.xsl"/>
+
+
+<!-- customization vars -->
+<xsl:param name="fop1.extensions">1</xsl:param>
+<xsl:param name="draft.mode">no</xsl:param>
+<xsl:param name="funcsynopsis.style">ansi</xsl:param>
+<xsl:param name="id.warnings">0</xsl:param>
+<xsl:param name="highlight.source">1</xsl:param>
+<xsl:param name="highlight.default.language">php</xsl:param>
+<xsl:param name="paper.type">A4</xsl:param>
+<xsl:param name="shade.verbatim">1</xsl:param>
+
+<xsl:attribute-set name="verbatim.properties">
+  <xsl:attribute name="font-size">80%</xsl:attribute>
+</xsl:attribute-set>
+
+
+<!-- elements added / modified -->
+<xsl:template match="funcdef/function">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.decoration != 0">
+      <fo:inline font-weight="bold">
+        <xsl:apply-templates/>
+      </fo:inline>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="funcdef/type">
+  <xsl:apply-templates/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="void">
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.style='ansi'">
+      <xsl:text>( void )</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text>( )</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="varargs">
+  <xsl:text>( ... )</xsl:text>
+</xsl:template>
+
+<xsl:template match="paramdef">
+  <xsl:variable name="paramnum">
+    <xsl:number count="paramdef" format="1"/>
+  </xsl:variable>
+  <xsl:if test="$paramnum=1">( </xsl:if>
+  <xsl:choose>
+    <xsl:when test="$funcsynopsis.style='ansi'">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="./parameter"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:choose>
+    <xsl:when test="following-sibling::paramdef">
+      <xsl:text>, </xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:text> )</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef/type">
+  <xsl:apply-templates/>
+  <xsl:text> </xsl:text>
+</xsl:template>
+
+<!-- default values for function parameters -->
+<xsl:template match="paramdef/initializer">
+  <xsl:text> = </xsl:text>
+  <xsl:apply-templates/>
+</xsl:template>
+
+
 </xsl:stylesheet>
\ No newline at end of file
similarity index 97%
rename from doc/custom.xsl
rename to doc/build/custom.xsl
index f648887..aed8d5e 100644 (file)
@@ -15,7 +15,7 @@
 
 
 <!-- import base stylesheet -->
-<xsl:import href="../vendor/docbook/docbook-xsl/xhtml/chunk.xsl"/>
+<xsl:import href="../../vendor/docbook/docbook-xsl/xhtml/chunk.xsl"/>
 
 
 <!-- customization vars -->
diff --git a/doc/custom.dsl b/doc/custom.dsl
deleted file mode 100644 (file)
index b3b35ce..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [\r
-<!ENTITY dbstyle SYSTEM "/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl" CDATA DSSSL>\r
-]>\r
-\r
-<style-sheet>\r
-<style-specification use="docbook">\r
-<style-specification-body>\r
-\r
-(define %link-mailto-url%\r
-       "edd@usefulinc.com")\r
-\r
-(define %html-ext%\r
-       ".html")\r
-\r
-(define %use-id-as-filename%\r
-  #t)\r
-\r
-(define %root-filename%\r
-  "index")\r
-\r
-\r
-</style-specification-body>\r
-</style-specification>\r
-<external-specification id="docbook" document="dbstyle">\r
-</style-sheet>\r
similarity index 98%
rename from doc/docbook-css/COPYING
rename to doc/manual/css-docbook/COPYING
index d199ddc..735dca1 100644 (file)
@@ -1,17 +1,17 @@
-Copyright (c) 2004 David Holroyd, and contributors.\r
-\r
-Permission to use, copy, modify and distribute this software and its\r
-documentation for any purpose and without fee is hereby granted in\r
-perpetuity, provided that the above copyright notice appear in all\r
-copies, and that both the copyright notice and this permission notice\r
-appear in supporting documentation. The contributors make no\r
-representations about the suitability of this software for any\r
-purpose. It is provided "as is" without express or implied warranty.\r
-\r
-THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS\r
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\r
-FITNESS. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY\r
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER\r
-RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF\r
-CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN\r
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\r
+Copyright (c) 2004 David Holroyd, and contributors.
+
+Permission to use, copy, modify and distribute this software and its
+documentation for any purpose and without fee is hereby granted in
+perpetuity, provided that the above copyright notice appear in all
+copies, and that both the copyright notice and this permission notice
+appear in supporting documentation. The contributors make no
+representations about the suitability of this software for any
+purpose. It is provided "as is" without express or implied warranty.
+
+THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
similarity index 95%
rename from doc/docbook-css/CREDITS
rename to doc/manual/css-docbook/CREDITS
index 08d96c5..cbc51ee 100644 (file)
@@ -1,10 +1,10 @@
-This stylesheet was writen by David Holroyd, with patches, suggestions,\r
-translations, and other help from these people:\r
-\r
-  David Leppik\r
-  Martin Gautier\r
-  Asia Magiera\r
-  Federico Koessler\r
-  Katie McSweenie\r
-\r
-Many thanks to all of them!\r
+This stylesheet was writen by David Holroyd, with patches, suggestions,
+translations, and other help from these people:
+
+  David Leppik
+  Martin Gautier
+  Asia Magiera
+  Federico Koessler
+  Katie McSweenie
+
+Many thanks to all of them!
similarity index 96%
rename from doc/docbook-css/db-bindings.xml
rename to doc/manual/css-docbook/db-bindings.xml
index cb575fd..f3c0059 100644 (file)
@@ -1,31 +1,31 @@
-<?xml version="1.0"?>\r
-<bindings xmlns="http://www.mozilla.org/xbl"\r
-     xmlns:html="http://www.w3.org/1999/xhtml">\r
-  <binding id="ulink">\r
-    <handlers>\r
-      <handler event="click" button="0"\r
-               action="window.location=this.attributes.url.value;"/>\r
-      <handler event="mouseover"\r
-               action="window.status=this.attributes.url.value;"/>\r
-      <handler event="mouseout"\r
-               action="window.status=null;"/>\r
-    </handlers>\r
-  </binding>\r
-\r
-  <binding id="image">\r
-    <content>\r
-      <html:img xbl:inherits="src=fileref"/>\r
-    </content>\r
-\r
-    <implementation>\r
-      <constructor>\r
-       var img = document.getAnonymousNodes(this)[0];\r
-       var file = this.getAttribute("fileref");\r
-       // HACK: using img.src=file 'inline' doesn't seem to work\r
-       //       but it does when called from a setTimeout()\r
-       var f = function() { img.src = file; }\r
-       setTimeout(f, 0);\r
-      </constructor>\r
-    </implementation>\r
-  </binding>\r
-</bindings>\r
+<?xml version="1.0"?>
+<bindings xmlns="http://www.mozilla.org/xbl"
+     xmlns:html="http://www.w3.org/1999/xhtml">
+  <binding id="ulink">
+    <handlers>
+      <handler event="click" button="0"
+               action="window.location=this.attributes.url.value;"/>
+      <handler event="mouseover"
+               action="window.status=this.attributes.url.value;"/>
+      <handler event="mouseout"
+               action="window.status=null;"/>
+    </handlers>
+  </binding>
+
+  <binding id="image">
+    <content>
+      <html:img xbl:inherits="src=fileref"/>
+    </content>
+
+    <implementation>
+      <constructor>
+       var img = document.getAnonymousNodes(this)[0];
+       var file = this.getAttribute("fileref");
+       // HACK: using img.src=file 'inline' doesn't seem to work
+       //       but it does when called from a setTimeout()
+       var f = function() { img.src = file; }
+       setTimeout(f, 0);
+      </constructor>
+    </implementation>
+  </binding>
+</bindings>
similarity index 99%
rename from doc/xmlrpc_php.xml
rename to doc/manual/phpxmlrpc_manual.xml
index 363f8a7..5c69ba7 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet href="docbook-css/driver.css" type="text/css"?>
+<?xml-stylesheet href="css-docbook/driver.css" type="text/css"?>
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 <!--
@@ -1166,7 +1166,7 @@ PHP-XMLRPC User manual
     <sect1 id="jellyfish" xreflabel="The Jellyfish Book">
       <title>The Jellyfish Book</title>
 
-      <para><graphic align="right" depth="190" fileref="progxmlrpc.s.gif"
+      <para><graphic align="right" depth="190" fileref="images/progxmlrpc.s.gif"
       format="GIF" width="145" />Together with Simon St.Laurent and Joe
       Johnston, Edd Dumbill wrote a book on XML-RPC for O'Reilly and
       Associates on XML-RPC. It features a rather fetching jellyfish on the
@@ -4218,7 +4218,7 @@ else
     <para>The interface should be self-explicative enough to need little
     documentation.</para>
 
-    <para><graphic align="center" fileref="debugger.gif"
+    <para><graphic align="center" fileref="images/debugger.gif"
     format="GIF" /></para>
 
     <para>The most useful feature of the debugger is without doubt the "Show
index 6866f58..09f060f 100644 (file)
@@ -21,9 +21,15 @@ class Builder
         'fop' => 'fop',
         'php' => 'php'
     );
+    protected static $options = array(
+        'repo' => 'https://github.com/gggeek/phpxmlrpc',
+        'branch' => 'php53'
+    );
 
     public static function libVersion()
     {
+        if (self::$libVersion == null)
+            throw new \Exception('Missing library version argument');
         return self::$libVersion;
     }
 
@@ -52,17 +58,12 @@ class Builder
         );
     }
 
-    public static function sourceRepo()
-    {
-        return 'https://github.com/gggeek/phpxmlrpc';
-    }
-
     /// @todo move git branch to be a named option?
     public static function getOpts($args=array(), $cliOpts=array())
     {
-        if (count($args) < 1)
-            throw new \Exception('Missing library version argument');
-        self::$libVersion = $args[0];
+        if (count($args) > 0)
+        //    throw new \Exception('Missing library version argument');
+            self::$libVersion = $args[0];
         if (count($args) > 1)
             self::$sourceBranch = $args[1];
 
@@ -72,6 +73,12 @@ class Builder
             }
         }
 
+        foreach (self::$options as $name => $value) {
+            if (isset($cliOpts[$name])) {
+                self::$options[$name] = $cliOpts[$name];
+            }
+        }
+
         //pake_echo('---'.self::$libVersion.'---');
     }
 
@@ -80,6 +87,11 @@ class Builder
         return self::$tools[$name];
     }
 
+    public static function option($name)
+    {
+        return self::$options[$name];
+    }
+
     /**
      * @param string $inFile
      * @param string $xssFile
@@ -170,11 +182,15 @@ function run_default($task=null, $args=array(), $cliOpts=array())
     echo "Syntax: pake {\$pake-options} \$task \$lib-version [\$git-tag] {\$task-options}\n";
     echo "\n";
     echo "  Run 'pake help' to list all pake options\n";
-    echo "  Run 'pake -T' to list all available tasks\n";
+    echo "  Run 'pake -T' to list available tasks\n";
+    echo "  Run 'pake -P' to list all available tasks (including hidden ones) and their dependencies\n";
+    echo "\n";
     echo "  Task options:\n";
-    echo "      --php=\$php";
-    echo "      --fop=\$fop";
-    echo "      --zip=\$zip";
+    echo "      --repo=REPO      URL of the source repository to clone. defaults to the github repo.\n";
+    echo "      --branch=BRANCH  The git branch to build from.\n";
+    echo "      --php=PHP        Location of the php command-line interpreter\n";
+    echo "      --fop=FOP        Location of the fop command-line tool\n";
+    echo "      --zip=ZIP        Location of the zip tool\n";
 }
 
 function run_getopts($task=null, $args=array(), $cliOpts=array())
@@ -189,13 +205,12 @@ function run_init($task=null, $args=array(), $cliOpts=array())
 {
     // download the current version into the workspace
     $targetDir = Builder::workspaceDir();
-    $targetBranch = 'php53';
 
     // check if workspace exists and is not already set to the correct repo
     if (is_dir($targetDir) && pakeGit::isRepository($targetDir)) {
         $repo = new pakeGit($targetDir);
         $remotes = $repo->remotes();
-        if (trim($remotes['origin']['fetch']) != Builder::sourceRepo()) {
+        if (trim($remotes['origin']['fetch']) != Builder::option('repo')) {
             throw new Exception("Directory '$targetDir' exists and is not linked to correct git repo");
         }
 
@@ -203,10 +218,10 @@ function run_init($task=null, $args=array(), $cliOpts=array())
         $repo->pull();
     } else {
         pake_mkdirs(dirname($targetDir));
-        $repo = pakeGit::clone_repository(Builder::sourceRepo(), Builder::workspaceDir());
+        $repo = pakeGit::clone_repository(Builder::option('repo'), Builder::workspaceDir());
     }
 
-    $repo->checkout($targetBranch);
+    $repo->checkout(Builder::option('branch'));
 }
 
 /**
@@ -220,8 +235,10 @@ function run_build($task=null, $args=array(), $cliOpts=array())
 
 function run_clean_doc()
 {
-    pake_remove_dir(Builder::workspaceDir().'/doc/out');
-    pake_remove_dir(Builder::workspaceDir().'/doc/javadoc-out');
+    //pake_remove_dir(Builder::workspaceDir().'/doc/out');
+    pake_remove_dir(Builder::workspaceDir().'/doc/api');
+    $finder = pakeFinder::type('file')->name('*.html');
+    pake_remove($finder, Builder::workspaceDir().'/doc/manual');
 }
 
 /**
@@ -233,7 +250,7 @@ function run_doc($task=null, $args=array(), $cliOpts=array())
 
     // API docs from phpdoc comments using phpdocumentor
     $cmd = Builder::tool('php');
-    pake_sh("$cmd vendor/phpdocumentor/phpdocumentor/bin/phpdoc run -d ".Builder::workspaceDir().'/src'." -t ".Builder::workspaceDir().'/doc/javadoc-out --title PHP-XMLRPC');
+    pake_sh("$cmd vendor/phpdocumentor/phpdocumentor/bin/phpdoc run -d ".Builder::workspaceDir().'/src'." -t ".Builder::workspaceDir().'/doc/api --title PHP-XMLRPC');
 
     # Jade cmd yet to be rebuilt, starting from xml file and putting output in ./out dir, e.g.
     #  jade -t xml -d custom.dsl xmlrpc_php.xml
@@ -250,13 +267,13 @@ function run_doc($task=null, $args=array(), $cliOpts=array())
     #  -Dxslthl.config=file:///c:/htdocs/xmlrpc_cvs/docbook-xsl/highlighting/xslthl-config.xml \
     #  com.icl.saxon.StyleSheet -o xmlrpc_php.fo.xml xmlrpc_php.xml custom.fo.xsl use.extensions=1
 
-    pake_mkdirs($docDir.'/out');
+    //pake_mkdirs($docDir.'/out');
 
     // HTML files from docbook
 
-    Builder::applyXslt($docDir.'/xmlrpc_php.xml', $docDir.'/custom.xsl', $docDir.'/out/');
+    Builder::applyXslt($docDir.'/manual/phpxmlrpc_manual.xml', $docDir.'/build/custom.xsl', $docDir.'/manual');
     // post process html files to highlight php code samples
-    foreach(pakeFinder::type('file')->name('*.html')->in($docDir) as $file)
+    foreach(pakeFinder::type('file')->name('*.html')->in($docDir.'/manual') as $file)
     {
         file_put_contents($file, Builder::highlightPhpInHtml(file_get_contents($file)));
     }
@@ -264,10 +281,10 @@ function run_doc($task=null, $args=array(), $cliOpts=array())
     // PDF file from docbook
 
     // convert to fo and then to pdf using apache fop
-    Builder::applyXslt($docDir.'/xmlrpc_php.xml', $docDir.'/custom.fo.xsl', $docDir.'/xmlrpc_php.fo.xml');
+    Builder::applyXslt($docDir.'/manual/phpxmlrpc_manual.xml', $docDir.'/build/custom.fo.xsl', $docDir.'/manual/phpxmlrpc_manual.fo.xml');
     $cmd = Builder::tool('fop');
-    pake_sh("$cmd $docDir/xmlrpc_php.fo.xml $docDir/xmlrpc_php.pdf");
-    unlink($docDir.'/xmlrpc_php.fo.xml');
+    pake_sh("$cmd $docDir/phpxmlrpc_manual.fo.xml $docDir/phpxmlrpc_manual.pdf");
+    unlink($docDir.'/manual/phpxmlrpc_manual.fo.xml');
 }
 
 function run_clean_dist()
@@ -312,8 +329,13 @@ function run_dist($task=null, $args=array(), $cliOpts=array())
     chdir($cwd);
 }
 
+function run_clean_workspace($task=null, $args=array(), $cliOpts=array())
+{
+    pake_remove_dir(Builder::workspaceDir());
+}
+
 /**
- * Cleans up the build directory
+ * Cleans up the whole build directory
  * @todo 'make clean' usually just removes the results of the build, distclean removes all but sources
  */
 function run_clean($task=null, $args=array(), $cliOpts=array())
@@ -331,6 +353,7 @@ pake_task('build', 'getopts', 'init', 'doc');
 pake_task('dist', 'getopts', 'init', 'build', 'clean-dist');
 pake_task('clean-doc', 'getopts');
 pake_task('clean-dist', 'getopts');
+pake_task('clean-workspace', 'getopts');
 pake_task('clean', 'getopts');
 
 }