From patchwork Mon Oct 29 21:10:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 10660207 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66C7514BD for ; Mon, 29 Oct 2018 21:11:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55F6229FA6 for ; Mon, 29 Oct 2018 21:11:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47A7B29FAA; Mon, 29 Oct 2018 21:11:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E29E229FA6 for ; Mon, 29 Oct 2018 21:11:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726070AbeJ3GBd (ORCPT ); Tue, 30 Oct 2018 02:01:33 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53110 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbeJ3GBd (ORCPT ); Tue, 30 Oct 2018 02:01:33 -0400 Received: by mail-wm1-f67.google.com with SMTP id 189-v6so9711153wmw.2 for ; Mon, 29 Oct 2018 14:11:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rb05YTVFKsuMgSFPdXI0QM7bLul3NWzBs0QrjUyynz4=; b=J7QIdR1y8D0r4pTiN6ztRQVZzhclKwhAu8HCf64HlEm0MgQvP13ls2nOI8c5mPGFaG PIUF8zQYTprmjrBoAGOMwlNf+thhPK0hzQvf+yOBIDq5JegPCry33TzchBRoP6/6L1HK bmCdQoT/XSJ3RrObnIef4+FG1NXQtXeB2wCvMLE1ob5ahGFr2IsToqSusOv0eWZ2Ajbd LXrDelcwjyO8t3RfyqYC4mRYINIs7hO7eXm2HfvDN65yDkoO6vOqaiQi9m0G1mtcFxVi PV5GInup0/edkdNNN62mxEXMv+lLWHLQXemsUbt/HPdSnjP6fDk6eACt4Pr+aGa9M8cW 2owg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rb05YTVFKsuMgSFPdXI0QM7bLul3NWzBs0QrjUyynz4=; b=s7j4xoDR4yS/TeYu/fpLlFrQu5YchC5RlaRGt+6xNQqQJuXZfAdYqxKTeIPqwC8wmk 4OtrTb7gzLODM8bYAFfqSWoJW+kqxbIU7lHi11jn6YBfqggO1HjbWzoNifNc/qw00xtg 6O8NMHSiqjQjOYOZE5m9HjUPO2CxoC0qWR6ls+PTZ0kg6mVf4l4Gv5KuIemsxXhknqUG wi6VoqA/kfz+FOrMW6aJzgOZvq1ZTuGsEOH0gdPaWeDrYTIYNd2Q8qEGCEh9ZUtCf/Kg ce2NUkoTCRWYkLBn1G752nQatn6vWNhxnMhvcAdIwqEp+Fo3SSfybZhgllVy5nmzBR+u ZF/g== X-Gm-Message-State: AGRZ1gIkrd5X42tjn150IAK9A+oPJPr3QDjQHPavI1ASynbUYWpmel8Q 35zceZcvkaYPPX3fM3aA2LPU2jbf X-Google-Smtp-Source: AJdET5fppckaeUbh7WGQ+4JavNarYE0hIiHEVA+hyk7bbhWMY16gRfq6g0rJFYmxfwABehy5eRew+Q== X-Received: by 2002:a1c:4683:: with SMTP id t125-v6mr689309wma.112.1540847465544; Mon, 29 Oct 2018 14:11:05 -0700 (PDT) Received: from localhost.localdomain ([62.201.25.198]) by smtp.gmail.com with ESMTPSA id b71-v6sm15498129wma.13.2018.10.29.14.11.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 14:11:04 -0700 (PDT) From: Petr Vorel To: linux-kbuild@vger.kernel.org Cc: Petr Vorel , Masahiro Yamada , Marcel Patzlaff , Nasser Afshin , Angelo Compagnucci , Arnout Vandecappelle , Matthew Weber , John Stultz Subject: [PATCH v2 1/1] merge_config.sh: Allow to define config prefix Date: Mon, 29 Oct 2018 22:10:58 +0100 Message-Id: <20181029211058.7062-1-petr.vorel@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP with CONFIG_ environment variable. merge_config.sh uses CONFIG_ which is used in kernel and other projects. There are some projects which use kconfig with different prefixes (e.g. buildroot: BR2_ prefix). CONFIG_ variable is already used for this purpose in kconfig binary (scripts/kconfig/lkc.h), let's use the same rule for in merge_config.sh. Signed-off-by: Petr Vorel Suggested-by: Masahiro Yamada --- scripts/kconfig/merge_config.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index 67d131447631..7067a9fe0fa3 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -26,6 +26,8 @@ clean_up() { } trap clean_up HUP INT TERM +CONFIG_PREFIX=${CONFIG_-CONFIG_} + usage() { echo "Usage: $0 [OPTIONS] [CONFIG [...]]" echo " -h display this help text" @@ -33,6 +35,8 @@ usage() { echo " -n use allnoconfig instead of alldefconfig" echo " -r list redundant entries when merging fragments" echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead." + echo + echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_ environment variable." } RUNMAKE=true @@ -99,7 +103,8 @@ if [ ! -r "$INITFILE" ]; then fi MERGE_LIST=$* -SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" +SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)[= ].*/\2/p" + TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) echo "Using $INITFILE as base"