Version: 3.0.0b2 (kdevelop-031231) (using KDE KDE 3.1.4) Installed from: Debian stable Packages OS: Linux The option Clean API Documentation in the Build menu currently only cleans the documentation (generated with Doxygen) html/ directory. It should also clean the latex/ directory.
The same goes for the documents in xml. Also, from the configuration file Doxyfile, I see that Doxygen can also generate other formats. P.S. Would it not be a good idea to bring all these directories together under a single directory?
Sorry, I noticed one final problem (and a fairly basic one): the files currently are not actually deleted. Cause is that the wildcard is not expanded because the filesspecification is quoted (see parts/doxygen/doxygenpart.cpp, DoxygenPart::slotDoxClean()). Current command is: rm -f '<project directory>/html/*' This should be: rm -f <project directory>/html/* or (if you want to allow for spaces in the path): rm -f '/home/fjp/kdevelop/sigcreate/xml'/*
Subject: kdevelop/parts/doxygen CVS commit by aclu: Fix 71633 CCMAIL: 71633-done@bugs.kde.org M +58 -10 doxygenpart.cpp 1.28 --- kdevelop/parts/doxygen/doxygenpart.cpp #1.27:1.28 @@ -236,4 +236,5 @@ void DoxygenPart::slotDoxygen() void DoxygenPart::slotDoxClean() { + bool could_be_dirty = false; QString outputDirectory = Config_getString("OUTPUT_DIRECTORY"); @@ -242,5 +243,7 @@ void DoxygenPart::slotDoxClean() if ( outputDirectory.right(1) != "/" ) outputDirectory += "/"; + QString cmdline = "cd " + KShellProcess::quote( outputDirectory ); + if ( Config_getBool("GENERATE_HTML") ) { QString htmlDirectory = Config_getString("HTML_OUTPUT"); if ( htmlDirectory.isEmpty() ) @@ -248,10 +251,55 @@ void DoxygenPart::slotDoxClean() if ( htmlDirectory.right(1) != "/" ) htmlDirectory += "/"; + cmdline += " && rm -f " + KShellProcess::quote( htmlDirectory ) + "*"; + could_be_dirty= true; + } - QString cmdline = "rm -f " + KShellProcess::quote( outputDirectory + htmlDirectory + "*"); + if ( Config_getBool("GENERATE_LATEX") ) { + QString latexDirectory = Config_getString("LATEX_OUTPUT"); + if ( latexDirectory.isEmpty() ) + latexDirectory = "latex"; + if ( latexDirectory.right(1) != "/" ) + latexDirectory += "/"; + cmdline += " && rm -f " + KShellProcess::quote( latexDirectory ) + "*"; + could_be_dirty= true; + } - kdDebug(9026) << "Cleaning Doxygen html generated API documentation using: " << cmdline << endl; + if ( Config_getBool("GENERATE_RTF") ) { + QString rtfDirectory = Config_getString("RTF_OUTPUT"); + if ( rtfDirectory.isEmpty() ) + rtfDirectory = "rtf"; + if ( rtfDirectory.right(1) != "/" ) + rtfDirectory += "/"; + cmdline += " && rm -f " + KShellProcess::quote( rtfDirectory ) + "*"; + could_be_dirty= true; + } + if ( Config_getBool("GENERATE_MAN") ) { + QString manDirectory = Config_getString("MAN_OUTPUT"); + if ( manDirectory.isEmpty() ) + manDirectory = "man"; + if ( manDirectory.right(1) != "/" ) + manDirectory += "/"; + cmdline += " && rm -f " + KShellProcess::quote( manDirectory ) + "*"; + could_be_dirty= true; + } + + if ( Config_getBool("GENERATE_XML") ) { + QString xmlDirectory = Config_getString("XML_OUTPUT"); + if ( xmlDirectory.isEmpty() ) + xmlDirectory = "xml"; + if ( xmlDirectory.right(1) != "/" ) + xmlDirectory += "/"; + cmdline += " && rm -f " + KShellProcess::quote( xmlDirectory ) + "*"; + could_be_dirty= true; + } + + if (could_be_dirty) { + kdDebug(9026) << "Cleaning Doxygen generated API documentation using: " << cmdline << endl; makeFrontend()->queueCommand(KShellProcess::quote(project()->projectDirectory()), cmdline); + } + else + kdDebug(9026) << "No Doxygen generated API documentation exists. There's nothing to clean!" << endl; + }