From: Martin Kelly <martin@surround.io>
To: linux-kbuild@vger.kernel.org, yann.morin.1998@free.fr
Cc: linux-kernel@vger.kernel.org, Martin Kelly <martin@surround.io>
Subject: [PATCH] kconfig/merge_config.sh: add -C to choose make dir
Date: Fri, 13 May 2016 17:36:20 -0700 [thread overview]
Message-ID: <1463186180-31967-1-git-send-email-martin@surround.io> (raw)
This is useful for running the script from somewhere besides the root of
the source tree.
Signed-off-by: Martin Kelly <martin@surround.io>
---
scripts/kconfig/merge_config.sh | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 67d1314..36b545d 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -32,6 +32,7 @@ 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 " -C dir in which to run make"
echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead."
}
@@ -61,6 +62,16 @@ while true; do
shift
continue
;;
+ "-C")
+ if [ -d $2 ];then
+ MAKEDIR=$(echo $2 | sed 's/\/*$//')
+ else
+ echo "make directory $2 does not exist" 1>&2
+ exit 1
+ fi
+ shift 2
+ continue
+ ;;
"-O")
if [ -d $2 ];then
OUTPUT=$(echo $2 | sed 's/\/*$//')
@@ -151,7 +162,7 @@ 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 $OUTPUT_ARG $ALLTARGET
+make -C "$MAKEDIR" KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
# Check all specified config values took (might have missed-dependency issues)
--
2.1.4
reply other threads:[~2016-05-14 0:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463186180-31967-1-git-send-email-martin@surround.io \
--to=martin@surround.io \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®