source: chapter08/ninja.xml@ 5818041

12.2 12.2-rc1 multilib trunk xry111/arm64 xry111/clfs-ng xry111/loongarch xry111/loongarch-12.2 xry111/multilib
Last change on this file since 5818041 was ba1a9cf, checked in by Bruce Dubbs <bdubbs@…>, 5 months ago

Typo

  • Property mode set to 100644
File size: 4.0 KB
RevLine 
[7152faa]1<?xml version="1.0" encoding="UTF-8"?>
[b0aabe0]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
8<sect1 id="ch-system-ninja" role="wrap">
9 <?dbhtml filename="ninja.html"?>
10
11 <sect1info condition="script">
12 <productname>ninja</productname>
13 <productnumber>&ninja-version;</productnumber>
14 <address>&ninja-url;</address>
15 </sect1info>
16
17 <title>Ninja-&ninja-version;</title>
18
19 <indexterm zone="ch-system-ninja">
20 <primary sortas="a-Ninja">Ninja</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>Ninja is a small build system with a focus on speed.</para>
27
28 <segmentedlist>
29 <segtitle>&buildtime;</segtitle>
30 <segtitle>&diskspace;</segtitle>
31
32 <seglistitem>
[fb386e0]33 <seg>&ninja-fin-sbu;</seg>
34 <seg>&ninja-fin-du;</seg>
[b0aabe0]35 </seglistitem>
36 </segmentedlist>
37
38 </sect2>
39
40 <sect2 role="installation">
41 <title>Installation of Ninja</title>
[e050677]42
[4640b37d]43 <para>When run, <command>ninja</command> normally utilizes the greatest
44 possible number of processes in parallel. By default this is the number of cores on the system,
[a3ebe8a]45 plus two. This may overheat the CPU, or make the system run out
[4640b37d]46 of memory. When <command>ninja</command> is invoked from the command line, passing the -jN parameter
[a3ebe8a]47 will limit the number of parallel processes. Some packages
[4640b37d]48 embed the execution of <command>ninja</command>, and do not pass the -j parameter on to it.</para>
[4476fba]49
[e050677]50 <para>Using the <emphasis>optional</emphasis> procedure below allows a user to
[d672ab7]51 limit the number of parallel processes via an environment variable,
[5d6f3dd]52 NINJAJOBS. <emphasis role="bold">For example</emphasis>, setting:
[4476fba]53
54 <screen>export NINJAJOBS=4</screen>
55
[4640b37d]56 will limit <command>ninja</command> to four parallel processes.</para>
[4476fba]57
[4640b37d]58 <para>If desired, make <command>ninja</command> recognize the environment variable
[a3ebe8a]59 NINJAJOBS by running the stream editor:</para>
[e050677]60
61<screen><userinput remap="pre">sed -i '/int Guess/a \
62 int j = 0;\
63 char* jobs = getenv( "NINJAJOBS" );\
64 if ( jobs != NULL ) j = atoi( jobs );\
65 if ( j > 0 ) return j;\
66' src/ninja.cc</userinput></screen>
[4476fba]67
68 <para>Build Ninja with:</para>
[b0aabe0]69
70<screen><userinput remap="configure">python3 configure.py --bootstrap</userinput></screen>
71
72 <variablelist>
[4476fba]73 <title>The meaning of the build option:</title>
[b0aabe0]74
75 <varlistentry>
76 <term><parameter>--bootstrap</parameter></term>
77 <listitem>
[a3ebe8a]78 <para>This parameter forces Ninja to rebuild itself for the current
[b0aabe0]79 system.</para>
80 </listitem>
81 </varlistentry>
82
83 </variablelist>
84
[185b7638]85 <para>The package tests cannot run in the chroot environment. They require
[ba1a9cf]86 <ulink url="&blfs-book;general/cmake.html">cmake</ulink>.</para>
[185b7638]87<!--
[b0aabe0]88 <para>To test the results, issue:</para>
89
[3333b64]90<screen><userinput remap="test">./ninja ninja_test
[185b7638]91./ninja_test - -gtest_filter=-SubprocessTest.SetWithLots</userinput></screen>
92-->
[b0aabe0]93
94 <para>Install the package:</para>
95
96<screen><userinput remap="install">install -vm755 ninja /usr/bin/
[4476fba]97install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja
98install -vDm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja</userinput></screen>
[b0aabe0]99
100 </sect2>
101
102 <sect2 id="contents-ninja" role="content">
103 <title>Contents of Ninja</title>
104
105 <segmentedlist>
106 <segtitle>Installed programs</segtitle>
107
108 <seglistitem>
109 <seg>ninja</seg>
110 </seglistitem>
111 </segmentedlist>
112 <variablelist>
113 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
114 <?dbfo list-presentation="list"?>
115 <?dbhtml list-presentation="table"?>
116
117 <varlistentry id="ninja">
118 <term><command>ninja</command></term>
119 <listitem>
[8d35535]120 <para>is the Ninja build system</para>
[b0aabe0]121 <indexterm zone="ch-system-ninja ninja">
122 <primary sortas="b-ninja">ninja</primary>
123 </indexterm>
124 </listitem>
125 </varlistentry>
126
127 </variablelist>
128
129 </sect2>
130
131</sect1>
132
Note: See TracBrowser for help on using the repository browser.