[v2] doc: add examples.dox path to STRIP_FROM_PATH

Message ID 4c058c558a858267b8d14b0460dce5fcc8bbcc2c.1637678260.git.tredaelli@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v2] doc: add examples.dox path to STRIP_FROM_PATH |

Checks

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

Commit Message

Timothy Redaelli Nov. 23, 2021, 2:48 p.m. UTC
  examples.dox is built inside builddir/doc/api 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/doc/api (the path where examples.dox is
generated) to STRIP_FROM_PATH, so the generated documentation doesn't
change if builddir changes.

Fixes: a6090630f4e5 ("doc: automate examples file list for API")
Cc: ferruh.yigit@intel.com
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
v2:
 - Don't use another VARIABLE name, but set STRIP_FROM_PATH with the 2
   paths directly (suggested by David Marchand)
 - Strip the full path of examples.dox (except the last component)
   instead of stripping only build_root. This is needed since doxygen
   generates the HASH of dir_HASH.html filename using the last component
   of the path and so if the last part of buildroot is changed, the
   filename is different.
---
 doc/api/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Luca Boccassi Nov. 23, 2021, 3:16 p.m. UTC | #1
On Tue, 2021-11-23 at 15:48 +0100, Timothy Redaelli wrote:
> examples.dox is built inside builddir/doc/api 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/doc/api (the path where examples.dox is
> generated) to STRIP_FROM_PATH, so the generated documentation doesn't
> change if builddir changes.
> 
> Fixes: a6090630f4e5 ("doc: automate examples file list for API")
> Cc: ferruh.yigit@intel.com
> Cc: stable@dpdk.org
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
> v2:
>  - Don't use another VARIABLE name, but set STRIP_FROM_PATH with the 2
>    paths directly (suggested by David Marchand)
>  - Strip the full path of examples.dox (except the last component)
>    instead of stripping only build_root. This is needed since doxygen
>    generates the HASH of dir_HASH.html filename using the last component
>    of the path and so if the last part of buildroot is changed, the
>    filename is different.
> ---
>  doc/api/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/api/meson.build b/doc/api/meson.build
> index d34c383694..7e2b429ac8 100644
> --- a/doc/api/meson.build
> +++ b/doc/api/meson.build
> @@ -36,7 +36,7 @@ cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples
>  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('STRIP_FROM_PATH', ' '.join([meson.source_root(), join_paths(meson.build_root(), 'doc', 'api')]))
>  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, 7:39 p.m. UTC | #2
On Tue, Nov 23, 2021 at 3:49 PM Timothy Redaelli <tredaelli@redhat.com> wrote:
>
> examples.dox is built inside builddir/doc/api 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/doc/api (the path where examples.dox is
> generated) to STRIP_FROM_PATH, so the generated documentation doesn't
> change if builddir changes.
>
> Fixes: a6090630f4e5 ("doc: automate examples file list for API")
> Cc: stable@dpdk.org

> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>

Tested-by: David Marchand <david.marchand@redhat.com>
  
David Marchand Nov. 24, 2021, 1:19 p.m. UTC | #3
On Tue, Nov 23, 2021 at 4:17 PM Luca Boccassi <bluca@debian.org> wrote:
>
> On Tue, 2021-11-23 at 15:48 +0100, Timothy Redaelli wrote:
> > examples.dox is built inside builddir/doc/api 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/doc/api (the path where examples.dox is
> > generated) to STRIP_FROM_PATH, so the generated documentation doesn't
> > change if builddir changes.
> >
> > Fixes: a6090630f4e5 ("doc: automate examples file list for API")
> > Cc: stable@dpdk.org

> > Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> Acked-by: Luca Boccassi <bluca@debian.org>
Tested-by: David Marchand <david.marchand@redhat.com>


Applied, thanks.
  

Patch

diff --git a/doc/api/meson.build b/doc/api/meson.build
index d34c383694..7e2b429ac8 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -36,7 +36,7 @@  cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples
 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('STRIP_FROM_PATH', ' '.join([meson.source_root(), join_paths(meson.build_root(), 'doc', 'api')]))
 cdata.set('WARN_AS_ERROR', 'NO')
 if get_option('werror')
     cdata.set('WARN_AS_ERROR', 'YES')