mbox series

[v4,0/6] meson build improvements

Message ID 20200110215205.513185-1-bruce.richardson@intel.com (mailing list archive)
Headers
Series meson build improvements |

Message

Bruce Richardson Jan. 10, 2020, 9:51 p.m. UTC
  These patches make some improvements to the meson build, particularly
for documentation. They also remove many, but not all warnings issued by
meson e.g. warnings about newer features unsupported in baseline.

The biggest change is to improve the handling of the guide html docs.
The change here is more significant, and the doc build now uses a
wrapper script around sphinx. This wrapper script allows us to output
correct dependency information for the sphinx build in a .d file. This
.d file is processed by ninja (not meson) on build, so that any changes
to doc files trigger a rebuild to the guides using sphinx.

For now, the two patches which remove the meson version warnings are
CC'ed to stable for backport, theoretically this who set could be
backported if so desired, as all changes could be considered fixes to
some degree or other, and nothing introduces a whole new feature.

Note: for completeness and simplicity, previously submitted patch
http://patches.dpdk.org/patch/64189/ is included in this set, and will
be marked superceded in patchwork.

V4: fix build with older sphinx

V3: Shorten the python code in patch 5, and ensure style compliance as
    flagged by Aaron.

V2: resend to correct email addresses


Bruce Richardson (6):
  kernel/linux/kni: fix meson warning about console keyword
  build: skip processing docs folder if docs disabled
  doc/api: fix warning with meson build
  doc/guides: reduce whitespace in meson build file
  doc/guides: rebuild with meson whenever a file changes
  doc/api: reduce indentation in meson build file

 MAINTAINERS                     |  1 +
 buildtools/call-sphinx-build.py | 31 +++++++++++
 buildtools/meson.build          |  6 +-
 doc/api/meson.build             | 99 +++++++++++++++++----------------
 doc/guides/meson.build          | 38 ++++++-------
 doc/meson.build                 |  4 ++
 kernel/linux/kni/meson.build    |  1 -
 7 files changed, 107 insertions(+), 73 deletions(-)
 create mode 100755 buildtools/call-sphinx-build.py
  

Comments

David Marchand Jan. 14, 2020, 4 p.m. UTC | #1
On Fri, Jan 10, 2020 at 10:52 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> These patches make some improvements to the meson build, particularly
> for documentation. They also remove many, but not all warnings issued by
> meson e.g. warnings about newer features unsupported in baseline.
>
> The biggest change is to improve the handling of the guide html docs.
> The change here is more significant, and the doc build now uses a
> wrapper script around sphinx. This wrapper script allows us to output
> correct dependency information for the sphinx build in a .d file. This
> .d file is processed by ninja (not meson) on build, so that any changes
> to doc files trigger a rebuild to the guides using sphinx.
>
> For now, the two patches which remove the meson version warnings are
> CC'ed to stable for backport, theoretically this who set could be
> backported if so desired, as all changes could be considered fixes to
> some degree or other, and nothing introduces a whole new feature.
>
> Note: for completeness and simplicity, previously submitted patch
> http://patches.dpdk.org/patch/64189/ is included in this set, and will
> be marked superceded in patchwork.
>
> V4: fix build with older sphinx
>
> V3: Shorten the python code in patch 5, and ensure style compliance as
>     flagged by Aaron.
>
> V2: resend to correct email addresses

Tried this series in Travis.
It went fine through my own checks too.

But OBS is not happy with Debian 10, Debian Next and Ubuntu >= 18.04.
The packaging fails when ninja can't find the 'doc' target.


--
David Marchand
  
