Skip to content

Commit

Permalink
make: add graph_reverse and inject it in the docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
asherikov committed Jan 23, 2025
1 parent c221de9 commit be921d8
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ graph:
@test -z "${PKG}" || ${CMD_PKG_GRAPH} --packages-up-to ${PKG}
@test -n "${PKG}" || ${CMD_PKG_GRAPH}

graph_reverse: assert_PKG_arg_must_be_specified
@test -z "${PKG}" || ${CMD_PKG_GRAPH} --packages-above ${PKG}

##
## Other targets
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,4 @@ TODO
- Control symbol visibility and verify with
<https://github.com/yugr/ShlibVisibilityChecker>.
- Add `CodeQL` profile (<https://github.com/github/codeql>).
- cmake 3.21: `--output-junit <file> = Output test results to JUnit XML file.`
1 change: 1 addition & 0 deletions ccws/profiles/build/doxygen/DoxygenLayout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
<tab type="user" url="./pkg_dependency_graph.svg" title="Dependencies"/>
<tab type="user" url="./pkg_reverse_dependency_graph.svg" title="Reverse dependencies"/>
<tab type="user" url="../index.html" title="Package index"/>
</navindex>

Expand Down
3 changes: 2 additions & 1 deletion ccws/profiles/build/doxygen/targets.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bp_doxygen_build: doxclean assert_doxygen_installed
cat \$${CCWS_DOXYGEN_CONFIG_DIR}/index_header.html > index.html; \
echo '<table border="1">' >> index.html; \
find ./ -mindepth 2 -maxdepth 2 -name 'index.html' | sort \
| sed -e 's|./\(.*\)/index.html|<tr><td><a href=\"./\1/index.html\">\1</a></td><td><a href=\"./\1/pkg_dependency_graph.svg\">dependency graph</a></td><tr>|' >> index.html; \
| sed -e 's|./\(.*\)/index.html|<tr><td><a href=\"./\1/index.html\">\1</a></td><td><a href=\"./\1/pkg_dependency_graph.svg\">dependency graph</a></td><td><a href=\"./\1/pkg_reverse_dependency_graph.svg\">reverse dependency graph</a></td></tr>|' >> index.html; \
echo '</table><h3>Summary</h3><ul><li>packages: ' >> index.html; \
cat \$${CCWS_DOXYGEN_WORKING_DIR}/package_num >> index.html; \
echo '</li>' >> index.html; \
Expand All @@ -39,6 +39,7 @@ dox: assert_PKG_arg_must_be_specified assert_doxygen_installed
cat \$${CCWS_DOXYGEN_WORKING_DIR}/${PKG}/deps | xargs -I {} cat {} >> \$${CCWS_DOXYGEN_WORKING_DIR}/${PKG}/Doxyfile; \
mkdir -p \$${CCWS_DOXYGEN_OUTPUT_DIR}/${PKG}; \
${MAKE_QUIET} graph | sed 's@ \"\\(.*\\)\";@ \"\\1\" [URL=\"../\\1/index.html\"];@' | dot -Tsvg > \$${CCWS_DOXYGEN_OUTPUT_DIR}/${PKG}/pkg_dependency_graph.svg; \
${MAKE_QUIET} graph_reverse | sed 's@ \"\\(.*\\)\";@ \"\\1\" [URL=\"../\\1/index.html\"];@' | dot -Tsvg > \$${CCWS_DOXYGEN_OUTPUT_DIR}/${PKG}/pkg_reverse_dependency_graph.svg; \
cd `${CMD_PKG_LIST} | grep '^${PKG}[[:blank:]]' | sed 's/.*\t\(.*\)\t.*/\1/'`; \
echo 'TAGFILES+=\"\$$(CCWS_DOXYGEN_WORKING_DIR)/${PKG}/tags.xml=../${PKG}/\"' > \$${CCWS_DOXYGEN_WORKING_DIR}/${PKG}/Doxyfile.append; \
find ~+ -path '*include/*' -type d | sed -e 's/\(.*\)/INCLUDE_PATH+=\"\1\"/' >> \$${CCWS_DOXYGEN_WORKING_DIR}/${PKG}/Doxyfile.append; \
Expand Down
2 changes: 1 addition & 1 deletion ccws/profiles/build/static_checks/targets.mk
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ yamllint:
commas: disable, \
comments: {require-starting-space: false, min-spaces-from-content: 0}, \
document-start: disable, \
indentation: {spaces: consistent, indent-sequences: consistent}, \
indentation: disable, \
line-length: disable, \
trailing-spaces: disable, \
new-line-at-end-of-file: disable, \
Expand Down
1 change: 1 addition & 0 deletions ccws/tests/test_main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ test:
${MAKE} BUILD_PROFILE=doxygen
${MAKE} graph PKG=staticoma
${MAKE} graph
${MAKE} graph_reverse PKG=staticoma
${MAKE} cache_clean
# ---
# cppcheck
Expand Down
1 change: 1 addition & 0 deletions ccws/tests/test_main_ros2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ test:
${MAKE} BUILD_PROFILE=doxygen
${MAKE} graph PKG=examples_rclcpp_minimal_subscriber
${MAKE} graph
${MAKE} graph_reverse PKG=examples_rclcpp_minimal_subscriber
${MAKE} cache_clean
# ---
${MAKE} wspurge
Expand Down
1 change: 1 addition & 0 deletions ccws/tests/test_main_ros2_ccws2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ test:
${MAKE} BUILD_PROFILE=doxygen
${MAKE} graph PKG=examples_rclcpp_minimal_subscriber
${MAKE} graph
${MAKE} graph_reverse PKG=examples_rclcpp_minimal_subscriber
${MAKE} cache_clean
# ---
${MAKE} wspurge
Expand Down

0 comments on commit be921d8

Please sign in to comment.