diff mbox

[OpenWrt-Devel,2/2] tools/quilt: fix build error during kernel_menuconfig on a cleaned env

Message ID 1437525579-8950-2-git-send-email-mathieu@codeaurora.org
State Accepted
Headers show

Commit Message

Mathieu Olivari July 22, 2015, 12:39 a.m. UTC
When running "make kernel_menuconfig" right after "make clean", we error
out with the following message:

Makefile:22: recipe for target '.../build_dir/target-arm_cortex-a7_musl-1.1.10_eabi/linux-.../linux-3.18.18/.quilt_checked' failed
make[2]: [.../build_dir/target-arm_cortex-a7_musl-1.1.10_eabi/linux-.../linux-3.18.18/.quilt_checked]
Error 127 (ignored)

The root cause of the problem is located in the OpenWrt specific quilt
patch, which sets the quilt install directory to $STAGING_DIR/../host.
However, on a clean environment (right after running "make clean"),
$STAGING_DIR doesn't exist. The "quilt" executable doesn't find its
different commands, errors out, and creates this message.

We're fixing it by using $STAGING_DIR_HOST rather than $STAGING_DIR,
which is absolute. It will work even if there is no target directory
yet.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>
---
 tools/quilt/patches/000-relocatable.patch | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Jo-Philipp Wich July 22, 2015, 7:28 a.m. UTC | #1
Hi,

this was originally done to fix quilt in the SDK. Did you test it there
after your change?

~ Jow
Mathieu Olivari Aug. 4, 2015, 1:28 a.m. UTC | #2
Hi Jow,
I just tried it out. I confirm the SDK works after the patch as well.
Thanks,
Mathieu

-----Original Message-----
From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On
Behalf Of Jo-Philipp Wich
Sent: Wednesday, July 22, 2015 12:29 AM
To: openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH 2/2] tools/quilt: fix build error during
kernel_menuconfig on a cleaned env

Hi,

this was originally done to fix quilt in the SDK. Did you test it there
after your change?

~ Jow
diff mbox

Patch

diff --git a/tools/quilt/patches/000-relocatable.patch b/tools/quilt/patches/000-relocatable.patch
index 99d7af5..c498627 100644
--- a/tools/quilt/patches/000-relocatable.patch
+++ b/tools/quilt/patches/000-relocatable.patch
@@ -7,9 +7,9 @@ 
 -export TEXTDOMAINDIR=@LOCALEDIR@
  
 -: ${QUILT_DIR=@QUILT_DIR@}
-+if test -n "$STAGING_DIR"; then
-+	export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
-+	: ${QUILT_DIR=$STAGING_DIR/../host/share/quilt} ${QUILT_LIB=$STAGING_DIR/../host/lib/quilt}
++if test -n "$STAGING_DIR_HOST"; then
++	export TEXTDOMAINDIR="$STAGING_DIR_HOST/share/locale"
++	: ${QUILT_DIR=$STAGING_DIR_HOST/share/quilt} ${QUILT_LIB=$STAGING_DIR_HOST/lib/quilt}
 +else
 +	export TEXTDOMAINDIR=@LOCALEDIR@
 +	: ${QUILT_DIR=@QUILT_DIR@}
@@ -25,7 +25,7 @@ 
  
  setlocale(LC_MESSAGES, "");
 -bindtextdomain("quilt", "@LOCALEDIR@");
-+bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@");
++bindtextdomain("quilt", $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/locale' : "@LOCALEDIR@");
  textdomain("quilt");
  
  sub _($) {
@@ -36,8 +36,8 @@ 
  #  See the COPYING and AUTHORS files for more details.
  
 -: ${QUILT_DIR=@QUILT_DIR@}
-+if test -n "$STAGING_DIR"; then
-+	: ${QUILT_DIR="$STAGING_DIR/../host/share/quilt"}
++if test -n "$STAGING_DIR_HOST"; then
++	: ${QUILT_DIR="$STAGING_DIR_HOST/share/quilt"}
 +else
 +	: ${QUILT_DIR=@QUILT_DIR@}
 +fi
@@ -51,8 +51,8 @@ 
  
  export TEXTDOMAIN=quilt
 -export TEXTDOMAINDIR=@LOCALEDIR@
-+if [ -n "$STAGING_DIR" ]; then
-+	export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
++if [ -n "$STAGING_DIR_HOST" ]; then
++	export TEXTDOMAINDIR="$STAGING_DIR_HOST/share/locale"
 +else
 +	export TEXTDOMAINDIR=@LOCALEDIR@
 +fi
@@ -66,7 +66,7 @@ 
  
  setlocale(LC_MESSAGES, "");
 -bindtextdomain("quilt", "@LOCALEDIR@");
-+bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@");
++bindtextdomain("quilt", $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/locale' : "@LOCALEDIR@");
  textdomain("quilt");
  
  sub _($) {