From patchwork Fri Mar 8 09:56:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 159964 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp8504950jad; Fri, 8 Mar 2019 01:57:06 -0800 (PST) X-Google-Smtp-Source: APXvYqyysFZBsn9EJoY7ilhj1SRnEdG+S2YHwWAE8KpQwWgbw+yiCDKrVoUm7IEjbDu+UfvfiW3Y X-Received: by 2002:a65:4243:: with SMTP id d3mr15829099pgq.56.1552039026458; Fri, 08 Mar 2019 01:57:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552039026; cv=none; d=google.com; s=arc-20160816; b=I2WU0rfDVYDEC6yvzdYGBq/GemRqW2SnjByBzUMyB1hEY7AlBz1XBr0emvWa9Y0aNS TY5EJBtZqkNNMlKGT3peOoByZrMc941j7nqv3V9D70LD+41AG81pjUiFZ/9rc9pPd8mi MP63Lf7Z/LvbfshicCxFgDB3qFMYnPvZ1mRcf0AvRoJ2+qjTIEnweBh4WdcqN1v/LDWJ IqFTQE6Av0HjW0sss5gqOu7VDnerXdn7byCPcDwrqNTH+0w/+KmicJuSxhLzHofTCdeq mjXf+WkuZl0vAU8mEoJfLZKx5ekGnA8zArcJqNTnAoK+xi8AkBlPyYKQHMMIyJYyvdr1 IWZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=5cYoMwhwP7MQYAIXIKGJrDLwUHl9mhxyYhEh0rTq03E=; b=W1atdswVtMs8vHffTl+Skh0AM9pty5fu+cL0vP4AGJf2GCSPeeEqNI44o509hkN2qO YPYuc2KkwIJfolWAQL1vgQojqnxMng1RXLWZ9rI6LeO1OFO2dL2NKx3tdyIisWVToKe5 sLNoklR+JEP53RTfoccCo6zVUtsoZIqkv8TJn7Nv1yUb3C1g6Fh+/Not4y1wQYv80KMU 4ZjsBYXkMrDXGbMMabcQagBHkBwGr6h+1FSpGPPDcrIaBBUbmwKca50Rfl4/kDyj4ZgN ZGbP9+YGNIqSy46Cc8SFAQwBNiJ9U79zaQ+zMKgF43Lxiq0GVyCqLQSN821YGbSdDmFL j50A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=QtwSLJx4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n19si3432047pgk.158.2019.03.08.01.57.06; Fri, 08 Mar 2019 01:57:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=QtwSLJx4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726313AbfCHJ5E (ORCPT + 31 others); Fri, 8 Mar 2019 04:57:04 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:58442 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbfCHJ5E (ORCPT ); Fri, 8 Mar 2019 04:57:04 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id x289uSqa003883; Fri, 8 Mar 2019 18:56:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x289uSqa003883 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1552038988; bh=5cYoMwhwP7MQYAIXIKGJrDLwUHl9mhxyYhEh0rTq03E=; h=From:To:Cc:Subject:Date:From; b=QtwSLJx4pij8cDr3SpU0PP5Go2irqNyGZnV4pc+AVkvWfXfBkqx8JuUZgH4hJBnra ilSYT9pXLo39QIEPV85b8ozgvl79zk8ifYpPxAVJ5QBE+6YgCxa2Lc1dh5COrqCyKp pbinu8xM4lxPjGctdz1K/EmWK0mmjLtTdRC1P5q+RMLdaw6A1i3EaUHgL70De5RSJ1 USOF4qzt8BxQVJZczbd8CKXkcOTAW1muRSZngZEuyYKPkX3MBjhwaeZJ6jS9l3e9UT yBeIynAO+gZDawfJ78TaYsbQ5vNA5jyeQnjmwaFv3o06HucGuzQ2Vf53LGE0oWcneI GwJ0TojfST8Fw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ben Hutchings , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] kbuild: deb-pkg: add CONFIG_ prefix to kernel config options Date: Fri, 8 Mar 2019 18:56:23 +0900 Message-Id: <1552038985-10473-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This might be a kind of bike-shed, but I personally prefer grep'able code. I often do 'git grep CONFIG_FOO' instead of 'git grep FOO' when I want to know where that CONFIG option is used. This makes code longer, but I hope this is acceptable level. Signed-off-by: Masahiro Yamada --- scripts/package/mkdebian | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) -- 2.7.4 diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index f030961..e3726e8 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -7,7 +7,7 @@ set -e is_enabled() { - grep -q "^CONFIG_$1=y" $KCONFIG_CONFIG + grep -q "^$1=y" $KCONFIG_CONFIG } if_enabled_echo() { @@ -31,23 +31,23 @@ set_debarch() { x86_64) debarch=amd64 ;; sparc*) - debarch=sparc$(if_enabled_echo 64BIT 64) ;; + debarch=sparc$(if_enabled_echo CONFIG_64BIT 64) ;; s390*) debarch=s390x ;; ppc*) - if is_enabled 64BIT; then - debarch=ppc64$(if_enabled_echo CPU_LITTLE_ENDIAN el) + if is_enabled CONFIG_64BIT; then + debarch=ppc64$(if_enabled_echo CONFIG_CPU_LITTLE_ENDIAN el) else - debarch=powerpc$(if_enabled_echo SPE spe) + debarch=powerpc$(if_enabled_echo CONFIG_SPE spe) fi ;; parisc*) debarch=hppa ;; mips*) - if is_enabled CPU_LITTLE_ENDIAN; then - debarch=mips$(if_enabled_echo 64BIT 64)$(if_enabled_echo CPU_MIPSR6 r6)el - elif is_enabled CPU_MIPSR6; then - debarch=mips$(if_enabled_echo 64BIT 64)r6 + if is_enabled CONFIG_CPU_LITTLE_ENDIAN; then + debarch=mips$(if_enabled_echo CONFIG_64BIT 64)$(if_enabled_echo CONFIG_CPU_MIPSR6 r6)el + elif is_enabled CONFIG_CPU_MIPSR6; then + debarch=mips$(if_enabled_echo CONFIG_64BIT 64)r6 else debarch=mips fi @@ -55,8 +55,8 @@ set_debarch() { aarch64|arm64) debarch=arm64 ;; arm*) - if is_enabled AEABI; then - debarch=arm$(if_enabled_echo VFP hf el) + if is_enabled CONFIG_AEABI; then + debarch=arm$(if_enabled_echo CONFIG_VFP hf el) else debarch=arm fi @@ -64,10 +64,10 @@ set_debarch() { openrisc) debarch=or1k ;; sh) - if is_enabled CPU_SH3; then - debarch=sh3$(if_enabled_echo CPU_BIG_ENDIAN eb) - elif is_enabled CPU_SH4; then - debarch=sh4$(if_enabled_echo CPU_BIG_ENDIAN eb) + if is_enabled CONFIG_CPU_SH3; then + debarch=sh3$(if_enabled_echo CONFIG_CPU_BIG_ENDIAN eb) + elif is_enabled CONFIG_CPU_SH4; then + debarch=sh4$(if_enabled_echo CONFIG_CPU_BIG_ENDIAN eb) fi ;; esac