From b041db512dacfbae316cc83ce717d27d0f4200fb Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 9 Nov 2019 22:05:21 +0100 Subject: [PATCH] doc: cleanups in the scripts finding the missing references --- docs/Build.sh | 32 +------------------------------- docs/find-missing.py | 6 +++++- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/docs/Build.sh b/docs/Build.sh index b934caa4c5..8bb15b214d 100755 --- a/docs/Build.sh +++ b/docs/Build.sh @@ -38,37 +38,7 @@ set +x perl -pe 's/(xlink:href="(?:http|.*\.html))/target="_top" $1/' \ source/img/graphical-toc.svg > build/html/graphical-toc.svg -echo "List of missing references:" -for f in $( (grep '' build/xml/msg_8h.xml; \ - grep '' build/xml/namespacesimgrid_1_1s4u.xml; \ -# grep '' build/xml/actor_8h.xml ; \ -# grep '' build/xml/barrier_8h.xml ; \ - grep '' build/xml/cond_8h.xml ; \ - grep '' build/xml/engine_8h.xml ; \ -# grep '' build/xml/host_8h.xml ; \ -# grep '' build/xml/link_8h.xml ; \ -# grep '' build/xml/mailbox_8h.xml ; \ - grep '' build/xml/msg_8h.xml ; \ -# grep '' build/xml/mutex_8h.xml ; \ -# grep '' build/xml/semaphore_8h.xml ; \ -# grep '' build/xml/vm_8h.xml ; \ -# grep '' build/xml/zone_8h.xml ; \ - grep ']*>//g' | sort ) -do - - if grep $f source/*rst | grep -q '.. doxygen[^::]*:: '"$f"'$' || - grep $f source/*rst | grep -q '.. doxygen[^::]*:: simgrid::[^:]*::[^:]*::'"$f"'$' ; then : -# echo "$f documented" - else - if grep -q $f ignored_symbols ; then : -# echo "$f ignored" # not documented - else - echo "$f" - fi - fi -done - +echo echo "Undocumented examples:" for ex in $( (cd .. ; \ find examples/s4u/ -name '*.cpp'; \ diff --git a/docs/find-missing.py b/docs/find-missing.py index c944e8532b..d6f80db963 100755 --- a/docs/find-missing.py +++ b/docs/find-missing.py @@ -92,7 +92,11 @@ def handle_python_module(fullname, englobing, elm): # Start the recursion on the provided Python modules for name in python_modules: - module = __import__(name) + try: + module = __import__(name) + except Exception: + print("Cannot import {}. Did you set PYTHONPATH=../lib accordingly?".format(name)) + sys.exit(1) for sub in dir(module): if sub[0] == '_': continue -- 2.20.1