ubuntu上doxygen通过源代码生成文档
工具安装
$ apt-cache search doxygen | grep doxygen
doxygen - Documentation system for C, C++, Java, Python and other languages
...
$ apt install -y doxygen
...
doxygen说明
$ doxygen --help
Doxygen version 1.8.13
Copyright Dimitri van Heesch 1997-2015
You can use doxygen in a number of ways:
1) Use doxygen to generate a template configuration file:
doxygen [-s] -g [configName]
If - is used for configName doxygen will write to standard output.
2) Use doxygen to update an old configuration file:
doxygen [-s] -u [configName]
3) Use doxygen to generate documentation using an existing configuration file:
doxygen [configName]
If - is used for configName doxygen will read from standard input.
4) Use doxygen to generate a template file controlling the layout of the
generated documentation:
doxygen -l [layoutFileName.xml]
5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.
RTF: doxygen -w rtf styleSheetFile
HTML: doxygen -w html headerFile footerFile styleSheetFile [configFile]
LaTeX: doxygen -w latex headerFile footerFile styleSheetFile [configFile]
6) Use doxygen to generate a rtf extensions file
RTF: doxygen -e rtf extensionsFile
If -s is specified the comments of the configuration items in the config file will be omitted.
If configName is omitted `Doxyfile' will be used as a default.
-v print version string
百度翻译一下
$doxygen--帮助
Doxygen 1.8.13版
版权所有Dimitri van Heesch 1997-2015
您可以通过多种方式使用doxygen:
1) 使用doxygen生成模板配置文件:
doxygen[-s]-g[configName]
如果-用于configName,doxygen将写入标准输出。
2) 使用doxygen更新旧配置文件:
doxygen[-s]-u[configName]
3) 使用doxygen使用现有配置文件生成文档:
doxygen[configName]
如果-用于configName,则doxygen将从标准输入中读取。
4) 使用doxygen生成控制
生成的文档:
doxygen-l[layoutFileName.xml]
5) 使用doxygen为RTF、HTML或Latex生成模板样式表文件。
RTF:doxygen-w RTF样式表文件
HTML:doxygen-w HTML headerFile footerFile styleSheetFile[configFile]
LaTeX:doxygen-w乳胶头文件页脚文件样式表文件[configFile]
6) 使用doxygen生成rtf扩展名文件
RTF:doxygen-e RTF扩展名文件
如果指定了-s,则将省略配置文件中配置项的注释。
如果省略configName,则默认使用“Doxyfile”。
-v打印版本字符串
生成文档
一些需要自己编译的库,会准备好doxyfile文件,直接使用就可生辰文档。
doxygen DoxyFile
安装一个文件服务器
笔者使用nginx为例子
apt install -y nginx
将生成的html拷贝到文件服务器目录
cp /root/workspace/libpqxx-6.4.8/doc/html/Reference /var/www/html/libpqxx -r
打开网址即可查看文档
http://192.168.1.41/libpqxx/