3 # Copyright (c) 2018-2023. The SimGrid Team. All rights reserved.
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of the license (GNU LGPL) which comes with this package.
8 # Simplistic script to rebuild our documentation with sphinx-build
10 # If you are missing some dependencies, try: pip3 install --requirement docs/requirements.txt
12 # Python needs to find simgrid on my machine, but not ctest -- sorry for the hack
13 if [ -e /opt/simgrid ] ; then chmod +x /opt/simgrid; fi
18 if [ "x$1" != 'xdoxy' ] && [ -e build/xml ] ; then
19 echo "Doxygen not rerun: 'doxy' was not provided as an argument"
22 rm -rf build/xml source/api/
23 (cd source; doxygen 2>&1; cd ..) | (grep -v "is not documented." || true) # XXXXX Reduce the verbosity for now
27 if [ "x$1" != 'xlogs' ] && [ -e build/log_categories.rst ] ; then
28 echo "Log categories not extracted: 'logs' was not provided as an argument"
31 perl ./bin/extract_logs_hierarchy.pl ../ > build/log_categories.rst
35 PYTHONPATH=../lib sphinx-build -M html source build ${SPHINXOPTS} 2>&1
39 perl -pe 's/(xlink:href="(?:http|.*\.html))/target="_top" $1/' \
40 source/img/graphical-toc.svg > build/html/graphical-toc.svg
43 echo "Undocumented examples:"
44 for ex in $( (cd .. ; \
45 find examples/cpp/ -name '*.cpp'; \
46 find examples/c/ -name '*.c'; \
47 find examples/python -name '*.py'; \
50 if grep -q "example-tab:: $ex" ../examples/README.rst ; then :
51 # echo "found example-tab:: $ex"
52 elif grep -q "showfile:: $ex" ../examples/README.rst ; then :
59 if [ -e /usr/bin/linkchecker ] ; then
60 linkchecker --no-status -o csv --ignore-url='.*\.css$' --ignore-url=build/html/_modules build/html \
62 | grep -v 'urlname;parentname;baseref;result;warningstring'
65 echo "Install linkchecker to have it executed when you build the doc."