From patchwork Tue Aug 20 11:03:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 268494 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id A481B2C0118 for ; Tue, 20 Aug 2013 21:07:01 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4F13488A54; Tue, 20 Aug 2013 11:07:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UcnxO8R6NPmT; Tue, 20 Aug 2013 11:06:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 62BE98860B; Tue, 20 Aug 2013 11:06:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 23B061BF98D for ; Tue, 20 Aug 2013 11:07:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CEC8B932A7 for ; Tue, 20 Aug 2013 11:07:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id meqyG-5oCQLp for ; Tue, 20 Aug 2013 11:07:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by hemlock.osuosl.org (Postfix) with ESMTP id 2618493293 for ; Tue, 20 Aug 2013 11:07:31 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 68F0A6DB1; Tue, 20 Aug 2013 13:04:01 +0200 (CEST) Received: from localhost (unknown [37.160.161.29]) by mail.free-electrons.com (Postfix) with ESMTPSA id B8C3F6CD8 for ; Tue, 20 Aug 2013 13:03:58 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Tue, 20 Aug 2013 13:03:02 +0200 Message-Id: <1376996584-4462-4-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1376996584-4462-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1376996584-4462-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: [Buildroot] [PATCH 3/5] Makefile: test before search for kernel modules X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net The 'find $(TARGET_DIR)/lib/modules' used to find and strip kernel modules fails when no kernel modules have been installed. While the '|| true' prevents the entire build from failing, there are still some error messages displayed, which is not nice. Instead, test if the directory exists before doing the find. We also remove the '|| true' in order to really abort the build if a problematic error occurs. Signed-off-by: Thomas Petazzoni Acked-by: Luca Ceresoli --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 794d217..5d40126 100644 --- a/Makefile +++ b/Makefile @@ -476,8 +476,9 @@ ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y) find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f endif $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true - find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \ - xargs -r $(KSTRIPCMD) || true + test -d $(TARGET_DIR)/lib/modules && \ + find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \ + xargs -r $(KSTRIPCMD) # See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads # besides the one in which crash occurred; or SIGTRAP kills my program when