Bruce Richardson Jan. 14, 2020, 4:19 p.m. UTC | #2
On Tue, Jan 14, 2020 at 05:00:17PM +0100, David Marchand wrote:
> On Fri, Jan 10, 2020 at 10:52 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > These patches make some improvements to the meson build, particularly
> > for documentation. They also remove many, but not all warnings issued
> > by meson e.g. warnings about newer features unsupported in baseline.
> >
> > The biggest change is to improve the handling of the guide html docs.
> > The change here is more significant, and the doc build now uses a
> > wrapper script around sphinx. This wrapper script allows us to output
> > correct dependency information for the sphinx build in a .d file. This
> > .d file is processed by ninja (not meson) on build, so that any changes
> > to doc files trigger a rebuild to the guides using sphinx.
> >
> > For now, the two patches which remove the meson version warnings are
> > CC'ed to stable for backport, theoretically this who set could be
> > backported if so desired, as all changes could be considered fixes to
> > some degree or other, and nothing introduces a whole new feature.
> >
> > Note: for completeness and simplicity, previously submitted patch
> > http://patches.dpdk.org/patch/64189/ is included in this set, and will
> > be marked superceded in patchwork.
> >
> > V4: fix build with older sphinx
> >
> > V3: Shorten the python code in patch 5, and ensure style compliance as
> > flagged by Aaron.
> >
> > V2: resend to correct email addresses
> 
> Tried this series in Travis.  It went fine through my own checks too.
> 
> But OBS is not happy with Debian 10, Debian Next and Ubuntu >= 18.04.
> The packaging fails when ninja can't find the 'doc' target.
> 
Can you send on a link to the failure logs?

I suspect this may be due to returning early from the doc folder if the
document building is disabled (but need to see logs to confirm). However,
I'm not sure it makes sense to have a doc target defined if doc building is
disabled in build config.
  
David Marchand Jan. 14, 2020, 4:26 p.m. UTC | #3
On Tue, Jan 14, 2020 at 5:19 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Tue, Jan 14, 2020 at 05:00:17PM +0100, David Marchand wrote:
> > On Fri, Jan 10, 2020 at 10:52 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > >
> > > These patches make some improvements to the meson build, particularly
> > > for documentation. They also remove many, but not all warnings issued
> > > by meson e.g. warnings about newer features unsupported in baseline.
> > >
> > > The biggest change is to improve the handling of the guide html docs.
> > > The change here is more significant, and the doc build now uses a
> > > wrapper script around sphinx. This wrapper script allows us to output
> > > correct dependency information for the sphinx build in a .d file. This
> > > .d file is processed by ninja (not meson) on build, so that any changes
> > > to doc files trigger a rebuild to the guides using sphinx.
> > >
> > > For now, the two patches which remove the meson version warnings are
> > > CC'ed to stable for backport, theoretically this who set could be
> > > backported if so desired, as all changes could be considered fixes to
> > > some degree or other, and nothing introduces a whole new feature.
> > >
> > > Note: for completeness and simplicity, previously submitted patch
> > > http://patches.dpdk.org/patch/64189/ is included in this set, and will
> > > be marked superceded in patchwork.
> > >
> > > V4: fix build with older sphinx
> > >
> > > V3: Shorten the python code in patch 5, and ensure style compliance as
> > > flagged by Aaron.
> > >
> > > V2: resend to correct email addresses
> >
> > Tried this series in Travis.  It went fine through my own checks too.
> >
> > But OBS is not happy with Debian 10, Debian Next and Ubuntu >= 18.04.
> > The packaging fails when ninja can't find the 'doc' target.
> >
> Can you send on a link to the failure logs?
>
> I suspect this may be due to returning early from the doc folder if the
> document building is disabled (but need to see logs to confirm). However,
> I'm not sure it makes sense to have a doc target defined if doc building is
> disabled in build config.
>

Currently restarting my jobs and I might lose the logs, so I saved it here:
https://paste.centos.org/view/7d6e0545
  
