diff mbox

merge_config.sh: Avoid creating unnessary source softlinks

Message ID 1365102179-19176-1-git-send-email-john.stultz@linaro.org
State Accepted
Commit a45c7dfb942b6c198d5cd283f8dcee145241a017
Headers show

Commit Message

John Stultz April 4, 2013, 7:02 p.m. UTC
Viresh noticed when using merge_config.sh that a source softlink
was being created even when he didn't specify the -O option.

The problem arises due to the previous commit 409f117e2d6b
which added the -O option. Basically if -O is not specified,
we still pass '-O=.' to the make command, which then generates
a source softlink to ./

This patch adds an extra check so if there is no -O specified
to merge_config.sh, we don't pass one on to make.

Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Reported-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 scripts/kconfig/merge_config.sh |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 05274fc..81b0c61 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -120,10 +120,18 @@  if [ "$MAKE" = "false" ]; then
 	exit
 fi
 
+# If we have an output dir, setup the O= argument, otherwise leave
+# it blank, since O=. will create an unnecessary ./source softlink
+OUTPUT_ARG=""
+if [ "$OUTPUT" != "." ] ; then
+	OUTPUT_ARG="O=$OUTPUT"
+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 O=$OUTPUT $ALLTARGET
+make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
 
 
 # Check all specified config values took (might have missed-dependency issues)