Doxygen忽略makefile中格式良好的注释
我试图用doxygen记录我的构建系统(目前有一堆make文件和shell脚本)。我发现的唯一有用的提示是: 我使用answer编辑我的doxyfile:Doxygen忽略makefile中格式良好的注释,makefile,filter,doxygen,Makefile,Filter,Doxygen,我试图用doxygen记录我的构建系统(目前有一堆make文件和shell脚本)。我发现的唯一有用的提示是: 我使用answer编辑我的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_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文档在这一点上是稀疏的,有人知道我做错了什么吗
谢谢,
凯
在他的帮助下,我学到了另外一件事(对感兴趣的人来说):代替
INPUT_FILTER = "sed -e 's|##|//!|'"
我设定
现在它只过滤*.mk文件:-)
嗯,
Kai您的文件扩展名仍然是
.mk
,该扩展名不受支持
如文件模式
和输入过滤器
所述:
# 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
EXTENSION_MAPPING = mk=c