From patchwork Wed Apr 8 11:42:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 6178981 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 CA9CC9F349 for ; Wed, 8 Apr 2015 11:43:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9093201F4 for ; Wed, 8 Apr 2015 11:43:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C46122015E for ; Wed, 8 Apr 2015 11:43:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751368AbbDHLnG (ORCPT ); Wed, 8 Apr 2015 07:43:06 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54573 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751300AbbDHLnF (ORCPT ); Wed, 8 Apr 2015 07:43:05 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 88067AD25 for ; Wed, 8 Apr 2015 11:43:03 +0000 (UTC) Received: by sepie.suse.cz (Postfix, from userid 10020) id 696AA40800; Wed, 8 Apr 2015 13:43:03 +0200 (CEST) From: Michal Marek To: linux-kbuild@vger.kernel.org Subject: [PATCH 1/2] kconfig: Simplify Makefile Date: Wed, 8 Apr 2015 13:42:55 +0200 Message-Id: <1428493376-20197-1-git-send-email-mmarek@suse.cz> X-Mailer: git-send-email 2.1.4 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=unavailable 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 Use a single rule for targets handled directly by the conf program. Signed-off-by: Michal Marek Reviewed-by: Masahiro Yamada --- scripts/kconfig/Makefile | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index cb2cf54..1f5e453 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -2,7 +2,7 @@ # Kernel configuration targets # These targets are used from top-level makefile -PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \ +PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \ localmodconfig localyesconfig ifdef KBUILD_KCONFIG @@ -29,9 +29,6 @@ config: $(obj)/conf nconfig: $(obj)/nconf $< $(Kconfig) -oldconfig: $(obj)/conf - $< --$@ $(Kconfig) - silentoldconfig: $(obj)/conf $(Q)mkdir -p include/config include/generated $< --$@ $(Kconfig) @@ -74,21 +71,20 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h --output $(obj)/linux.pot $(Q)rm -f $(obj)/config.pot -PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig +# These targets map 1:1 to the commandline options of 'conf' +simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ + alldefconfig randconfig listnewconfig olddefconfig +PHONY += $(simple-targets) -allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf +$(simple-targets): $(obj)/conf $< --$@ $(Kconfig) -PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig - -listnewconfig olddefconfig: $(obj)/conf - $< --$@ $(Kconfig) +PHONY += oldnoconfig savedefconfig defconfig # oldnoconfig is an alias of olddefconfig, because people already are dependent # on its behavior(sets new symbols to their default value but not 'n') with the # counter-intuitive name. -oldnoconfig: $(obj)/conf - $< --olddefconfig $(Kconfig) +oldnoconfig: olddefconfig savedefconfig: $(obj)/conf $< --$@=defconfig $(Kconfig)