doc: add build_root to STRIP_FROM_PATH

Message ID 1f6e95f1c4e148a18d8de8dc25d8bb63c094af60.1637612120.git.tredaelli@redhat.com (mailing list archive)
State Superseded, archived
Headers
Series doc: add build_root to STRIP_FROM_PATH |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance fail Performance Testing issues
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS

Commit Message

Timothy Redaelli Nov. 22, 2021, 8:16 p.m. UTC
  examples.dox is built inside builddir and so doxygen generates some
dir_HASH.html that includes the builddir name and this may prevent DPDK
documentation to be correctly generated in some distributions, for
example CentOS Stream 9 and RHEL9, since the builddir includes the
architecture.

This commit adds builddir to STRIP_FROM_PATH in order to avoid
generating html files that includes it.

Fixes: a6090630f4e5 ("doc: automate examples file list for API")
Cc: ferruh.yigit@intel.com
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 doc/api/doxy-api.conf.in | 1 +
 doc/api/meson.build      | 1 +
 2 files changed, 2 insertions(+)
  

Comments

Timothy Redaelli Nov. 22, 2021, 8:26 p.m. UTC | #1
Fixing the mail address of Thomas Monjalon in To.
I used ./devtools/get-maintainer.sh, but it returned the old mail address.

On Mon, Nov 22, 2021 at 9:17 PM Timothy Redaelli <tredaelli@redhat.com> wrote:
>
> examples.dox is built inside builddir and so doxygen generates some
> dir_HASH.html that includes the builddir name and this may prevent DPDK
> documentation to be correctly generated in some distributions, for
> example CentOS Stream 9 and RHEL9, since the builddir includes the
> architecture.
>
> This commit adds builddir to STRIP_FROM_PATH in order to avoid
> generating html files that includes it.
>
> Fixes: a6090630f4e5 ("doc: automate examples file list for API")
> Cc: ferruh.yigit@intel.com
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>  doc/api/doxy-api.conf.in | 1 +
>  doc/api/meson.build      | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in
> index db2ca9b6ed..a668cad687 100644
> --- a/doc/api/doxy-api.conf.in
> +++ b/doc/api/doxy-api.conf.in
> @@ -112,6 +112,7 @@ EXAMPLE_RECURSIVE       = YES
>
>  OUTPUT_DIRECTORY        = @OUTPUT@
>  STRIP_FROM_PATH         = @STRIP_FROM_PATH@
> +STRIP_FROM_PATH         += @BUILDDIR@
>  GENERATE_HTML           = YES
>  HTML_OUTPUT             = @HTML_OUTPUT@
>  GENERATE_LATEX          = NO
> diff --git a/doc/api/meson.build b/doc/api/meson.build
> index d34c383694..6dda9bec46 100644
> --- a/doc/api/meson.build
> +++ b/doc/api/meson.build
> @@ -37,6 +37,7 @@ cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
>  cdata.set('HTML_OUTPUT', 'html')
>  cdata.set('TOPDIR', meson.source_root())
>  cdata.set('STRIP_FROM_PATH', meson.source_root())
> +cdata.set('BUILDDIR', meson.build_root())
>  cdata.set('WARN_AS_ERROR', 'NO')
>  if get_option('werror')
>      cdata.set('WARN_AS_ERROR', 'YES')
> --
> 2.33.1
>
  
Luca Boccassi Nov. 23, 2021, 10:50 a.m. UTC | #2
On Mon, 2021-11-22 at 21:16 +0100, Timothy Redaelli wrote:
> examples.dox is built inside builddir and so doxygen generates some
> dir_HASH.html that includes the builddir name and this may prevent DPDK
> documentation to be correctly generated in some distributions, for
> example CentOS Stream 9 and RHEL9, since the builddir includes the
> architecture.
> 
> This commit adds builddir to STRIP_FROM_PATH in order to avoid
> generating html files that includes it.
> 
> Fixes: a6090630f4e5 ("doc: automate examples file list for API")
> Cc: ferruh.yigit@intel.com
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>  doc/api/doxy-api.conf.in | 1 +
>  doc/api/meson.build      | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in
> index db2ca9b6ed..a668cad687 100644
> --- a/doc/api/doxy-api.conf.in
> +++ b/doc/api/doxy-api.conf.in
> @@ -112,6 +112,7 @@ EXAMPLE_RECURSIVE       = YES
>  
> 
>  OUTPUT_DIRECTORY        = @OUTPUT@
>  STRIP_FROM_PATH         = @STRIP_FROM_PATH@
> +STRIP_FROM_PATH         += @BUILDDIR@
>  GENERATE_HTML           = YES
>  HTML_OUTPUT             = @HTML_OUTPUT@
>  GENERATE_LATEX          = NO
> diff --git a/doc/api/meson.build b/doc/api/meson.build
> index d34c383694..6dda9bec46 100644
> --- a/doc/api/meson.build
> +++ b/doc/api/meson.build
> @@ -37,6 +37,7 @@ cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
>  cdata.set('HTML_OUTPUT', 'html')
>  cdata.set('TOPDIR', meson.source_root())
>  cdata.set('STRIP_FROM_PATH', meson.source_root())
> +cdata.set('BUILDDIR', meson.build_root())
>  cdata.set('WARN_AS_ERROR', 'NO')
>  if get_option('werror')
>      cdata.set('WARN_AS_ERROR', 'YES')

