summaryrefslogtreecommitdiffstats
path: root/src/cite.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-07-31 10:49:36 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-07-31 10:49:36 (GMT)
commit44c1f04b2bc28fbeb14b6d4e17fda0cd029b6890 (patch)
tree1ed8b9f09f905c1751b0e692b4907e9acab0ed9e /src/cite.cpp
parentf94a2f3a895f2601226845d16093546757a540e6 (diff)
downloadDoxygen-44c1f04b2bc28fbeb14b6d4e17fda0cd029b6890.zip
Doxygen-44c1f04b2bc28fbeb14b6d4e17fda0cd029b6890.tar.gz
Doxygen-44c1f04b2bc28fbeb14b6d4e17fda0cd029b6890.tar.bz2
Debug facility for the \cite command
When issuing doxygen with `-d cite` the temporary (copied) files / directory are not removed, i.e.: - bib*.aux - bib*.bbl - bib*.blg - bib2xhtml.pl - citelist.doc - doxygen.bst - bibTmpDir (directory)
Diffstat (limited to 'src/cite.cpp')
-rw-r--r--src/cite.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cite.cpp b/src/cite.cpp
index 78df0c3..07a6dbf 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -22,6 +22,7 @@
#include "portable.h"
#include "resourcemgr.h"
#include "util.h"
+#include "debug.h"
#include <qfile.h>
#include <qfileinfo.h>
@@ -30,10 +31,6 @@
#include <map>
#include <string>
-// Remove the temporary files
-#define RM_TMP_FILES (true)
-//#define RM_TMP_FILES (false)
-
const char *bibTmpFile = "bibTmpFile_";
const char *bibTmpDir = "bibTmpDir/";
@@ -115,6 +112,8 @@ void CitationManager::generatePage()
// do not generate an empty citations page
if (isEmpty()) return; // nothing to cite
+ bool citeDebug = Debug::isFlagSet(Debug::Cite);
+
// 0. add cross references from the bib files to the cite dictionary
QFile f;
const StringVector &citeDataList = Config_getList(CITE_BIB_FILES);
@@ -233,7 +232,7 @@ void CitationManager::generatePage()
int exitCode;
Portable::sysTimerStop();
if ((exitCode=Portable::system("perl","\""+bib2xhtmlFile+"\" "+bibOutputFiles+" \""+
- citeListFile+"\"")) != 0)
+ citeListFile+"\"" + (citeDebug ? " -d" : ""))) != 0)
{
err("Problems running bibtex. Verify that the command 'perl --version' works from the command line. Exit code: %d\n",
exitCode);
@@ -327,7 +326,7 @@ void CitationManager::generatePage()
}
// 9. Remove temporary files
- if (RM_TMP_FILES)
+ if (!citeDebug)
{
thisDir.remove(citeListFile);
thisDir.remove(doxygenBstFile);