Luca Boccassi Jan. 14, 2020, 4:35 p.m. UTC | #4
On Tue, 2020-01-14 at 16:19 +0000, Bruce Richardson wrote:
> On Tue, Jan 14, 2020 at 05:00:17PM +0100, David Marchand wrote:
> > On Fri, Jan 10, 2020 at 10:52 PM Bruce Richardson
> > <
> > bruce.richardson@intel.com
> > > wrote:
> > > These patches make some improvements to the meson build,
> > > particularly
> > > for documentation. They also remove many, but not all warnings
> > > issued
> > > by meson e.g. warnings about newer features unsupported in
> > > baseline.
> > > 
> > > The biggest change is to improve the handling of the guide html
> > > docs.
> > > The change here is more significant, and the doc build now uses a
> > > wrapper script around sphinx. This wrapper script allows us to
> > > output
> > > correct dependency information for the sphinx build in a .d file.
> > > This
> > > .d file is processed by ninja (not meson) on build, so that any
> > > changes
> > > to doc files trigger a rebuild to the guides using sphinx.
> > > 
> > > For now, the two patches which remove the meson version warnings
> > > are
> > > CC'ed to stable for backport, theoretically this who set could be
> > > backported if so desired, as all changes could be considered
> > > fixes to
> > > some degree or other, and nothing introduces a whole new feature.
> > > 
> > > Note: for completeness and simplicity, previously submitted patch
> > > http://patches.dpdk.org/patch/64189/
> > >  is included in this set, and will
> > > be marked superceded in patchwork.
> > > 
> > > V4: fix build with older sphinx
> > > 
> > > V3: Shorten the python code in patch 5, and ensure style
> > > compliance as
> > > flagged by Aaron.
> > > 
> > > V2: resend to correct email addresses
> > 
> > Tried this series in Travis.  It went fine through my own checks
> > too.
> > 
> > But OBS is not happy with Debian 10, Debian Next and Ubuntu >=
> > 18.04.
> > The packaging fails when ninja can't find the 'doc' target.
> > 
> 
> Can you send on a link to the failure logs?
> 
> I suspect this may be due to returning early from the doc folder if
> the
> document building is disabled (but need to see logs to confirm).
> However,
> I'm not sure it makes sense to have a doc target defined if doc
> building is
> disabled in build config.

Sorry, should have thought about this when reviewing: the usefulness of
having the target work without the option set is that the docs will
only be built when called explicitly, without having to change the
configuration.

Given the doc build is very slow and it's arch-independent, in
Debian/Ubuntu we only do it once, in the arch-independent target (arch:
all).
  
Bruce Richardson Jan. 14, 2020, 5:35 p.m. UTC | #5
On Tue, Jan 14, 2020 at 04:35:09PM +0000, Luca Boccassi wrote:
> On Tue, 2020-01-14 at 16:19 +0000, Bruce Richardson wrote:
> > On Tue, Jan 14, 2020 at 05:00:17PM +0100, David Marchand wrote:
> > > On Fri, Jan 10, 2020 at 10:52 PM Bruce Richardson
> > > <
> > > bruce.richardson@intel.com
> > > > wrote:
> > > > These patches make some improvements to the meson build,
> > > > particularly
> > > > for documentation. They also remove many, but not all warnings
> > > > issued
> > > > by meson e.g. warnings about newer features unsupported in
> > > > baseline.
> > > > 
> > > > The biggest change is to improve the handling of the guide html
> > > > docs.
> > > > The change here is more significant, and the doc build now uses a
> > > > wrapper script around sphinx. This wrapper script allows us to
> > > > output
> > > > correct dependency information for the sphinx build in a .d file.
> > > > This
> > > > .d file is processed by ninja (not meson) on build, so that any
> > > > changes
> > > > to doc files trigger a rebuild to the guides using sphinx.
> > > > 
> > > > For now, the two patches which remove the meson version warnings
> > > > are
> > > > CC'ed to stable for backport, theoretically this who set could be
> > > > backported if so desired, as all changes could be considered
> > > > fixes to
> > > > some degree or other, and nothing introduces a whole new feature.
> > > > 
> > > > Note: for completeness and simplicity, previously submitted patch
> > > > http://patches.dpdk.org/patch/64189/
> > > >  is included in this set, and will
> > > > be marked superceded in patchwork.
> > > > 
> > > > V4: fix build with older sphinx
> > > > 
> > > > V3: Shorten the python code in patch 5, and ensure style
> > > > compliance as
> > > > flagged by Aaron.
> > > > 
> > > > V2: resend to correct email addresses
> > > 
> > > Tried this series in Travis.  It went fine through my own checks
> > > too.
> > > 
> > > But OBS is not happy with Debian 10, Debian Next and Ubuntu >=
> > > 18.04.
> > > The packaging fails when ninja can't find the 'doc' target.
> > > 
> > 
> > Can you send on a link to the failure logs?
> > 
> > I suspect this may be due to returning early from the doc folder if
> > the
> > document building is disabled (but need to see logs to confirm).
> > However,
> > I'm not sure it makes sense to have a doc target defined if doc
> > building is
> > disabled in build config.
> 
> Sorry, should have thought about this when reviewing: the usefulness of
> having the target work without the option set is that the docs will
> only be built when called explicitly, without having to change the
> configuration.
> 
> Given the doc build is very slow and it's arch-independent, in
> Debian/Ubuntu we only do it once, in the arch-independent target (arch:
> all).
> 
Right. I think the offending patch #2, can just be dropped from the set.

