From patchwork Sun Jun 9 02:45:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 17704 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f200.google.com (mail-gh0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A910625E12 for ; Sun, 9 Jun 2013 02:45:35 +0000 (UTC) Received: by mail-gh0-f200.google.com with SMTP id 10sf1523232ghy.7 for ; Sat, 08 Jun 2013 19:45:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to:message-id :date:from:user-agent:mime-version:to:subject:references:in-reply-to :x-forwarded-message-id:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=7urB1fpNvt9T5yMIBjNsg3yIoJQk0ZXI5ifWYAgZojI=; b=FyMqAUawSq9KubZjckFrv7XpJvPLuHucnQHnRj4L+i2OSzCKzrpndBZsdIdbCVfP2e OCgFfW4+MPf1ucMTAQ9mo7Wt8OzrO/Pjh+dBq43XLYblABAW7Buv5hcS56TuSYOk0aXw Ee5htwvbfgfP1zViTtvITGgRBBAhzPd/2DYuHOwL/OgKy09Wv0permHPYSzyfGXcLT51 WvbQg1IUzlbrTEYDzcfNd1r2k4yqekYMpSDW7vQwEQ/jaF9DEjcBjrCBGQtFlCGm4sWN LBgCEq785MLisIdBKxnGNG9DHTOw6TfoDu09946myd1Yz9G1OSveK1pf/NTZ8+8Ynml0 30EQ== X-Received: by 10.224.215.68 with SMTP id hd4mr5024496qab.5.1370745935287; Sat, 08 Jun 2013 19:45:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.98.99 with SMTP id eh3ls2341534qeb.15.gmail; Sat, 08 Jun 2013 19:45:35 -0700 (PDT) X-Received: by 10.52.165.200 with SMTP id za8mr2169357vdb.41.1370745935059; Sat, 08 Jun 2013 19:45:35 -0700 (PDT) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [2607:f8b0:400c:c01::22e]) by mx.google.com with ESMTPS id tq4si2542549vdc.105.2013.06.08.19.45.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Jun 2013 19:45:35 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22e; Received: by mail-ve0-f174.google.com with SMTP id oz10so3933968veb.5 for ; Sat, 08 Jun 2013 19:45:34 -0700 (PDT) X-Received: by 10.52.53.36 with SMTP id y4mr2109651vdo.51.1370745934878; Sat, 08 Jun 2013 19:45:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.10.206 with SMTP id pb14csp28144vcb; Sat, 8 Jun 2013 19:45:34 -0700 (PDT) X-Received: by 10.66.158.9 with SMTP id wq9mr8777679pab.189.1370745933548; Sat, 08 Jun 2013 19:45:33 -0700 (PDT) Received: from mail-pb0-x229.google.com (mail-pb0-x229.google.com [2607:f8b0:400e:c01::229]) by mx.google.com with ESMTPS id qu4si2380685pbc.225.2013.06.08.19.45.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Jun 2013 19:45:33 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::229 is neither permitted nor denied by best guess record for domain of zhangfei.gao@linaro.org) client-ip=2607:f8b0:400e:c01::229; Received: by mail-pb0-f41.google.com with SMTP id rp16so2550320pbb.14 for ; Sat, 08 Jun 2013 19:45:33 -0700 (PDT) X-Received: by 10.66.150.168 with SMTP id uj8mr8862695pab.34.1370745933064; Sat, 08 Jun 2013 19:45:33 -0700 (PDT) Received: from [192.168.1.107] ([124.73.8.29]) by mx.google.com with ESMTPSA id l4sm4932006pbo.6.2013.06.08.19.45.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Jun 2013 19:45:32 -0700 (PDT) Message-ID: <51B3EC47.8040204@linaro.org> Date: Sun, 09 Jun 2013 10:45:27 +0800 From: zhangfei User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: patches@linaro.org Subject: Fwd: [PATCH] merge_config.sh: Add option to specify output dir References: <1354241046-5168-1-git-send-email-zhangfei.gao@linaro.org> In-Reply-To: <1354241046-5168-1-git-send-email-zhangfei.gao@linaro.org> X-Forwarded-Message-Id: <1354241046-5168-1-git-send-email-zhangfei.gao@linaro.org> X-Gm-Message-State: ALoCoQnL/3U7+Owo7Zf2lU7wRjbcZqxQ+LfO/Sa0Aw8jjNzOKEz7H2l2SAJ5zajfGNLRHjAPJHpv X-Original-Sender: zhangfei.gao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , -------- Original Message -------- Subject: [PATCH] merge_config.sh: Add option to specify output dir Date: Fri, 30 Nov 2012 10:04:06 +0800 From: Zhangfei Gao To: John Stultz , Michal Marek , "linaro-dev@lists.linaro.org" CC: Zhangfei Gao Provide a -O option to specify dir to put generated .config Signed-off-by: Zhangfei Gao Tested-by: Jon Medhurst (Tixy) --- scripts/kconfig/merge_config.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) echo "Requested value: $REQUESTED_VAL" diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index 974d5cb..9ad5744 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -32,11 +32,13 @@ usage() { echo " -m only merge the fragments, do not execute the make command" echo " -n use allnoconfig instead of alldefconfig" echo " -r list redundant entries when merging fragments" + echo " -O dir to put generated output files" } MAKE=true ALLTARGET=alldefconfig WARNREDUN=false +OUTPUT=. while true; do case $1 in @@ -59,6 +61,16 @@ while true; do shift continue ;; + "-O") + if [ -d $2 ];then + OUTPUT=$2 + else + echo "output directory $2 does not exist" 1>&2 + exit 1 + fi + shift 2 + continue + ;; *) break ;; @@ -100,7 +112,7 @@ for MERGE_FILE in $MERGE_LIST ; do done if [ "$MAKE" = "false" ]; then - cp $TMP_FILE .config + cp $TMP_FILE $OUTPUT/.config echo "#" echo "# merged configuration written to .config (needs make)" echo "#" @@ -111,14 +123,14 @@ fi # Use the merged file as the starting point for: # alldefconfig: Fills in any missing symbols with Kconfig default # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set -make KCONFIG_ALLCONFIG=$TMP_FILE $ALLTARGET +make KCONFIG_ALLCONFIG=$TMP_FILE O=$OUTPUT $ALLTARGET # Check all specified config values took (might have missed-dependency issues) for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) - ACTUAL_VAL=$(grep -w -e "$CFG" .config) + ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config) if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then echo "Value requested for $CFG not in final .config"