mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
updated API doc generation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
a9a673bb8a
commit
b855313141
|
@ -4,6 +4,7 @@ import re
|
||||||
import pydoc
|
import pydoc
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import shutil
|
||||||
|
|
||||||
def mk_dir(d):
|
def mk_dir(d):
|
||||||
if not os.path.exists(d):
|
if not os.path.exists(d):
|
||||||
|
@ -22,19 +23,25 @@ def cleanup_API(inf, outf):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mk_dir('api/html')
|
mk_dir('api/html')
|
||||||
cleanup_API('../src/api/z3_api.h', 'z3_api.h')
|
mk_dir('tmp')
|
||||||
|
shutil.copyfile('website.dox', 'tmp/website.dox')
|
||||||
|
cleanup_API('../src/api/z3_api.h', 'tmp/z3_api.h')
|
||||||
|
|
||||||
print "Removed annotations from z3_api.h."
|
print "Removed annotations from z3_api.h."
|
||||||
DEVNULL = open(os.devnull, 'wb')
|
|
||||||
try:
|
try:
|
||||||
if subprocess.call(['doxygen', 'z3api.dox'], stdout=DEVNULL, stderr=DEVNULL) != 0:
|
if subprocess.call(['doxygen', 'z3api.dox']) != 0:
|
||||||
print "ERROR: doxygen returned nonzero return code"
|
print "ERROR: doxygen returned nonzero return code"
|
||||||
exit(1)
|
exit(1)
|
||||||
except:
|
except:
|
||||||
print "ERROR: failed to execute 'doxygen', make sure doxygen (http://www.doxygen.org) is available in your system."
|
print "ERROR: failed to execute 'doxygen', make sure doxygen (http://www.doxygen.org) is available in your system."
|
||||||
exit(1)
|
exit(1)
|
||||||
print "Generated C and .NET API documentation."
|
print "Generated C and .NET API documentation."
|
||||||
os.remove('z3_api.h')
|
os.remove('tmp/z3_api.h')
|
||||||
print "Removed temporary file z3_api.h."
|
print "Removed temporary file z3_api.h."
|
||||||
|
os.remove('tmp/website.dox')
|
||||||
|
print "Removed temporary file website.dox"
|
||||||
|
os.removedirs('tmp')
|
||||||
|
print "Removed temporary directory tmp."
|
||||||
sys.path.append('../src/api/python')
|
sys.path.append('../src/api/python')
|
||||||
pydoc.writedoc('z3')
|
pydoc.writedoc('z3')
|
||||||
shutil.move('z3.html', 'api/html/z3.html')
|
shutil.move('z3.html', 'api/html/z3.html')
|
||||||
|
|
4
doc/update_code_website.cmd
Normal file
4
doc/update_code_website.cmd
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
REM Script for updating the website containing the Z3 Code documentation.
|
||||||
|
REM You must be inside the Microsoft network to execute this script, and
|
||||||
|
REM robocopy must be in your PATH.
|
||||||
|
robocopy /S code\html \\research\root\web\external\en-us\UM\redmond\projects\z3\code
|
605
doc/z3api.dox
605
doc/z3api.dox
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue