我尝试使用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文件: - )。
H个,
启
答案 0 :(得分:1)
您的文件扩展名仍然是.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