From 426c3a49e668486f3003291f8079423f7cb03b0b Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 20 Feb 2024 18:25:27 +0800 Subject: [PATCH] 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. --- chapter07/iproute2.xml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/chapter07/iproute2.xml b/chapter07/iproute2.xml index 4f7ad3bb6..d7c567002 100644 --- a/chapter07/iproute2.xml +++ b/chapter07/iproute2.xml @@ -44,18 +44,13 @@ Use IPRoute2 to Set Up Loopback Network Interface - IPRoute2 package has several dependencies not installed yet, but - we only need ip utility from the package now. - Disable the build of other utilities: - -sed '/SUBDIRS/s/=.*/=lib ip/' -i Makefile - Compile the package: -PKG_CONFIG=false make +PKG_CONFIG=false make SUBDIRS='lib ip' - The meaning of the environment variable: + The meaning of the environment and overriden make + variables: PKG_CONFIG=false @@ -66,6 +61,16 @@ need these dependencies. + + + SUBDIRS='lib ip' + + Only build the ip utility from the + package and disable the build of other utilities. This is needed + to prevent a build failure due to the lack of some + dependencies. + + It's not needed to install the ip utility now.