mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-21 00:11:50 +02:00
Release 0.5.0
This commit is contained in:
commit
c45da10999
18
doxybuild.py
18
doxybuild.py
@ -89,7 +89,7 @@ def do_subst_in_file(targetfile, sourcefile, dict):
|
|||||||
print "Can't write target file %s"%targetfile
|
print "Can't write target file %s"%targetfile
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def run_doxygen(doxygen_path, config_file, working_dir):
|
def run_doxygen(doxygen_path, config_file, working_dir, is_silent):
|
||||||
config_file = os.path.abspath( config_file )
|
config_file = os.path.abspath( config_file )
|
||||||
doxygen_path = doxygen_path
|
doxygen_path = doxygen_path
|
||||||
old_cwd = os.getcwd()
|
old_cwd = os.getcwd()
|
||||||
@ -104,9 +104,14 @@ def run_doxygen(doxygen_path, config_file, working_dir):
|
|||||||
print 'Documentation generation failed'
|
print 'Documentation generation failed'
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
try:
|
if is_silent:
|
||||||
subprocess.check_call( cmd )
|
process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
|
||||||
except subprocess.CalledProcessError:
|
else:
|
||||||
|
process = subprocess.Popen( cmd )
|
||||||
|
stdout, _ = process.communicate()
|
||||||
|
if process.returncode:
|
||||||
|
print 'Documentation generation failed:'
|
||||||
|
print stdout
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
finally:
|
finally:
|
||||||
@ -119,6 +124,7 @@ def build_doc( options, make_release=False ):
|
|||||||
options.with_html_help = True
|
options.with_html_help = True
|
||||||
options.with_uml_look = True
|
options.with_uml_look = True
|
||||||
options.open = False
|
options.open = False
|
||||||
|
options.silent = True
|
||||||
|
|
||||||
version = open('version','rt').read().strip()
|
version = open('version','rt').read().strip()
|
||||||
output_dir = '../build/doxygen' # relative to doc/doxyfile location.
|
output_dir = '../build/doxygen' # relative to doc/doxyfile location.
|
||||||
@ -148,7 +154,7 @@ def build_doc( options, make_release=False ):
|
|||||||
os.makedirs( full_output_dir )
|
os.makedirs( full_output_dir )
|
||||||
|
|
||||||
do_subst_in_file( 'doc/doxyfile', 'doc/doxyfile.in', subst_keys )
|
do_subst_in_file( 'doc/doxyfile', 'doc/doxyfile.in', subst_keys )
|
||||||
ok = run_doxygen( options.doxygen_path, 'doc/doxyfile', 'doc' )
|
ok = run_doxygen( options.doxygen_path, 'doc/doxyfile', 'doc', is_silent=options.silent )
|
||||||
print open(os.path.join('doc', warning_log_path), 'rb').read()
|
print open(os.path.join('doc', warning_log_path), 'rb').read()
|
||||||
if not ok:
|
if not ok:
|
||||||
print 'Doxygen generation failed'
|
print 'Doxygen generation failed'
|
||||||
@ -192,6 +198,8 @@ def main():
|
|||||||
help="""Open the HTML index in the web browser after generation""")
|
help="""Open the HTML index in the web browser after generation""")
|
||||||
parser.add_option('--tarball', dest="make_tarball", action='store_true', default=False,
|
parser.add_option('--tarball', dest="make_tarball", action='store_true', default=False,
|
||||||
help="""Generates a tarball of the documentation in dist/ directory""")
|
help="""Generates a tarball of the documentation in dist/ directory""")
|
||||||
|
parser.add_option('-s', '--silent', dest="silent", action='store_true', default=False,
|
||||||
|
help="""Hides doxygen output""")
|
||||||
parser.enable_interspersed_args()
|
parser.enable_interspersed_args()
|
||||||
options, args = parser.parse_args()
|
options, args = parser.parse_args()
|
||||||
build_doc( options )
|
build_doc( options )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user