Ignore:
Timestamp:
02/20/2024 10:26:00 AM (7 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/clfs-ng
Children:
f286505
Parents:
83b0abd
git-author:
Xi Ruoyao <xry111@…> (02/20/2024 10:25:27 AM)
git-committer:
Xi Ruoyao <xry111@…> (02/20/2024 10:26:00 AM)
Message:

cross-ng: Simplify the command to build ip from IPRoute2 in chapter 7

I had some incorrect understanding about overriding make variables, thus
a sed is used unnecessarily.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/iproute2.xml

    r83b0abd r426c3a4  
    4545    <title>Use IPRoute2 to Set Up Loopback Network Interface</title>
    4646
    47     <para>IPRoute2 package has several dependencies not installed yet, but
    48     we only need <command>ip</command> utility from the package now.
    49     Disable the build of other utilities:</para>
    50 
    51 <screen><userinput remap="pre">sed '/SUBDIRS/s/=.*/=lib ip/' -i Makefile</userinput></screen>
    52 
    5347    <para>Compile the package:</para>
    5448
    55 <screen><userinput remap="make">PKG_CONFIG=false make</userinput></screen>
     49<screen><userinput remap="make">PKG_CONFIG=false make SUBDIRS='lib ip'</userinput></screen>
    5650
    5751    <variablelist>
    58       <title>The meaning of the environment variable:</title>
     52      <title>The meaning of the environment and overriden make
     53      variables:</title>
    5954
    6055      <varlistentry>
     
    6560          We can override it since <command>ip</command> utility does not
    6661          need these dependencies.</para>
     62        </listitem>
     63      </varlistentry>
     64
     65      <varlistentry>
     66        <term><parameter>SUBDIRS='lib ip'</parameter></term>
     67        <listitem>
     68          <para>Only build the <command>ip</command> utility from the
     69          package and disable the build of other utilities.  This is needed
     70          to prevent a build failure due to the lack of some
     71          dependencies.</para>
    6772        </listitem>
    6873      </varlistentry>
Note: See TracChangeset for help on using the changeset viewer.