From patchwork Wed Oct 28 00:42:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 7505771 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 9DADA9F36A for ; Wed, 28 Oct 2015 00:44:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4B9A208D0 for ; Wed, 28 Oct 2015 00:44:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCDC920898 for ; Wed, 28 Oct 2015 00:44:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755157AbbJ1AoC (ORCPT ); Tue, 27 Oct 2015 20:44:02 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:36058 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755025AbbJ1Am6 (ORCPT ); Tue, 27 Oct 2015 20:42:58 -0400 Received: by pacik9 with SMTP id ik9so26376101pac.3 for ; Tue, 27 Oct 2015 17:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lixom_net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pc836QK8cQr9ky2ruOI83qo3R1PQs4nLDDKmoq8L+cU=; b=WvM7VR+gRx/ZjqGfaegfIG75LkI1saikaJwo1sMkw0HzdkvnYC4BJuzeCkwuFVmRGD /xOkNR+bDAnhpDr4ww3l+JzGe8bkQG8vwjxmwo0EmhPXjhjZCYda0XkR7OMVAvPIJheG xE93T3RFSc+xFPzJUaAwkNLAH3TBG04hsFRm+itxMimAUHDTZ8St1XL1GNl/JcpV9sYB cpSvJNR5jwFYm58WSlFnsUqNwHMacHvgxsNqDbhh2EMIdfGsn2hF9xmSL7fjNOOOC+lX /Afh+6A33iBe6q8KlqV2eAahEqfANCL33reCaJct3mJOWkE35i3KhDPTOfQgUT0bPx+8 FxOQ== 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=pc836QK8cQr9ky2ruOI83qo3R1PQs4nLDDKmoq8L+cU=; b=cfAGYNQtwagqy8M/1ouQMvenpG4OV4wH5M6g5Lnoom6r7d17SjBxZVlD/Nq4r4tJvD hBTdJ3hDMI2SV4sgGCzS1igdzR3IkF2eLsEYuDu4Wpmah08zVAXSaCn18DPfMfkDxJbP fMk1aj8CYqlFDWHpt2Nq2opJezXAzOBvaHuTFca2L3OkYW0uAk83uRlV0QB75CMour4s wB5KrQTGR18XL1cXTfVqv00ebD+DGhcSxN0Mz7dsX04mFxj33nNXZ06o45pclP9Yt6q6 vozrnVegaVmq8zi6XUdmDt1wAaoafnTdeKkcCEPvo2asJOdT/+OKuZ45UC+hrp8dPNDc qdfg== X-Gm-Message-State: ALoCoQl0ykrzlfVrYKBxZLKBNBQuWlrETQP+22CeDGyGAhneJnHVE0YdEh2+wCs0kWi+L+GFCSke X-Received: by 10.68.189.3 with SMTP id ge3mr31292757pbc.30.1445992977622; Tue, 27 Oct 2015 17:42:57 -0700 (PDT) Received: from localhost.localdomain ([58.123.138.250]) by smtp.gmail.com with ESMTPSA id t9sm41801385pbs.17.2015.10.27.17.42.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 17:42:56 -0700 (PDT) From: Olof Johansson To: Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, dvhart@linux.intel.com, Olof Johansson Subject: [PATCH 09/10] merge_config.sh: allow single configs to be passed in on cmdline Date: Wed, 28 Oct 2015 09:42:10 +0900 Message-Id: <1445992931-28107-10-git-send-email-olof@lixom.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445992931-28107-1-git-send-email-olof@lixom.net> References: <1445992931-28107-1-git-send-email-olof@lixom.net> 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Treat CONFIG_FOO=.. on the command line the same way as a single-entry file would. Signed-off-by: Olof Johansson Signed-off-by: Darren Hart --- scripts/kconfig/merge_config.sh | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index b26c0ef..69463dd 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -1,8 +1,8 @@ #!/bin/sh -# merge_config.sh - Takes a list of config fragment values, and merges -# them one by one. Provides warnings on overridden values, and specified -# values that did not make it to the resulting .config file (due to missed -# dependencies or config symbol removal). +# merge_config.sh - Takes a list of config fragment filenames or configuration +# value, and merges them one by one. Provides warnings on overridden values, +# and specified values that did not make it to the resulting .config file +# (due to missed dependencies or config symbol removal). # # Portions reused from kconf_check and generate_cfg: # http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/kconf_check @@ -108,7 +108,26 @@ fi MERGE_LIST=$* SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" -TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) +TMP_FILE=$(mktemp $OUTPUT/.tmp.config.XXXXXXXXXX) + +CLEAN_FILES=$TMP_FILE + +# Process cmdline configs into temporary fragments +for ENTRY in $MERGE_LIST ; do + case $ENTRY in + CONFIG*) + FF=$(mktemp $OUTPUT/.temp.frag-cmdline.XXXXX) + CLEAN_FILES="$CLEAN_FILES $FF" + echo $ENTRY > $FF + NEW_LIST="$NEW_LIST $FF" + ;; + *) + NEW_LIST="$NEW_LIST $ENTRY" + ;; + esac +done + +MERGE_LIST=$NEW_LIST echo "Using $INITFILE as base" cat $INITFILE > $TMP_FILE