Enable -doxygen option for SWIG bindings
I have just discovered that SWIG can handle translating Doxygen docs into PyDoc format for Python bindings, via the -doxygen
option. It would be great to support this to improve the documentation of the SWIG-generated objects.
However, when I naively try this, I get this error:
/home/duncan/opt/mambaforge/envs/py311/bin/mkdir -p swiglal_python/ && \
if env CCACHE_CPP2=1 /home/duncan/opt/mambaforge/envs/py311/bin/swig -python -relativeimport -O -builtin -doxygen -globals globalvar -outdir swiglal_python/ -Werror -Wextra -w314,506,511 -I../include -I/home/duncan/opt/mambaforge/envs/py311/include -D_ISOC99_SOURCE -DNDEBUG -D_FORTIFY_SOURCE=2 -MP -MD -MT swiglal_lal_python.c -MF ./.swigdeps/swiglal_python.deps.tmp -o swiglal_lal_python.c swiglal.i; then \
mv -f ./.swigdeps/swiglal_python.deps.tmp ./.swigdeps/swiglal_python.deps; \
else \
rm -f ./.swigdeps/swiglal_python.deps.tmp; \
exit 1; \
fi
../include/lal/SWIGLALAlpha.i:441: Error: Syntax error in input(3).
This is true on swig 4.0.2 and 4.1.1 at least.