From patchwork Wed Aug 5 23:54:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Olivari X-Patchwork-Id: 504449 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D6AB21402C7 for ; Thu, 6 Aug 2015 09:56:17 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id EFB662845FE; Thu, 6 Aug 2015 01:54:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 61F81280640 for ; Thu, 6 Aug 2015 01:53:47 +0200 (CEST) X-policyd-weight: using cached result; rate:hard: -7.6 Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 6 Aug 2015 01:53:45 +0200 (CEST) Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id D292F140FA0; Wed, 5 Aug 2015 23:54:21 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id B9E26140FA4; Wed, 5 Aug 2015 23:54:21 +0000 (UTC) Received: from mathieu-linux.qualcomm.com (qf-scl1nat.qualcomm.com [207.114.132.30]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mathieu@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6C653140FA0; Wed, 5 Aug 2015 23:54:20 +0000 (UTC) From: Mathieu Olivari To: jow@openwrt.org Date: Wed, 5 Aug 2015 16:54:13 -0700 Message-Id: <1438818853-5481-3-git-send-email-mathieu@codeaurora.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438818853-5481-1-git-send-email-mathieu@codeaurora.org> References: <1438818853-5481-1-git-send-email-mathieu@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH 2/2] tools/quilt: fix build error during kernel_menuconfig on a cleaned env X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" 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 --- tools/quilt/patches/000-relocatable.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 _($) {