-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path_get_docs.sh
30 lines (23 loc) · 1.17 KB
/
_get_docs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# ==========================================================================
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
# ==========================================================================
# Intel® Query Processing Library (Intel® QPL) documentation generation script.
set -ex
# This file is required for local build of Doxygen for Sphinx to use docs preview in VSCode
# because of that it is targeted to src, there is no way to use preview with other location
# Full path to the directory where Intel(R) QPL include folder is located, need also to strip it from Doxygen paths
export PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
export DOXYGEN_OUTPUT_DIR=$PROJECT_DIR/build/doxygen_html
export SPHINX_OUTPUT_DIR=$PROJECT_DIR/build/html
export SPHINX_SRC_DIR=$PROJECT_DIR/source
# Run Doxygen
cd $PROJECT_DIR && cd .. && doxygen Doxyfile
# Run Sphinx
# -W - turn Sphinx warnings into errors
# -keep-going - generate full documentation even if errors encountered
# -n check for broken links in documentation
# -b - build output format
sphinx-build -W --keep-going -b html $SPHINX_SRC_DIR $SPHINX_OUTPUT_DIR