From patchwork Thu Mar 31 08:57:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Izard X-Patchwork-Id: 604008 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 3qbJM93smnz9sXQ for ; Thu, 31 Mar 2016 19:58:12 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=dFlwjMRA; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8A1F1956D1; Thu, 31 Mar 2016 08:58:11 +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 bOP4+MWTgi99; Thu, 31 Mar 2016 08:58:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id D5CCC953D5; Thu, 31 Mar 2016 08:58:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 877381C0E44 for ; Thu, 31 Mar 2016 08:58:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7041433949 for ; Thu, 31 Mar 2016 08:58:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9maQHhOYbAKn for ; Thu, 31 Mar 2016 08:58:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by silver.osuosl.org (Postfix) with ESMTPS id E8DDA3375B for ; Thu, 31 Mar 2016 08:58:08 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id i204so19943752wmd.0 for ; Thu, 31 Mar 2016 01:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TL0LaZ1bcCBTfRo4rf3NWMImFxdxIDrj6GuJMjl/hig=; b=dFlwjMRALBDl6XxhKrsdqYIXdHVkfW9qDzUB7u2Zl/q40amxbisAR3hq7a2Q09QZbw bzigyHbN8D4UdlBUW4u2k7fHTvG0mqDDl+Ap3bTDZqiuA3NGsZnrrtjLJLJCGW1y/BI8 v//vXDPbCfG4KscfZAuPP0+tH0aFw3G+XFQHCrJOr6GifsSq9SW4o3g4vYUdbiAFwmIU r4fOf8Yb7EnGpwiyDuspVVa36E2HUye3DqprGwIWjcoJTkhHZ50wFyFsZqUCsTj88480 89aASdH9v4goiCp7i6M5RTmvVlb1SZpyokawQX1ZLa4wR0VvKd261ynV/JnYTrWzNFEU IuKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TL0LaZ1bcCBTfRo4rf3NWMImFxdxIDrj6GuJMjl/hig=; b=etoZWuqaTJ0hVOgvh52gBYkgjFjD1r4cu8anrOihMKiFHQna/kLgLFlwJdkz3kpyow o/+kbBckZNEy69HciBwx28Nag6tRoFNaCfb2NAog96b3+x+Ij131dX9k85r1i6UuZYJF 3odgxGXVxiKPOb90pxz3Ti4LlES4sSTUO3x+r7AI+aIbF2AU3WJFqinxFpG4GIMAbwNt RpLo2C5SPgAp2iw4lZGyGDHpLW29dEJ7bu2VELrocgG/rEba96EhErVepe3vPNsTcs+2 6gunAWY9WZUC7pfDxcNIhx3Xt1RQ9pTR4jpMcyUwumKiDxi5+BuhY9m6XJnNNxWG+LxB 946Q== X-Gm-Message-State: AD7BkJI2zIiByLeMjq0B68OQ333EeRJKxBOi/hisj29/lS02Tz2PyCkhhwkSoHc+WNeVfA== X-Received: by 10.28.104.131 with SMTP id d125mr26649457wmc.99.1459414687597; Thu, 31 Mar 2016 01:58:07 -0700 (PDT) Received: from localhost.localdomain (146.187.3.109.rev.sfr.net. [109.3.187.146]) by smtp.gmail.com with ESMTPSA id 20sm892789wmv.4.2016.03.31.01.58.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 31 Mar 2016 01:58:06 -0700 (PDT) From: Romain Izard To: buildroot@buildroot.org Date: Thu, 31 Mar 2016 10:57:51 +0200 Message-Id: <1459414674-30753-2-git-send-email-romain.izard.pro@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459414674-30753-1-git-send-email-romain.izard.pro@gmail.com> References: <1459414674-30753-1-git-send-email-romain.izard.pro@gmail.com> Cc: Thomas Petazzoni , Romain Izard , "Yann E. MORIN" Subject: [Buildroot] [PATCH v3 1/3] core/pkg-kconfig: Factorize make commands X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" Use a variable to factorize the calls to make, as we use the same set of options each many times. Signed-off-by: Romain Izard --- Changelog: v3: new package/pkg-kconfig.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk index 94ec3cc..cb177bb 100644 --- a/package/pkg-kconfig.mk +++ b/package/pkg-kconfig.mk @@ -57,6 +57,9 @@ $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES): | $(1)-patch fi; \ done +$(2)_KCONFIG_MAKE = \ + $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) $$($(2)_KCONFIG_OPTS) + # The specified source configuration file and any additional configuration file # fragments are merged together to .config, after the package has been patched. # Since the file could be a defconfig file it needs to be expanded to a @@ -64,13 +67,11 @@ $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES): | $(1)-patch # done even when the package does not support defconfigs. $$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES) $$(Q)$$(if $$($(2)_KCONFIG_DEFCONFIG), \ - $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \ - $$($(2)_KCONFIG_OPTS) $$($(2)_KCONFIG_DEFCONFIG), \ + $$($(2)_KCONFIG_MAKE) $$($(2)_KCONFIG_DEFCONFIG), \ cp $$($(2)_KCONFIG_FILE) $$(@)) $$(Q)support/kconfig/merge_config.sh -m -O $$(@D) \ $$(@) $$($(2)_KCONFIG_FRAGMENT_FILES) - $$(Q)yes "" | $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \ - $$($(2)_KCONFIG_OPTS) oldconfig + $$(Q)yes "" | $$($(2)_KCONFIG_MAKE) oldconfig # If _KCONFIG_FILE or _KCONFIG_FRAGMENT_FILES exists, this dependency is # already implied, but if we only have a _KCONFIG_DEFCONFIG we have to add @@ -81,8 +82,7 @@ $$($(2)_DIR)/.config: | $(1)-patch # The exact rules are specified by the package .mk file. define $(2)_FIXUP_DOT_CONFIG $$($(2)_KCONFIG_FIXUP_CMDS) - $$(Q)yes "" | $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \ - $$($(2)_KCONFIG_OPTS) oldconfig + $$(Q)yes "" | $$($(2)_KCONFIG_MAKE) oldconfig $$(Q)touch $$($(2)_DIR)/.stamp_kconfig_fixup_done endef