diff --git a/doc/mk_api_doc.py b/doc/mk_api_doc.py index b4a58f392..0a7efacfa 100644 --- a/doc/mk_api_doc.py +++ b/doc/mk_api_doc.py @@ -123,17 +123,12 @@ try: doxygen_config_file = temp_path('z3api.cfg') configure_file('z3api.cfg.in', doxygen_config_file, doxygen_config_substitutions) - fi = open('website.dox', 'r') - fo = open(temp_path('website.dox'), 'w') - - for line in fi: - if (line != '[ML]\n'): - fo.write(line) - elif (ML_ENABLED): - fo.write(' - ML/OCaml API\n') - fi.close() - fo.close() - + website_dox_substitutions = {} + if ML_ENABLED: + website_dox_substitutions['OCAML_API'] = '\n - ML/OCaml API\n' + else: + website_dox_substitutions['OCAML_API'] = '' + configure_file('website.dox.in', temp_path('website.dox'), website_dox_substitutions) mk_dir(os.path.join(OUTPUT_DIRECTORY, 'html')) shutil.copyfile('../src/api/python/z3/z3.py', temp_path('z3py.py')) diff --git a/doc/website.dox b/doc/website.dox.in similarity index 92% rename from doc/website.dox rename to doc/website.dox.in index 799949752..b00874c97 100644 --- a/doc/website.dox +++ b/doc/website.dox.in @@ -14,7 +14,6 @@ - \ref cppapi - .NET API - Java API - - Python API (also available in pydoc format) -[ML] + - Python API (also available in pydoc format)@OCAML_API@ - Try Z3 online at RiSE4Fun. */