[sdk/kdesrc-build/docbook_historied_per_file] doc/kdesrc-buildrc: Add support for Meson build system.
Michael Pyne
null at kde.org
Fri May 10 10:16:37 BST 2024
Git commit 6b226e2ce10c359f7b803a160020dcec7ec5b8ac by Michael Pyne.
Committed on 04/05/2019 at 20:15.
Pushed by ashark into branch 'docbook_historied_per_file'.
Add support for Meson build system.
New/updated config file options:
* 'configure-flags', reused as the way to pass cmdline options to the
meson setup command.
* 'ninja-options', a new option to pass cmdline options to the `ninja`
command. Note that ninja is mandated by Meson as the underlying build
tool.
Tested with https://github.com/plibither8/2048.cpp
Fixes #27, reviewed in !8.
Test suite passes and I continue to be able to build 2048.cpp. I've also
validated that ninja-options is passed to ninja when building 2048.cpp,
though this was a manual verification.
CCBUG:406268
Original commit: 6385f5e4
https://invent.kde.org/sdk/kdesrc-build/-/commit/6385f5e429dd11393b48690a33d67a66edeacfd2
M +43 -2 doc/kdesrc-buildrc/conf-options-table.docbook
https://invent.kde.org/sdk/kdesrc-build/-/commit/6b226e2ce10c359f7b803a160020dcec7ec5b8ac
diff --git a/doc/kdesrc-buildrc/conf-options-table.docbook b/doc/kdesrc-buildrc/conf-options-table.docbook
index f9875f8f..e03acc8d 100644
--- a/doc/kdesrc-buildrc/conf-options-table.docbook
+++ b/doc/kdesrc-buildrc/conf-options-table.docbook
@@ -720,10 +720,15 @@ please be careful while dealing with root privileges.</entry>
<row id="conf-make-options">
<entry>make-options</entry>
<entry>Module setting overrides global (build system option)</entry>
-<entry>Set this variable in order to pass command line options to the
+<entry><para>Set this variable in order to pass command line options to the
<command>make</command> command. This is useful for programs such as <ulink
url="https://github.com/distcc/distcc"><application>distcc</application></ulink> or
-systems with more than one processor core.
+systems with more than one processor core.</para>
+<para>Note that not all supported build systems use <command>make</command>. For
+build systems that use <command>ninja</command> for build (such as the
+<link linkend="conf-override-build-system"><application>Meson</application>
+build system</link>), see the <link linkend="conf-ninja-options">ninja-options</link>
+setting.</para>
</entry>
</row>
@@ -781,6 +786,36 @@ number, the "nicer" the program is. The default is 10.
</entry>
</row>
+<row id="conf-ninja-options">
+<entry>ninja-options</entry>
+<entry>Module setting overrides global (build system option)</entry>
+<entry><para>Set this variable in order to pass command line options to the
+
+<command>ninja</command> build command. This can be useful to enable <quote>verbose</quote> output
+or to manually reduce the number of parallel build jobs that <command>ninja</command> would
+use.</para>
+
+<note><para>Note that this setting only controls ninja when used by &kdesrc-build;.
+The &Qt; <quote>webengine</quote> module uses <command>ninja</command> indirectly, but
+only officially supports being built by <command>make</command>.
+In this situation, you can set <literal>NINJAFLAGS</literal> as a way to have
+<command>make</command> pass the appropriate flags when it later calls
+<command>ninja</command>, by using
+<link linkend="conf-make-options">make-options</link>.</para>
+
+<informalexample>
+<programlisting>
+options <replaceable>qtwebengine</replaceable>
+ # Restrict make and ninja to using no more than 6 separate compile jobs even
+ # when more CPU is available, to avoid running out of memory
+ <option><link linkend="conf-make-options">make-options</link></option> -j<replaceable>6</replaceable> NINJAFLAGS=-j<replaceable>6</replaceable>
+end options
+</programlisting>
+</informalexample>
+</note>
+</entry>
+</row>
+
<row id="conf-no-svn">
<entry>no-svn</entry>
<entry>Module setting overrides global</entry>
@@ -836,6 +871,12 @@ the auto-detection. In this case you can manually specify the correct build type
<listitem><para>This is the standard configuration tool used for most Free and
open-source software not in any of the other categories.</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term>meson</term>
+ <listitem><para>This is a <ulink url="https://mesonbuild.com">relatively new
+ tool</ulink> gaining popularity as a replacement for the autotools and may
+ be required for some non-&kde; modules.</para></listitem>
+ </varlistentry>
</variablelist>
</entry>
More information about the kde-doc-english
mailing list