From patchwork Fri Mar 13 06:21:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 6001921 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 281669F380 for ; Fri, 13 Mar 2015 06:22:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 51605201BB for ; Fri, 13 Mar 2015 06:22:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 672CD202B8 for ; Fri, 13 Mar 2015 06:22:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752043AbbCMGWc (ORCPT ); Fri, 13 Mar 2015 02:22:32 -0400 Received: from conuserg009.nifty.com ([202.248.44.35]:57880 "EHLO conuserg009-v.nifty.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752032AbbCMGW3 (ORCPT ); Fri, 13 Mar 2015 02:22:29 -0400 Received: from beagle.diag.org (KD036010032014.au-net.ne.jp [36.10.32.14]) (authenticated) by conuserg009-v.nifty.com with ESMTP id t2D6Ln9l018725; Fri, 13 Mar 2015 15:22:05 +0900 X-Nifty-SrcIP: [36.10.32.14] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Josh Boyer , Darren Hart , john stultz , Michal Marek , Josh Triplett , Masahiro Yamada , linux-kernel@vger.kernel.org, "Yann E. MORIN" Subject: [RFC PATCH 6/6] kbuild: add generic mergeconfig target, %.config Date: Fri, 13 Mar 2015 15:21:43 +0900 Message-Id: <1426227703-31815-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426227703-31815-1-git-send-email-yamada.masahiro@socionext.com> References: <1426227703-31815-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP "scripts/kconfig/merge_config.sh && make oldconfig" works well enough for merging local config fragments, but Kbuild currently has the entry points only for "kvmconfig" and "tinyconfig". This commit provides the generic target for mergeconfig, so we can manage our own config fragments easily: put "foo.config" in arch/$(SRCARCH)/configs/ or kernel/configs/, and then run "make foo.config". Now "make kvmconfig" is just a shorthand of "make kvm_guest.config". Likewise, "make tinyconfig" is equivalent to "make allnoconfig tiny.config". Signed-off-by: Masahiro Yamada --- Perhaps, "make foo_mergeconfig" is better than "make foo.config"? scripts/kconfig/Makefile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index b0e4be2..cb2cf54 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -104,21 +104,20 @@ endif %_defconfig: $(obj)/conf $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) -configfiles=$(wildcard $(srctree)/kernel/configs/$(1).config $(srctree)/arch/$(SRCARCH)/configs/$(1).config) +configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@) -define mergeconfig -$(if $(call configfiles,$(1)),, $(error No configuration exists for this target on this architecture)) -$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(call configfiles,$(1)) -+$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig -endef +%.config: $(obj)/conf + $(if $(call configfiles),, $(error No configuration exists for this target on this architecture)) + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles) + +$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig PHONY += kvmconfig -kvmconfig: - $(call mergeconfig,kvm_guest) +kvmconfig: kvm_guest.config + @: PHONY += tinyconfig -tinyconfig: allnoconfig - $(call mergeconfig,tiny) +tinyconfig: + $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config # Help text used by make help help: