Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bug_771606 'doxygen -w' should not require existence of header.html/f…
…ooter.html even if listed in an options file

In case of usage of the `-w` option with doxygen don't check on the existence of files mentioned in the Doxyfile
  • Loading branch information
albert-github committed Dec 16, 2021
1 parent b5b1163 commit 75ee26d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/config.h
Expand Up @@ -83,8 +83,9 @@ namespace Config

/*! Check the validity of the parsed options and correct or warn the user where needed.
* \param quiet setting for the QUIET option (can have been overruled by means of a command line option)
* \param check check HTML / LaTeX header file etc. on existance (and terminate when not present)
*/
void checkAndCorrect(bool quiet);
void checkAndCorrect(bool quiet, const bool check);

/*! Adjust any configuration values based on the value of obsolete options. */
void updateObsolete();
Expand Down
12 changes: 6 additions & 6 deletions src/configimpl.l
Expand Up @@ -1551,7 +1551,7 @@ static void checkList(const StringVector &list,const char *name, bool equalRequi
}
}

void Config::checkAndCorrect(bool quiet)
void Config::checkAndCorrect(bool quiet, const bool check)
{
ConfigValues::instance().init();

Expand Down Expand Up @@ -1611,7 +1611,7 @@ void Config::checkAndCorrect(bool quiet)
//------------------------
// Test to see if HTML header is valid
QCString headerFile = Config_getString(HTML_HEADER);
if (!headerFile.isEmpty())
if (check && !headerFile.isEmpty())
{
FileInfo fi(headerFile.str());
if (!fi.exists())
Expand All @@ -1624,7 +1624,7 @@ void Config::checkAndCorrect(bool quiet)
//------------------------
// Test to see if HTML footer is valid
QCString footerFile = Config_getString(HTML_FOOTER);
if (!footerFile.isEmpty())
if (check && !footerFile.isEmpty())
{
FileInfo fi(footerFile.str());
if (!fi.exists())
Expand Down Expand Up @@ -1656,7 +1656,7 @@ void Config::checkAndCorrect(bool quiet)
}

QCString mathJaxCodefile = Config_getString(MATHJAX_CODEFILE);
if (!mathJaxCodefile.isEmpty())
if (check && !mathJaxCodefile.isEmpty())
{
FileInfo fi(mathJaxCodefile.str());
if (!fi.exists())
Expand Down Expand Up @@ -1686,7 +1686,7 @@ void Config::checkAndCorrect(bool quiet)
//------------------------
// Test to see if LaTeX header is valid
QCString latexHeaderFile = Config_getString(LATEX_HEADER);
if (!latexHeaderFile.isEmpty())
if (check && !latexHeaderFile.isEmpty())
{
FileInfo fi(latexHeaderFile.str());
if (!fi.exists())
Expand All @@ -1699,7 +1699,7 @@ void Config::checkAndCorrect(bool quiet)
//------------------------
// Test to see if LaTeX footer is valid
QCString latexFooterFile = Config_getString(LATEX_FOOTER);
if (!latexFooterFile.isEmpty())
if (check && !latexFooterFile.isEmpty())
{
FileInfo fi(latexFooterFile.str());
if (!fi.exists())
Expand Down
6 changes: 3 additions & 3 deletions src/doxygen.cpp
Expand Up @@ -10909,7 +10909,7 @@ void readConfiguration(int argc, char **argv)
}
Config::postProcess(TRUE);
Config::updateObsolete();
Config::checkAndCorrect(Config_getBool(QUIET));
Config::checkAndCorrect(Config_getBool(QUIET), false);

setTranslator(Config_getEnum(OUTPUT_LANGUAGE));

Expand Down Expand Up @@ -10955,7 +10955,7 @@ void readConfiguration(int argc, char **argv)
}
Config::postProcess(TRUE);
Config::updateObsolete();
Config::checkAndCorrect(Config_getBool(QUIET));
Config::checkAndCorrect(Config_getBool(QUIET), false);

setTranslator(Config_getEnum(OUTPUT_LANGUAGE));

Expand Down Expand Up @@ -11145,7 +11145,7 @@ void checkConfiguration()

Config::postProcess(FALSE);
Config::updateObsolete();
Config::checkAndCorrect(Config_getBool(QUIET));
Config::checkAndCorrect(Config_getBool(QUIET), true);
initWarningFormat();
}

Expand Down

0 comments on commit 75ee26d

Please sign in to comment.