mirror of
https://github.com/Z3Prover/z3
synced 2025-06-27 08:28:44 +00:00
[Doxygen] Fix script --help
functionality.
This commit is contained in:
parent
5068d2083d
commit
81ba729aab
1 changed files with 4 additions and 3 deletions
|
@ -13,11 +13,13 @@ ML_ENABLED=False
|
||||||
BUILD_DIR='../build'
|
BUILD_DIR='../build'
|
||||||
|
|
||||||
def display_help(exit_code):
|
def display_help(exit_code):
|
||||||
|
assert isinstance(exit_code, int)
|
||||||
print("mk_api_doc.py: Z3 documentation generator\n")
|
print("mk_api_doc.py: Z3 documentation generator\n")
|
||||||
print("\nOptions:")
|
print("\nOptions:")
|
||||||
print(" -h, --help display this message.")
|
print(" -h, --help display this message.")
|
||||||
print(" -b <subdir>, --build=<subdir> subdirectory where Z3 is built (default: ../build).")
|
print(" -b <subdir>, --build=<subdir> subdirectory where Z3 is built (default: ../build).")
|
||||||
print(" --ml include ML/OCaml API documentation.")
|
print(" --ml include ML/OCaml API documentation.")
|
||||||
|
sys.exit(exit_code)
|
||||||
|
|
||||||
def parse_options():
|
def parse_options():
|
||||||
global ML_ENABLED, BUILD_DIR
|
global ML_ENABLED, BUILD_DIR
|
||||||
|
@ -34,8 +36,7 @@ def parse_options():
|
||||||
if opt in ('-b', '--build'):
|
if opt in ('-b', '--build'):
|
||||||
BUILD_DIR = mk_util.norm_path(arg)
|
BUILD_DIR = mk_util.norm_path(arg)
|
||||||
elif opt in ('h', '--help'):
|
elif opt in ('h', '--help'):
|
||||||
display_help()
|
display_help(0)
|
||||||
exit(1)
|
|
||||||
elif opt in ('--ml'):
|
elif opt in ('--ml'):
|
||||||
ML_ENABLED=True
|
ML_ENABLED=True
|
||||||
else:
|
else:
|
||||||
|
@ -128,7 +129,7 @@ try:
|
||||||
print("Generated ML/OCaml documentation.")
|
print("Generated ML/OCaml documentation.")
|
||||||
|
|
||||||
print("Documentation was successfully generated at subdirectory './api/html'.")
|
print("Documentation was successfully generated at subdirectory './api/html'.")
|
||||||
except:
|
except Exception:
|
||||||
exctype, value = sys.exc_info()[:2]
|
exctype, value = sys.exc_info()[:2]
|
||||||
print("ERROR: failed to generate documentation: %s" % value)
|
print("ERROR: failed to generate documentation: %s" % value)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue