From 32b150344e035dd0badf8c83813358ec3d045fb7 Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Fri, 19 May 2023 12:20:56 +0200 Subject: [PATCH] docs: use meson instead invoking ninja directly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This approach is available since meson 0.47.0 which we depend on. Reviewed-by: Sergi Blanch-Torné Reviewed-by: Erik Faye-Lund Signed-off-by: David Heidelberg Part-of: --- docs/android.rst | 2 +- docs/ci/index.rst | 2 +- docs/drivers/svga3d.rst | 8 ++++---- docs/drivers/venus.rst | 6 +++--- docs/faq.rst | 2 +- docs/install.rst | 10 +++++----- docs/osmesa.rst | 2 +- docs/perfetto.rst | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/android.rst b/docs/android.rst index 90ae695e1a8..4bdb8bcf6ea 100644 --- a/docs/android.rst +++ b/docs/android.rst @@ -51,7 +51,7 @@ one cross-compiling the turnip driver for a stock Pixel phone) -Dgallium-drivers= \ -Dvulkan-drivers=freedreno \ -Dfreedreno-kmds=kgsl - ninja -C build-android-aarch64 + meson compile -C build-android-aarch64 Replacing Android drivers on stock Android ------------------------------------------ diff --git a/docs/ci/index.rst b/docs/ci/index.rst index 0e7e7043f78..1a2e95d8be3 100644 --- a/docs/ci/index.rst +++ b/docs/ci/index.rst @@ -248,7 +248,7 @@ directory. You can hack on mesa and iterate testing the build with: .. code-block:: console - sudo docker run --rm -v `pwd`:/mesa $IMAGE ninja -C /mesa/_build + sudo docker run --rm -v `pwd`:/mesa $IMAGE meson compile -C /mesa/_build Running specific CI jobs ------------------------ diff --git a/docs/drivers/svga3d.rst b/docs/drivers/svga3d.rst index 6667bd326dd..605802844ef 100644 --- a/docs/drivers/svga3d.rst +++ b/docs/drivers/svga3d.rst @@ -113,8 +113,8 @@ Building the Code cd $TOP/drm meson builddir --prefix=/usr --libdir=${LIBDIR} - ninja -C builddir - sudo ninja -C builddir install + meson compile -C builddir + sudo meson install -C builddir - Build Mesa: @@ -124,8 +124,8 @@ Building the Code cd $TOP/mesa meson builddir -Dvulkan-drivers= -Dgallium-drivers=svga -Ddri-drivers= -Dglvnd=true -Dglvnd-vendor-name=mesa - ninja -C builddir - sudo ninja -C builddir install + meson compile -C builddir + sudo meson install -C builddir Note that you may have to install other packages that Mesa depends diff --git a/docs/drivers/venus.rst b/docs/drivers/venus.rst index a4415a915fb..f042d2f6f88 100644 --- a/docs/drivers/venus.rst +++ b/docs/drivers/venus.rst @@ -56,7 +56,7 @@ build virglrenderer with Venus support and to start the vtest server, $ git clone https://gitlab.freedesktop.org/virgl/virglrenderer.git $ cd virglrenderer $ meson out -Dvenus=true - $ ninja -C out + $ meson compile -C out $ meson devenv -C out $ ./vtest/virgl_test_server --venus $ exit @@ -133,7 +133,7 @@ To build minigbm and to enable minigbm support in virglrenderer, $ CFLAGS=-DDRV_ OUT=out DESTDIR=out/install make install $ cd ../virglrenderer $ meson configure out -Dminigbm_allocation=true - $ ninja -C out + $ meson compile -C out Make sure a host Wayland compositor is running. Replace ``--display-window-keyboard --display-window-mouse`` by @@ -146,7 +146,7 @@ In the guest, build and start sommelier, the special Wayland compositor, $ git clone https://chromium.googlesource.com/chromiumos/platform2 $ cd platform2/vm_tools/sommelier $ meson out -Dxwayland_path=/usr/bin/Xwayland -Dxwayland_gl_driver_path=/usr/lib/dri - $ ninja -C out + $ meson compile -C out $ sudo chmod 777 /dev/wl0 $ ./out/sommelier -X --glamor --xwayland-gl-driver-path= \ diff --git a/docs/faq.rst b/docs/faq.rst index 1f8ae46dbf4..42e826d8ff2 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -191,7 +191,7 @@ example, if the ``find`` command listed ``/usr/lib64/dri``, then set After determining the correct values for the install location, configure Mesa with ``meson configure --prefix=/usr --libdir=xxx -D dri-drivers-path=xxx`` -and then install with ``sudo ninja install``. +and then install with ``sudo meson install``. 3. Runtime / Rendering Problems ------------------------------- diff --git a/docs/install.rst b/docs/install.rst index 7fc3b3afbfe..402ecf18188 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -87,8 +87,8 @@ The general approach is: .. code-block:: console meson setup builddir/ - ninja -C builddir/ - sudo ninja -C builddir/ install + meson compile -C builddir/ + sudo meson install -C builddir/ On Windows you can also use the Visual Studio backend @@ -116,7 +116,7 @@ First, configure Mesa and install in the temporary location: .. code-block:: console meson setup builddir/ -Dprefix="$MESA_INSTALLDIR" OTHER_OPTIONS - ninja -C builddir/ install + meson install -C builddir/ where ``OTHER_OPTIONS`` is replaced by any meson configuration options you may want. For instance, if you want to build the LLVMpipe drivers, it would look @@ -126,7 +126,7 @@ like this: meson setup builddir/ -Dprefix="$MESA_INSTALLDIR" \ -Dgallium-drivers=swrast -Dvulkan-drivers=swrast - ninja -C builddir/ install + meson install -C builddir/ Once Mesa has built and installed to ``$MESA_INSTALLDIR``, you can run any app against your temporary install by setting the right environment variables. @@ -226,7 +226,7 @@ Gallium-based versions of libGL and device drivers. 6. Building OpenGL programs with pkg-config ------------------------------------------- -Running ``ninja install`` will install package configuration files for +Running ``meson install`` will install package configuration files for the pkg-config utility. When compiling your OpenGL application you can use pkg-config to diff --git a/docs/osmesa.rst b/docs/osmesa.rst index 54eeb4fd1f4..282300510c3 100644 --- a/docs/osmesa.rst +++ b/docs/osmesa.rst @@ -26,7 +26,7 @@ Configure and build Mesa with something like: .. code-block:: console meson setup builddir -Dosmesa=true -Dgallium-drivers=swrast -Dvulkan-drivers=[] -Dprefix=$PWD/builddir/install - ninja -C builddir install + meson install -C builddir Make sure you have LLVM installed first if you want to use the LLVMpipe driver. diff --git a/docs/perfetto.rst b/docs/perfetto.rst index eef9699a63d..8c7575cdc43 100644 --- a/docs/perfetto.rst +++ b/docs/perfetto.rst @@ -88,7 +88,7 @@ the steps above : # Configure Mesa with perfetto mesa $ meson . build -Dperfetto=true -Dvulkan-drivers=intel,broadcom -Dgallium-drivers= # Build mesa - mesa $ ninja -C build + mesa $ meson compile -C build # Within the Mesa repo, build perfetto mesa $ cd subprojects/perfetto