Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
cd68727a
Commit
cd68727a
authored
Feb 03, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #90 from hakanardo/mansubdir
MAN_SUBDIR parameter
parents
2b6e3f09
83b344db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
config.xml
src/config.xml
+9
-0
mangen.cpp
src/mangen.cpp
+15
-5
No files found.
src/config.xml
View file @
cd68727a
...
@@ -2686,6 +2686,15 @@ EXTRA_PACKAGES=times
...
@@ -2686,6 +2686,15 @@ EXTRA_PACKAGES=times
the generated man pages. In case
the generated man pages. In case
the manual section does not start with a number, the number 3 is prepended.
the manual section does not start with a number, the number 3 is prepended.
The dot (.) at the beginning of the \c MAN_EXTENSION tag is optional.
The dot (.) at the beginning of the \c MAN_EXTENSION tag is optional.
]]>
</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>
</docs>
</option>
</option>
...
...
src/mangen.cpp
View file @
cd68727a
...
@@ -64,9 +64,19 @@ static QCString getExtension()
...
@@ -64,9 +64,19 @@ static QCString getExtension()
return
ext
;
return
ext
;
}
}
static
QCString
getSubdir
()
{
QCString
dir
=
Config_getString
(
"MAN_SUBDIR"
);
if
(
dir
.
isEmpty
())
{
dir
=
"man"
+
getExtension
();
}
return
dir
;
}
ManGenerator
::
ManGenerator
()
:
OutputGenerator
()
ManGenerator
::
ManGenerator
()
:
OutputGenerator
()
{
{
dir
=
Config_getString
(
"MAN_OUTPUT"
)
+
"/man"
+
getExtension
();
dir
=
Config_getString
(
"MAN_OUTPUT"
)
+
"/"
+
getSubdir
();
firstCol
=
TRUE
;
firstCol
=
TRUE
;
paragraph
=
TRUE
;
paragraph
=
TRUE
;
col
=
0
;
col
=
0
;
...
@@ -106,10 +116,10 @@ void ManGenerator::init()
...
@@ -106,10 +116,10 @@ void ManGenerator::init()
err
(
"Could not create output directory %s
\n
"
,
manOutput
.
data
());
err
(
"Could not create output directory %s
\n
"
,
manOutput
.
data
());
exit
(
1
);
exit
(
1
);
}
}
d
.
setPath
(
manOutput
+
"/man"
+
ext
);
d
.
setPath
(
manOutput
+
"/"
+
getSubdir
()
);
if
(
!
d
.
exists
()
&&
!
d
.
mkdir
(
manOutput
+
"/man"
+
ext
))
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
);
exit
(
1
);
}
}
createSubDirs
(
d
);
createSubDirs
(
d
);
...
@@ -445,7 +455,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
...
@@ -445,7 +455,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
FTextStream
linkstream
;
FTextStream
linkstream
;
linkstream
.
setDevice
(
&
linkfile
);
linkstream
.
setDevice
(
&
linkfile
);
//linkstream.setEncoding(QTextStream::UnicodeUTF8);
//linkstream.setEncoding(QTextStream::UnicodeUTF8);
linkstream
<<
".so
man"
<<
getExtension
()
<<
"/"
<<
buildFileName
(
manName
)
<<
endl
;
linkstream
<<
".so
"
<<
getSubdir
()
<<
"/"
<<
buildFileName
(
manName
)
<<
endl
;
}
}
}
}
linkfile
.
close
();
linkfile
.
close
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment