2018-03-09 05:42:45 +02:00
|
|
|
#!/usr/bin/env bash
|
2018-03-08 09:54:14 +02:00
|
|
|
# _VERBOSE_=1
|
|
|
|
# _TEST_=1
|
|
|
|
|
|
|
|
BASE_DIR=$(cd "$(dirname "$0")" && pwd)
|
|
|
|
ROOT_DIR=$(realpath "$BASE_DIR/..")
|
|
|
|
SCRIPTS_DIR="$ROOT_DIR/scripts"
|
|
|
|
|
|
|
|
source "$SCRIPTS_DIR/common/echo.sh"
|
|
|
|
source "$SCRIPTS_DIR/common/mkdir.sh"
|
|
|
|
source "$SCRIPTS_DIR/common/detect.sh"
|
|
|
|
|
|
|
|
_detect "doxygen"
|
2018-03-08 11:30:47 +02:00
|
|
|
_detect "pdflatex" 1
|
2018-03-08 09:54:14 +02:00
|
|
|
|
|
|
|
source "$BASE_DIR/langs.sh"
|
|
|
|
DOXYFILE="api.doxyfile"
|
|
|
|
OUTPUT="$BASE_DIR/output"
|
|
|
|
|
|
|
|
for lang in "${LANGS[@]}"; do
|
|
|
|
_echo_s "Build doc $lang"
|
2018-03-08 11:30:47 +02:00
|
|
|
[ -d "$BASE_DIR/$lang" ] || continue
|
2018-03-08 09:54:14 +02:00
|
|
|
cd "$BASE_DIR/$lang"
|
|
|
|
if [ -f "$DOXYFILE" ]; then
|
|
|
|
_mkdir "$OUTPUT/$lang"
|
|
|
|
_echo_i "doxygen $DOXYFILE"
|
|
|
|
doxygen $DOXYFILE
|
2018-03-08 11:30:47 +02:00
|
|
|
if [ $pdflatex_FOUND ] && [ -f "$OUTPUT/$lang/latex/Makefile" ]; then
|
2018-03-08 09:54:14 +02:00
|
|
|
_echo_in "doxygen make latex"
|
|
|
|
cd "$OUTPUT/$lang/latex" && make
|
|
|
|
[ -f "refman.pdf" ] && mv "refman.pdf" "../mynteye-apidoc.pdf"
|
|
|
|
fi
|
|
|
|
_echo_d "doxygen completed"
|
|
|
|
else
|
|
|
|
_echo_e "$DOXYFILE not found"
|
|
|
|
fi
|
|
|
|
done
|