From 4a52b173860f6f44d254a5524aff6ff63497ab58 Mon Sep 17 00:00:00 2001
From: Laurent THOMAS <laurent.thomas@open-cells.com>
Date: Wed, 25 Oct 2023 18:10:40 +0200
Subject: [PATCH] fix-doxygen

---
 cmake_targets/build_oai | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)

diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index dbceb680a23..786de456293 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -338,10 +338,11 @@ function main() {
             echo_info "Will compile with verbose instructions"
             shift;;
        --build-doxygen)
-            CMAKE_CMD="$CMAKE_CMD -DGENERATE_DOXYGEN=ON"
-            BUILD_DOXYGEN=1
-            echo_info "Will build doxygen support"
-            shift;;     
+           CMAKE_CMD="$CMAKE_CMD -DGENERATE_DOXYGEN=ON"
+	   TARGET_LIST="$TARGET_LIST doc"
+           BUILD_DOXYGEN=1
+           echo_info "Will build doxygen support"
+           shift;;     
        --disable-T-Tracer)
             CMAKE_CMD="$CMAKE_CMD -DT_TRACER=False"
             echo_info "Disabling the T tracer"
@@ -490,6 +491,13 @@ function main() {
     echo_info "Running \"$CMAKE_CMD\""
     eval $CMAKE_CMD
     compilations $BUILD_DIR all.txt $TARGET_LIST
+    ###################
+    # Doxygen Support #
+    ###################
+    if [ "$BUILD_DOXYGEN" = "1" ] ; then
+	echo_info "Built Doxygen based documentation. The documentation file is located here: $OPENAIR_DIR/$BUILD_DIR/build/html/index.html"
+    echo_info "if you can't open this as file:///... in your browser, see apparmor over complex configuration, or move the doc tree in a place that suits this 'security' apparmor"
+    fi
 
     if [ "$UE" = 1 ] ; then
 
@@ -513,18 +521,6 @@ function main() {
     fi
   fi
 
-  ###################
-  # Doxygen Support #
-  ###################
-  if [ "$BUILD_DOXYGEN" = "1" ] ; then
-    doxygen_log=$OPENAIR_DIR/cmake_targets/log/doxygen.log
-    echo_info "Building Doxygen based documentation. The documentation file is located here: $OPENAIR_DIR/targets/DOCS/html/index.html"
-    echo_info "Doxygen generation log is located here: $doxygen_log"
-    echo_info "Generating Doxygen files....please wait"
-    (
-      $CMAKE --build . --target doc
-    ) >& $doxygen_log
-  fi
 
   ##############
   # Auto-tests #
-- 
GitLab