Skip to content

Commit 64898cf

Browse files
committed
doc/doxygen: Add a check for the GraphViz dependency
1 parent 9cd4964 commit 64898cf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

doc/doxygen/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,23 @@ include $(RIOTMAKE)/utils/ansi.mk
4343
include $(RIOTMAKE)/color.inc.mk
4444

4545
.PHONY: doc doc-man doc-latex
46-
doc doc-man doc-latex: $(DOCUMENTATION_FORMAT)
46+
doc doc-man doc-latex: graphviz-check $(DOCUMENTATION_FORMAT)
4747
@if [ "`{ echo "$(DOXYGEN_MIN_VERSION)"; echo "$(DOXYGEN_CUR_VERSION)"; } | \
4848
sort -V | head -n1`" != "$(DOXYGEN_MIN_VERSION)" ]; then \
4949
$(COLOR_ECHO) "$(COLOR_RED)Warning: Doxygen version $(DOXYGEN_CUR_VERSION) is too old." \
5050
"It is recommended to use at least version $(DOXYGEN_MIN_VERSION)" \
5151
"to avoid incorrectly formatted output.$(COLOR_RESET)"; \
5252
fi
5353

54+
# GraphViz is a mandatory dependency to generate the Doxygen documentation for RIOT
55+
.PHONY: graphviz-check
56+
graphviz-check:
57+
@command -v dot >/dev/null 2>&1 || { \
58+
$(COLOR_ECHO) "$(COLOR_RED)Error: GraphViz (dot) is not installed." \
59+
"GraphViz is mandatory to generate the RIOT documentation.$(COLOR_RESET)"; \
60+
exit 1; \
61+
}
62+
5463
.PHONY: doc-ci
5564
doc-ci: $(RIOTTOOLS)/doxygen/Makefile
5665
@PKG_VERSION=$(DOXYGEN_VERSION) $(MAKE) -C $(RIOTTOOLS)/doxygen all --no-print-directory

0 commit comments

Comments
 (0)