【发布时间】:2016-11-23 21:18:17
【问题描述】:
我尝试用 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 文件:-)。
第,
启
【问题讨论】: