Doxygen 忽略 makefile 中格式正确的注释
Doxygen ignores wellformed comments in makefile
我尝试用 doxygen 记录我的构建系统(目前是一堆 make 文件和 shell 脚本)。我发现的唯一有用的提示是:
Can doxygen be used to document makefile templates and include *.mk file interfaces?
我使用 πάντα ῥεῖ 答案来编辑我的 doxyfile:
FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.c++ *.h *.hpp *.h++ *.md *.markdown *.mk
INPUT_FILTER = "sed -e 's|##|//!|'"
FILTER_PATTERNS =
FILTER_SOURCE_FILES = YES
但我的文档产生了这个:
//!
//! @file environment.mk
//! @brief Environment variables and definitions for the build system
//!
//! Insert detailed descritpion here
//!
//! @date 23.11.2016
//! @author @kgoedde
//!
//!
//! @cond
//!
# always the project directory
export top = $(abspath $(shell pwd))
export project_name = $(notdir $(shell pwd))
# Setting compiler and linker
CXX = clang++
LD = clang++
AR = ar
CXXFLAGS = -O0 -g3 -Wall -c -fmessage-length=0 -fPIC -std=c++14 -pthread
TCXXFLAGS = -Wall -c -fmessage-length=0 -fPIC -std=c++14 -pthread
LDFLAGS = -pthread
TLDFLAGS = -pthread
ARFLAGS = -rs
# Standard include paths
INCDIRS = ${top}/include/thirdparty ${top}/include/main
TINCDIRS = ${INCDIRS} ${top}/include/test
# Stadard library paths
LIBDIRS = /usr/lib64
//!
//! @endcond
//!
所以它使用了过滤器但没有处理评论。目前 doxygen 文档很少,有人知道我做错了什么吗?
谢谢,
启
在 Arthur 的帮助下,我学到了另外一件事(对于感兴趣的人):而不是
INPUT_FILTER = "sed -e 's|##|//!|'"
我设置
FILTER_PATTERNS = *.mk="sed -e 's|##|//!|'"
现在它只过滤 *.mk 文件:-)。
Hth,
启
您的文件扩展名仍然是 .mk
,这不是受支持的扩展名。
如 FILE_PATTERNS
和 INPUT_FILTER
所述:
# Note that for custom extensions or not directly supported extensions you also
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# read by doxygen.
所以你需要添加
EXTENSION_MAPPING = mk=c
我尝试用 doxygen 记录我的构建系统(目前是一堆 make 文件和 shell 脚本)。我发现的唯一有用的提示是:
Can doxygen be used to document makefile templates and include *.mk file interfaces?
我使用 πάντα ῥεῖ 答案来编辑我的 doxyfile:
FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.c++ *.h *.hpp *.h++ *.md *.markdown *.mk
INPUT_FILTER = "sed -e 's|##|//!|'"
FILTER_PATTERNS =
FILTER_SOURCE_FILES = YES
但我的文档产生了这个:
//!
//! @file environment.mk
//! @brief Environment variables and definitions for the build system
//!
//! Insert detailed descritpion here
//!
//! @date 23.11.2016
//! @author @kgoedde
//!
//!
//! @cond
//!
# always the project directory
export top = $(abspath $(shell pwd))
export project_name = $(notdir $(shell pwd))
# Setting compiler and linker
CXX = clang++
LD = clang++
AR = ar
CXXFLAGS = -O0 -g3 -Wall -c -fmessage-length=0 -fPIC -std=c++14 -pthread
TCXXFLAGS = -Wall -c -fmessage-length=0 -fPIC -std=c++14 -pthread
LDFLAGS = -pthread
TLDFLAGS = -pthread
ARFLAGS = -rs
# Standard include paths
INCDIRS = ${top}/include/thirdparty ${top}/include/main
TINCDIRS = ${INCDIRS} ${top}/include/test
# Stadard library paths
LIBDIRS = /usr/lib64
//!
//! @endcond
//!
所以它使用了过滤器但没有处理评论。目前 doxygen 文档很少,有人知道我做错了什么吗?
谢谢,
启
在 Arthur 的帮助下,我学到了另外一件事(对于感兴趣的人):而不是
INPUT_FILTER = "sed -e 's|##|//!|'"
我设置
FILTER_PATTERNS = *.mk="sed -e 's|##|//!|'"
现在它只过滤 *.mk 文件:-)。
Hth,
启
您的文件扩展名仍然是 .mk
,这不是受支持的扩展名。
如 FILE_PATTERNS
和 INPUT_FILTER
所述:
# Note that for custom extensions or not directly supported extensions you also
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# read by doxygen.
所以你需要添加
EXTENSION_MAPPING = mk=c