ninja.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-ninja" role="wrap">
  8. <?dbhtml filename="ninja.html"?>
  9. <sect1info condition="script">
  10. <productname>ninja</productname>
  11. <productnumber>&ninja-version;</productnumber>
  12. <address>&ninja-url;</address>
  13. </sect1info>
  14. <title>Ninja-&ninja-version;</title>
  15. <indexterm zone="ch-system-ninja">
  16. <primary sortas="a-Ninja">Ninja</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>Ninja is a small build system with a focus on speed.</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&ninja-ch6-sbu;</seg>
  26. <seg>&ninja-ch6-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>Installation of Ninja</title>
  32. <para>When run, ninja normally runs a maximum number of processes
  33. in parallel. By default this is the number of cores on the system
  34. plus two. In some cases this can overheat a CPU or run a system out
  35. of memory. If run from the command line, passing a -jN parameter
  36. will limit the number of parallel processes, but some packages
  37. embed the execution of ninja and do not pass a -j parameter.</para>
  38. <para>Using the <emphasis>optional</emphasis> patch below allows a user to
  39. limit the number of parallel processes via an environment variable,
  40. NINJAJOBS. <command>For example</command> setting:
  41. <!-- Using <command> here to make the output bold. We really don't want
  42. users setting this now and experience shows that many users blindly
  43. copy/paste anything in a box. -->
  44. <screen>export NINJAJOBS=4</screen>
  45. will limit ninja to four parallel processes.</para>
  46. <para>If desired, install the patch by running:</para>
  47. <screen><userinput remap="pre">patch -Np1 -i ../ninja-1.8.2-add_NINJAJOBS_var-1.patch</userinput></screen>
  48. <para>Build Ninja with:</para>
  49. <screen><userinput remap="configure">python3 configure.py --bootstrap</userinput></screen>
  50. <variablelist>
  51. <title>The meaning of the build option:</title>
  52. <varlistentry>
  53. <term><parameter>--bootstrap</parameter></term>
  54. <listitem>
  55. <para>This parameter forces ninja to rebuild itself for the current
  56. system.</para>
  57. </listitem>
  58. </varlistentry>
  59. </variablelist>
  60. <para>To test the results, issue:</para>
  61. <screen><userinput remap="test">python3 configure.py
  62. ./ninja ninja_test
  63. ./ninja_test --gtest_filter=-SubprocessTest.SetWithLots</userinput></screen>
  64. <para>Install the package:</para>
  65. <screen><userinput remap="install">install -vm755 ninja /usr/bin/
  66. install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja
  67. install -vDm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja</userinput></screen>
  68. </sect2>
  69. <sect2 id="contents-ninja" role="content">
  70. <title>Contents of Ninja</title>
  71. <segmentedlist>
  72. <segtitle>Installed programs</segtitle>
  73. <seglistitem>
  74. <seg>ninja</seg>
  75. </seglistitem>
  76. </segmentedlist>
  77. <variablelist>
  78. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  79. <?dbfo list-presentation="list"?>
  80. <?dbhtml list-presentation="table"?>
  81. <varlistentry id="ninja">
  82. <term><command>ninja</command></term>
  83. <listitem>
  84. <para>is the Ninja build system.</para>
  85. <indexterm zone="ch-system-ninja ninja">
  86. <primary sortas="b-ninja">ninja</primary>
  87. </indexterm>
  88. </listitem>
  89. </varlistentry>
  90. </variablelist>
  91. </sect2>
  92. </sect1>