diff --git a/tools/build/build.xml b/tools/build/build.xml
index 3d97838a2..5290ee40a 100644
--- a/tools/build/build.xml
+++ b/tools/build/build.xml
@@ -86,9 +86,11 @@
 			Generates the API documentation using Doxygen and PHPDoc 
 			Doxygen is required in the path.
 		-->
-		
+		<mkdir dir="${build.dest.dir}/docs/API/doxygen" />		
 		<exec command="doxygen" dir="."/>
 		<!-- <exec command="make pdf" dir="${build.src.dir}/docs/latex"/> -->		
+		
+		<mkdir dir="${build.dest.dir}/docs/API/phpdoc" />
 		<phpdoc title="Doctrine Documentation" destdir="${build.dest.dir}/docs/API/phpdoc/html" 
                         sourcepath="${project.base.dir}/lib" output="HTML:Smarty:PHP"/>
 	</target>