Acked-by: Luca Boccassi <bluca@debian.org>
  
David Marchand Nov. 23, 2021, 10:54 a.m. UTC | #3
Hello Timothy,

On Mon, Nov 22, 2021 at 9:17 PM Timothy Redaelli <tredaelli@redhat.com> wrote:
>
> examples.dox is built inside builddir and so doxygen generates some
> dir_HASH.html that includes the builddir name and this may prevent DPDK
> documentation to be correctly generated in some distributions, for
> example CentOS Stream 9 and RHEL9, since the builddir includes the
> architecture.
>
> This commit adds builddir to STRIP_FROM_PATH in order to avoid
> generating html files that includes it.
>
> Fixes: a6090630f4e5 ("doc: automate examples file list for API")

I think we want it in LTS branches, so:
Cc: stable@dpdk.org


> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>  doc/api/doxy-api.conf.in | 1 +
>  doc/api/meson.build      | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in
> index db2ca9b6ed..a668cad687 100644
> --- a/doc/api/doxy-api.conf.in
> +++ b/doc/api/doxy-api.conf.in
> @@ -112,6 +112,7 @@ EXAMPLE_RECURSIVE       = YES
>
>  OUTPUT_DIRECTORY        = @OUTPUT@
>  STRIP_FROM_PATH         = @STRIP_FROM_PATH@
> +STRIP_FROM_PATH         += @BUILDDIR@
>  GENERATE_HTML           = YES
>  HTML_OUTPUT             = @HTML_OUTPUT@
>  GENERATE_LATEX          = NO
> diff --git a/doc/api/meson.build b/doc/api/meson.build
> index d34c383694..6dda9bec46 100644
> --- a/doc/api/meson.build
> +++ b/doc/api/meson.build
> @@ -37,6 +37,7 @@ cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
>  cdata.set('HTML_OUTPUT', 'html')
>  cdata.set('TOPDIR', meson.source_root())
>  cdata.set('STRIP_FROM_PATH', meson.source_root())
> +cdata.set('BUILDDIR', meson.build_root())

You don't need this new variable, something like below is enough:
-cdata.set('STRIP_FROM_PATH', meson.source_root())
+cdata.set('STRIP_FROM_PATH', ' '.join([meson.source_root(),
meson.build_root()]))

WDYT?


>  cdata.set('WARN_AS_ERROR', 'NO')
>  if get_option('werror')
>      cdata.set('WARN_AS_ERROR', 'YES')
> --
> 2.33.1
>
  

Patch

diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in
index db2ca9b6ed..a668cad687 100644
--- a/doc/api/doxy-api.conf.in
+++ b/doc/api/doxy-api.conf.in
@@ -112,6 +112,7 @@  EXAMPLE_RECURSIVE       = YES
 
 OUTPUT_DIRECTORY        = @OUTPUT@
 STRIP_FROM_PATH         = @STRIP_FROM_PATH@
+STRIP_FROM_PATH         += @BUILDDIR@
 GENERATE_HTML           = YES
 HTML_OUTPUT             = @HTML_OUTPUT@
 GENERATE_LATEX          = NO
diff --git a/doc/api/meson.build b/doc/api/meson.build
index d34c383694..6dda9bec46 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -37,6 +37,7 @@  cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
 cdata.set('HTML_OUTPUT', 'html')
 cdata.set('TOPDIR', meson.source_root())
 cdata.set('STRIP_FROM_PATH', meson.source_root())
+cdata.set('BUILDDIR', meson.build_root())
 cdata.set('WARN_AS_ERROR', 'NO')
 if get_option('werror')
     cdata.set('WARN_AS_ERROR', 'YES')