Script documentation generation and UML support (#992)
Documentation is now generated by invoking a shell script
which takes care of all the plumbing.
There is now also support of inlineing PlantUML syntax with
Doxygen. This inlining takes the form of
@startuml{imagename.png}
'PlantUML specific syntax'
@enduml
The inlineing can be made in C syntax comment blocks.
Doxygen will then include the generated UML diagram when
rendering the HTML documentation.
All generated images will be placed under Documentation/img
which is the default search path for Doxygen.
This commit is contained in:
committed by
Mikael Falkvidd
parent
1f8d810ff4
commit
356b783e19
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
## Invoke from project root, e.g Documentation/doxygen.sh
|
||||
|
||||
# Generate doxygen file for Raspberry Pi configure command
|
||||
echo -e "/**\n * @defgroup RaspberryPiGateway Raspberry Pi Gateway\n * @ingroup MyConfigGrp\n * @brief Configuration options for the Raspberry Pi Gateway\n@{\n@verbatim" > configure.h
|
||||
grep -A999 '<<EOF' configure | grep -B999 EOF | grep -v 'EOF' >> configure.h
|
||||
echo -e "@endverbatim\n@}*/\n" >> configure.h
|
||||
|
||||
# Generate version information
|
||||
export PROJECTNUMBER=$(
|
||||
if [[ $(git rev-parse --abbrev-ref HEAD) == "master" ]]; then
|
||||
git describe --tags ;
|
||||
else
|
||||
git rev-parse --short HEAD ;
|
||||
fi
|
||||
)
|
||||
|
||||
# Generate any UML diagrams in the code tree that has the proper tags
|
||||
export PLANTUML_JAR_PATH=Documentation/plantuml.jar
|
||||
java -Djava.awt.headless=true -jar $PLANTUML_JAR_PATH -failfast2 -nbthread auto -o "$PWD/Documentation/img" "./**.(c|cpp|dox|h|hpp|ino)"
|
||||
|
||||
# Launch Doxygen (assumed to be in the PATH)
|
||||
doxygen
|
||||
|
||||
# Show any warnings created
|
||||
cat doxygen.log
|
||||
|
||||
# Clean up autogenerated (temporary) artifacts
|
||||
rm configure.h
|
||||
Binary file not shown.
Reference in New Issue
Block a user