diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-02-03 20:25:47 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-02-03 20:25:47 (GMT) |
commit | cd68727a749fb2d3fd7ade308a080646989564a2 (patch) | |
tree | 3aa14ef8d1827632ad089f5103a8cfe5f3ed0980 /src | |
parent | 2b6e3f0955951ce712176e1a98fca1295f634302 (diff) | |
parent | 83b344db49b27bf68994eb8ec6be87d6d0f24e86 (diff) | |
download | Doxygen-cd68727a749fb2d3fd7ade308a080646989564a2.zip Doxygen-cd68727a749fb2d3fd7ade308a080646989564a2.tar.gz Doxygen-cd68727a749fb2d3fd7ade308a080646989564a2.tar.bz2 |
Merge pull request #90 from hakanardo/mansubdir
MAN_SUBDIR parameter
Diffstat (limited to 'src')
-rw-r--r-- | src/config.xml | 9 | ||||
-rw-r--r-- | src/mangen.cpp | 20 |
2 files changed, 24 insertions, 5 deletions
diff --git a/src/config.xml b/src/config.xml index e172345..f8d4a13 100644 --- a/src/config.xml +++ b/src/config.xml @@ -2689,6 +2689,15 @@ EXTRA_PACKAGES=times ]]> </docs> </option> + <option type='string' id='MAN_SUBDIR' format='string' defval='' depends='GENERATE_MAN'> + <docs> +<![CDATA[ + The \c MAN_SUBDIR tag determines the name of the directory created within \c MAN_OUTPUT + in which the man pages are placed. If defaults to man followed by \c MAN_EXTENSION + with the initial . removed. +]]> + </docs> + </option> <option type='bool' id='MAN_LINKS' defval='0' depends='GENERATE_MAN'> <docs> <![CDATA[ diff --git a/src/mangen.cpp b/src/mangen.cpp index a50ee73..f1cc76a 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -64,9 +64,19 @@ static QCString getExtension() return ext; } +static QCString getSubdir() +{ + QCString dir = Config_getString("MAN_SUBDIR"); + if (dir.isEmpty()) + { + dir = "man" + getExtension(); + } + return dir; +} + ManGenerator::ManGenerator() : OutputGenerator() { - dir=Config_getString("MAN_OUTPUT")+"/man" + getExtension(); + dir=Config_getString("MAN_OUTPUT") + "/" + getSubdir(); firstCol=TRUE; paragraph=TRUE; col=0; @@ -106,10 +116,10 @@ void ManGenerator::init() err("Could not create output directory %s\n",manOutput.data()); exit(1); } - d.setPath(manOutput+"/man"+ext); - if (!d.exists() && !d.mkdir(manOutput+"/man"+ext)) + d.setPath(manOutput + "/" + getSubdir()); + if (!d.exists() && !d.mkdir(manOutput + "/" + getSubdir())) { - err("Could not create output directory %s/man%s\n",manOutput.data(),ext.data()); + err("Could not create output directory %s/%s\n",manOutput.data(), getSubdir().data()); exit(1); } createSubDirs(d); @@ -445,7 +455,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName, FTextStream linkstream; linkstream.setDevice(&linkfile); //linkstream.setEncoding(QTextStream::UnicodeUTF8); - linkstream << ".so man" << getExtension() << "/" << buildFileName( manName ) << endl; + linkstream << ".so " << getSubdir() << "/" << buildFileName( manName ) << endl; } } linkfile.close(); |