From d9cf8827f9dd7f6204cdf2abc9aeee356e1fa639 Mon Sep 17 00:00:00 2001
From: Giovanni La Mura <giovanni.lamura@inaf.it>
Date: Fri, 12 Jul 2024 16:56:39 +0200
Subject: [PATCH] Reintroduce document build in pipeline and update document
 build instructions

---
 .gitlab-ci.yml    | 11 +++++++----
 doc/src/README.md | 10 +++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fa22f8a4..5c52262b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -123,7 +123,7 @@ building_stage:
          - build/testing/*
          - build/trapping/*
          - build/libnptm/*
-         #- doc/build/*
+         - doc/build/*
       exclude:
          - ".git*"
          - ".git/**/*"
@@ -140,10 +140,13 @@ building_stage:
       - echo "Configuring with default compilers (MAGMA disabled)..."
       - ./configure --without-magma
       - make clean
-      - echo "Building default configuration..."
+      - echo "Building the default configuration..."
       - make -j
-      #- echo "Building documentation..."
-      #- make docs -j && make -C ../doc/build/latex -j
+      - echo "Building the documentation..."
+      - cd ../doc/src
+      - doxygen config.dox
+      - cd ../build/latex
+      - make
 
 running_stage:
    stage: run
diff --git a/doc/src/README.md b/doc/src/README.md
index 6b6a3ba7..ac38d3e6 100644
--- a/doc/src/README.md
+++ b/doc/src/README.md
@@ -4,15 +4,11 @@ This directory contains the material to build the project documentation with *do
 
 ## Instructions
 
-The project documentation is managed by *doxygen*, a documentation generator that is able to extract documents directly from properly formatted comment sections of the source code. To build a local instance of project documents, make sure that you have *doxygen* installed, then `cd` into the document source folder (the folder containing the `conf.dox` file, specifically `np_tmcode/doc/src`) and finally run:
+The project documentation is managed by *doxygen*, a documentation generator that is able to extract documents directly from properly formatted comment sections of the source code. To build a local instance of project documents, make sure that you have *doxygen* installed, then `cd` into the document source folder (the folder containing the `config.dox` file, specifically `np_tmcode/doc/src`) and finally run:
 
-> doxygen conf.dox
+> doxygen config.dox
 
-Alternatively, you can use `make` from the project `src` folder (named `np_tmcode/src`) and just issue:
-
-> make docs
-
-*doxygen* will automatically build the HTML structure to cover all the documented source code and it will additionally provide the fundamental structure to prepare a LaTeX formatted version of the documents. These two outputs will be placed, respectively, under the folders `np_tmcode/doc/build/html` and `np_tmcode/doc/build/latex`.
+*doxygen* will automatically build the HTML structure to cover all the documented source code and it will additionally provide the fundamental structure to prepare a LaTeX formatted version of the documents. These two outputs will be placed, respectively, under the folders `np_tmcode/doc/build/html` and `np_tmcode/doc/build/latex`. If the host system has a recommended LaTeX installation, the full PDF documentation can be built with a further execution of `make` from the `np_tmcode/doc/build/latex` folder.
 
 # License
 
-- 
GitLab