/Bruce
  
David Marchand Jan. 15, 2020, 8:50 a.m. UTC | #6
On Tue, Jan 14, 2020 at 6:36 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Tue, Jan 14, 2020 at 04:35:09PM +0000, Luca Boccassi wrote:
> > On Tue, 2020-01-14 at 16:19 +0000, Bruce Richardson wrote:
> > > On Tue, Jan 14, 2020 at 05:00:17PM +0100, David Marchand wrote:
> > > > On Fri, Jan 10, 2020 at 10:52 PM Bruce Richardson
> > > > <
> > > > bruce.richardson@intel.com
> > > > > wrote:
> > > > > These patches make some improvements to the meson build,
> > > > > particularly
> > > > > for documentation. They also remove many, but not all warnings
> > > > > issued
> > > > > by meson e.g. warnings about newer features unsupported in
> > > > > baseline.
> > > > >
> > > > > The biggest change is to improve the handling of the guide html
> > > > > docs.
> > > > > The change here is more significant, and the doc build now uses a
> > > > > wrapper script around sphinx. This wrapper script allows us to
> > > > > output
> > > > > correct dependency information for the sphinx build in a .d file.
> > > > > This
> > > > > .d file is processed by ninja (not meson) on build, so that any
> > > > > changes
> > > > > to doc files trigger a rebuild to the guides using sphinx.
> > > > >
> > > > > For now, the two patches which remove the meson version warnings
> > > > > are
> > > > > CC'ed to stable for backport, theoretically this who set could be
> > > > > backported if so desired, as all changes could be considered
> > > > > fixes to
> > > > > some degree or other, and nothing introduces a whole new feature.
> > > > >
> > > > > Note: for completeness and simplicity, previously submitted patch
> > > > > http://patches.dpdk.org/patch/64189/
> > > > >  is included in this set, and will
> > > > > be marked superceded in patchwork.
> > > > >
> > > > > V4: fix build with older sphinx
> > > > >
> > > > > V3: Shorten the python code in patch 5, and ensure style
> > > > > compliance as
> > > > > flagged by Aaron.
> > > > >
> > > > > V2: resend to correct email addresses
> > > >
> > > > Tried this series in Travis.  It went fine through my own checks
> > > > too.
> > > >
> > > > But OBS is not happy with Debian 10, Debian Next and Ubuntu >=
> > > > 18.04.
> > > > The packaging fails when ninja can't find the 'doc' target.
> > > >
> > >
> > > Can you send on a link to the failure logs?
> > >
> > > I suspect this may be due to returning early from the doc folder if
> > > the
> > > document building is disabled (but need to see logs to confirm).
> > > However,
> > > I'm not sure it makes sense to have a doc target defined if doc
> > > building is
> > > disabled in build config.
> >
> > Sorry, should have thought about this when reviewing: the usefulness of
> > having the target work without the option set is that the docs will
> > only be built when called explicitly, without having to change the
> > configuration.
> >
> > Given the doc build is very slow and it's arch-independent, in
> > Debian/Ubuntu we only do it once, in the arch-independent target (arch:
> > all).
> >
> Right. I think the offending patch #2, can just be dropped from the set.

Ok, I dropped this patch.
Packages for debian distributions in OBS build fine now.

I am ok with a followup patch for fc30, I disabled the doc check in my
env for now.

Series & ~patch2 applied.
Thanks.


--
David Marchand