<div dir="ltr"><div dir="ltr">On Thu, Mar 7, 2019 at 11:51 PM Eric Engestrom <<a href="mailto:eric@engestrom.ch">eric@engestrom.ch</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2019-03-08 at 03:42, Brian Paul <<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>> wrote:<br>
> Add new Introduction and Advanced Usage sections.<br>
> Spell out a few more details, like "ninja install".<br>
> Improve the layout around example commands.<br>
> Fix grammatical errors and tighten up the text.<br>
> Explain the --prefix option.<br>
<br>
Thanks! I left a couple comments below, but this is:<br>
Reviewed-by: Eric Engestrom <<a href="mailto:eric@engestrom.ch" target="_blank">eric@engestrom.ch</a>><br>
<br>
> ---<br>
>  docs/contents.html |   2 +-<br>
>  docs/meson.html    | 138 +++++++++++++++++++++++++++++++++++++++--------------<br>
>  2 files changed, 104 insertions(+), 36 deletions(-)<br>
> <br>
> diff --git a/docs/contents.html b/docs/contents.html<br>
> index 6364776..619ac3d 100644<br>
> --- a/docs/contents.html<br>
> +++ b/docs/contents.html<br>
> @@ -42,8 +42,8 @@<br>
>  <li><a href="download.html" target="_parent">Downloading / Unpacking</a><br>
>  <li><a href="install.html" target="_parent">Compiling / Installing</a><br>
>    <ul><br>
> -    <li><a href="autoconf.html" target="_parent">Autoconf</a></li><br>
>      <li><a href="meson.html" target="_parent">Meson</a></li><br>
> +    <li><a href="autoconf.html" target="_parent">Autoconf (deprecated)</a></li><br>
>    </ul><br>
>  </li><br>
>  <li><a href="precompiled.html" target="_parent">Precompiled Libraries</a><br>
> diff --git a/docs/meson.html b/docs/meson.html<br>
> index f21479c..f9ae669 100644<br>
> --- a/docs/meson.html<br>
> +++ b/docs/meson.html<br>
> @@ -17,65 +17,98 @@<br>
>  <h1>Compilation and Installation using Meson</h1><br>
>  <br>
>  <ul><br>
> +  <li><a href="#intro">Introduction</a></li><br>
>    <li><a href="#basic">Basic Usage</a></li><br>
> +  <li><a href="#advanced">Advanced Usage</a></li><br>
>    <li><a href="#cross-compilation">Cross-compilation and 32-bit builds</a></li><br>
>  </ul><br>
>  <br>
> -<h2 id="basic">1. Basic Usage</h2><br>
> +<h2 id="intro">1. Introduction</h2><br>
>  <br>
> -<p><strong>The Meson build system is generally considered stable and ready<br>
> -for production</strong></p><br>
> +<p>For general information about Meson see the<br>
> +<a href="<a href="http://mesonbuild.com/" rel="noreferrer" target="_blank">http://mesonbuild.com/</a>">Meson website</a>.</p><br>
>  <br>
> -<p>The meson build is tested on Linux, macOS, Cygwin and Haiku, <br>
> FreeBSD,<br>
> +<p><strong>Mesa's Meson build system is generally considered stable <br>
> and ready<br>
> +for production.</strong></p><br>
> +<br>
> +<p>The Meson build of Mesa is tested on Linux, macOS, Cygwin and <br>
> Haiku, FreeBSD,<br>
>  DragonflyBSD, NetBSD, and should work on OpenBSD.</p><br>
>  <br>
> +<p>If Meson is not already installed on your system, you can typically<br>
> +install it with your package installer.  For example:</p><br>
> +<pre><br>
> +sudo apt-get install meson   # Ubuntu<br>
> +</pre><br>
> +or<br>
> +<pre><br>
> +sudo dnf install meson   # Fedora<br>
> +</pre><br>
> +<br>
>  <p><strong>Mesa requires Meson >= 0.45.0 to build.</strong><br>
>  <br>
>  Some older versions of meson do not check that they are too old and will error<br>
>  out in odd ways.<br>
>  </p><br>
>  <br>
> +<p>You'll also need <a href="<a href="https://ninja-build.org/" rel="noreferrer" target="_blank">https://ninja-build.org/</a>">Ninja</a>.<br>
> +If it's not already installed, use apt-get or dnf to install<br>
> +the <em>ninja-build</em> package.<br>
> +</p><br>
> +<br>
> +<h2 id="basic">2. Basic Usage</h2><br>
> +<br>
>  <p><br>
>  The meson program is used to configure the source directory and <br>
> generates<br>
>  either a ninja build file or Visual Studio® build files. The latter <br>
> must<br>
> -be enabled via the <code>--backend</code> switch, as ninja is the <br>
> default backend on all<br>
> -operating systems. Meson only supports out-of-tree builds, and must be <br>
> passed a<br>
> +be enabled via the <code>--backend</code> switch, as ninja is the <br>
> default<br>
> +backend on all<br>
> +operating systems.<br>
> +</p><br>
> +<br>
> +<p><br>
> +Meson only supports out-of-tree builds, and must be passed a<br>
>  directory to put built and generated sources into. We'll call that <br>
> directory<br>
> -"build" for examples.<br>
> +"build" here.<br>
>  </p><br>
>  <br>
> +<p>Basic configuration is done with:</p><br>
> +<br>
>  <pre><br>
> -    meson build/<br>
> +meson build/<br>
>  </pre><br>
>  <br>
>  <p><br>
> -To see a description of your options you can run <code>meson configure</code><br>
> -along with a build directory to view the selected options for. This will show<br>
> -your meson global arguments and project arguments, along with their defaults<br>
> -and your local settings.<br>
> +This will create the build directory.<br>
> +If any dependencies are missing, you can install them, or try to remove<br>
> +the dependency with a Meson configuration option (see below).<br>
> +</p><br>
> +<br>
> +<p><br>
> +To review the options which Meson chose, run:<br>
>  </p><br>
> +<pre><br>
> +meson configure build/<br>
> +</pre><br>
>  <br>
>  <p><br>
> -Meson does not currently support listing options before configure a build<br>
> -directory, but this feature is being discussed upstream.<br>
> +Meson does not currently support listing configuration options before<br>
> +running "meson build/" but this feature is being discussed upstream.<br>
>  For now, we have a <code>bin/meson-options.py</code> script that prints<br>
>  the options for you.<br>
>  If that script doesn't work for some reason, you can always look in the<br>
>  <code>meson_options.txt</code> file at the root of the project.<br>
>  </p><br>
>  <br>
> -<pre><br>
> -    meson configure build/<br>
> -</pre><br>
> -<br>
>  <p><br>
> -With additional arguments <code>meson configure</code> is used to change<br>
> -options on already configured build directory. All options passed to this<br>
> -command are in the form <code>-D "command"="value"</code>.<br>
> +With additional arguments <code>meson configure</code> can be used to change<br>
> +options for a previously configured build directory.<br>
> +All options passed to this command are in the form<br>
> +<code>-D "command"="value"</code>.<br>
<br>
I know you didn't write this bit, but can I suggest s/command/option/ ?<br></blockquote><div><br></div><div>Done.</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> +For example:<br>
>  </p><br>
>  <br>
>  <pre><br>
> -    meson configure build/ -Dprefix=/tmp/install -Dglx=true<br>
> +meson configure build/ -Dprefix=/tmp/install -Dglx=true<br>
>  </pre><br>
>  <br>
>  <p><br>
> @@ -88,33 +121,68 @@ and brackets to represent an empty list (<code>-D <br>
> platforms=[]</code>).<br>
>  <br>
>  <p><br>
>  Once you've run the initial <code>meson</code> command successfully you can use<br>
> -your configured backend to build the project. With ninja, the -C option can be<br>
> -be used to point at a directory to build.<br>
> +your configured backend to build the project in your build directory:<br>
> +</p><br>
> +<br>
> +<pre><br>
> +ninja -C build/<br>
> +</pre><br>
> +<br>
> +<p><br>
> +The next step is to install the Mesa libraries, drivers, etc.<br>
> +This also finishes up some final steps of the build process (such as creating<br>
> +symbolic links for drivers).  To install:<br>
>  </p><br>
>  <br>
>  <pre><br>
> -    ninja -C build/<br>
> +ninja -C build/ install<br>
>  </pre><br>
>  <br>
>  <p><br>
> -Without arguments, it will produce libGL.so and/or several other libraries<br>
> -depending on the options you have chosen. Later, if you want to rebuild for a<br>
> +Later, if you want to rebuild for a<br>
>  different configuration, you should run <code>ninja clean</code> before<br>
<br>
I'm not sure this is needed?<br></blockquote><div><br></div><div>I don't know either.</div><div><br></div><div>-Brian</div><br></div></div>