From 8c8a8cee7a5f03e8ac63aafeabfabcb9cd502e8e Mon Sep 17 00:00:00 2001
From: Nikolaj Bjorner <nbjorner@microsoft.com>
Date: Fri, 11 Oct 2019 13:12:02 -0700
Subject: [PATCH] add build step to generate doc

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
---
 azure-pipelines.yml         | 1 +
 doc/update_api_website.cmd  | 4 ----
 doc/update_code_website.cmd | 4 ----
 scripts/generate-doc.yml    | 7 +++++++
 4 files changed, 8 insertions(+), 8 deletions(-)
 delete mode 100644 doc/update_api_website.cmd
 delete mode 100644 doc/update_code_website.cmd
 create mode 100644 scripts/generate-doc.yml

diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 0a96fc48c..9b2a17622 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -27,6 +27,7 @@ jobs:
         cd ..
     - template: scripts/test-z3.yml
     - template: scripts/test-regressions.yml
+    - template: scripts/generate-doc.yml
 
 #       ./cpp_example
 #       ./c_example
diff --git a/doc/update_api_website.cmd b/doc/update_api_website.cmd
deleted file mode 100644
index 106d6a4eb..000000000
--- a/doc/update_api_website.cmd
+++ /dev/null
@@ -1,4 +0,0 @@
-REM Script for updating the website containing the Z3 API documentation.
-REM You must be inside the Microsoft network to execute this script, and 
-REM robocopy must be in your PATH.
-robocopy /S api\html \\research\root\web\external\en-us\UM\redmond\projects\z3
\ No newline at end of file
diff --git a/doc/update_code_website.cmd b/doc/update_code_website.cmd
deleted file mode 100644
index ae7791c26..000000000
--- a/doc/update_code_website.cmd
+++ /dev/null
@@ -1,4 +0,0 @@
-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
\ No newline at end of file
diff --git a/scripts/generate-doc.yml b/scripts/generate-doc.yml
new file mode 100644
index 000000000..4e384ab37
--- /dev/null
+++ b/scripts/generate-doc.yml
@@ -0,0 +1,7 @@
+steps:
+- script: |
+   cd doc
+   apt-get install doxygen
+   apt-get install graphviz
+   python mk_api_doc.py
+   cd ..