Skip to content

Commit

Permalink
iox-#743 Generate doxybook2 config files to fix doxygen links, update…
Browse files Browse the repository at this point in the history
… mike, add sanity check for path and fix broken link in utils readme

Signed-off-by: Simon Hoinkis <[email protected]>
  • Loading branch information
mossmaurice-apexai committed Apr 22, 2021
1 parent 457a578 commit 85c495f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ clangd/
*/doc/xml/
site/
doc/website/API-reference/
tools/website/generated/
*.project
__pycache__
4 changes: 2 additions & 2 deletions iceoryx_utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ attribute overview of the available Queues:

### Error handling

The Error-Handler is a central instance for collecting al errors and react to them. In the file `error-handling.hpp` are all error enums collected. The Error-Handler has different error-levels, for more information see [error-handling.md](../doc/design/error-handling.md)
The Error-Handler is a central instance for collecting al errors and react to them. In the file `error-handling.hpp` are all error enums collected. The Error-Handler has different error-levels, for more information see [error-handling.md](https://github.com/eclipse-iceoryx/iceoryx/blob/master/doc/design/error-handling.md)

| class | internal | maybe obsolete | description |
|:-----------------------:|:--------:|:--------------:|:------------|
Expand All @@ -113,7 +113,7 @@ The Error-Handler is a central instance for collecting al errors and react to th

### Log

For information about how to use the logger API see [error-handling.md](../doc/design/error-handling.md)
For information about how to use the logger API see [error-handling.md](https://github.com/eclipse-iceoryx/iceoryx/blob/master/doc/design/error-handling.md)

| class | internal | maybe obsolete | description |
|:-----------------------:|:--------:|:--------------:|:------------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,22 @@
# mkdocs, v1.1.2
# Doxygen, 1.8.17
# doxybook2, v1.3.1
# mike, v0.5.5
# mike, v1.0.0

set -e

WORKSPACE=$(git rev-parse --show-toplevel)
BASENAME=$(basename $WORKSPACE)
WEBREPO="[email protected]:eclipse-iceoryx/iceoryx-web.git"
TYPE=${1:-local} #`local` starts a local webserver to inspect the results, `publish` pushes the generated doc to iceoryx_web
VERSION=$2
BRANCH=$3

if [ "$BASENAME" != "iceoryx" ]; then
echo "Git folder must be named iceoryx!"
exit 1
fi

cd $WORKSPACE

git checkout $BRANCH
Expand All @@ -42,27 +48,47 @@ cmake -Bbuild -Hiceoryx_meta -DBUILD_DOC=ON
cd $WORKSPACE/build
make -j8 doxygen_iceoryx_posh doxygen_iceoryx_utils doxygen_iceoryx_binding_c doxygen_iceoryx_dds doxygen_iceoryx_introspection

# Generate markdown from doxygen
cd $WORKSPACE

PACKAGES="utils posh c-binding DDS-gateway introspection"

# Generate doxybook2 config files, to have correct links in doxygen docu
mkdir -p $WORKSPACE/tools/website/generated/

for PACKAGE in ${PACKAGES} ; do
FILE=$WORKSPACE/tools/website/generated/doxybook2-$PACKAGE.json
rm -f $FILE
echo "{" >> $FILE
if [ "$TYPE" == "local" ]; then
echo "\"baseUrl\": \"/API-reference/$PACKAGE/\"," >> $FILE
else
echo "\"baseUrl\": \"/$VERSION/API-reference/$PACKAGE/\"," >> $FILE
fi
echo "\"indexInFolders\": false," >> $FILE
echo "\"linkSuffix\": \"/\"," >> $FILE
echo "\"mainPageInRoot\": false" >> $FILE
echo "}" >> $FILE
done

# Generate markdown from doxygen
mkdir -p $WORKSPACE/doc/website/API-reference/utils
doxybook2 --input $WORKSPACE/build/doc/iceoryx_utils/xml/ --output $WORKSPACE/doc/website/API-reference/utils
doxybook2 --input $WORKSPACE/build/doc/iceoryx_utils/xml/ --output $WORKSPACE/doc/website/API-reference/utils --config $WORKSPACE/tools/website/generated/doxybook2-utils.json

mkdir -p $WORKSPACE/doc/website/API-reference/posh
doxybook2 --input $WORKSPACE/build/doc/iceoryx_posh/xml/ --output $WORKSPACE/doc/website/API-reference/posh
doxybook2 --input $WORKSPACE/build/doc/iceoryx_posh/xml/ --output $WORKSPACE/doc/website/API-reference/posh --config $WORKSPACE/tools/website/generated/doxybook2-posh.json

mkdir -p $WORKSPACE/doc/website/API-reference/c-binding
doxybook2 --input $WORKSPACE/build/doc/iceoryx_binding_c/xml/ --output $WORKSPACE/doc/website/API-reference/c-binding
doxybook2 --input $WORKSPACE/build/doc/iceoryx_binding_c/xml/ --output $WORKSPACE/doc/website/API-reference/c-binding --config $WORKSPACE/tools/website/generated/doxybook2-c-binding.json

mkdir -p $WORKSPACE/doc/website/API-reference/DDS-gateway
doxybook2 --input $WORKSPACE/build/doc/iceoryx_dds/xml/ --output $WORKSPACE/doc/website/API-reference/DDS-gateway
doxybook2 --input $WORKSPACE/build/doc/iceoryx_dds/xml/ --output $WORKSPACE/doc/website/API-reference/DDS-gateway --config $WORKSPACE/tools/website/generated/doxybook2-DDS-gateway.json

mkdir -p $WORKSPACE/doc/website/API-reference/introspection
doxybook2 --input $WORKSPACE/build/doc/iceoryx_introspection/xml/ --output $WORKSPACE/doc/website/API-reference/introspection
doxybook2 --input $WORKSPACE/build/doc/iceoryx_introspection/xml/ --output $WORKSPACE/doc/website/API-reference/introspection --config $WORKSPACE/tools/website/generated/doxybook2-introspection.json

# Remove index files
PACKAGES="utils posh c-binding DDS-gateway introspection"
FILES="index_classes.md index_examples.md index_files.md index_modules.md index_namespaces.md index_pages.md"

FILES="index_classes.md index_examples.md index_files.md index_modules.md index_namespaces.md index_pages.md index_groups.md"

for PACKAGE in ${PACKAGES} ; do
for FILE in ${FILES} ; do
Expand Down

0 comments on commit 85c495f

Please sign in to comment.