File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1919#
2020import os
2121import sys
22+ import subprocess
2223# sys.path.insert(0, os.path.abspath('.'))
2324
2425
165166 'Miscellaneous' ),
166167]
167168
169+ def generate_doxygen_xml (app ):
170+ build_dir = '_build'
171+ if not os .path .exists (build_dir ):
172+ os .mkdir (build_dir )
173+
174+ try :
175+ subprocess .call (['doxygen' , '--version' ])
176+ retcode = subprocess .call (['doxygen' ])
177+ if retcode < 0 :
178+ sys .stderr .write ("doxygen error code: {}\n " .format (- retcode ))
179+ except OSError as e :
180+ sys .stderr .write ("doxygen execution failed: {}\n " .format (e ))
181+
182+
183+ def setup (app ):
184+ """Add hook for building doxygen xml when needed"""
185+ app .connect ("builder-inited" , generate_doxygen_xml )
186+
168187
169188
Original file line number Diff line number Diff line change 1- /* ! Add two integers */
1+ /* ! Add two integers woo! */
22int add (int i, int j);
33/* ! Subtract one integer from another */
44int subtract (int i, int j);
You can’t perform that action at this time.
0 commit comments