Skip to contentSkip to conversation

merge_config.sh: Avoid creating unnessary source softlinks

PATCH In review John Stultz 3 participants 3 messages Apr 4, 2013 – Apr 10, 2013 Kconfig

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 merge_config.sh: Avoid creating unnessary source softlinks

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 <[email protected]>
Cc Viresh Kumar <[email protected]>
Cc Michal Marek <[email protected]>
Cc Bruce Ashfield <[email protected]>
Cc Darren Hart <[email protected]>
---
 scripts/kconfig/merge_config.sh |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
scripts/kconfig/merge_config.sh +9 -1
index 05274fc..81b0c61 100755
@@ -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)
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · John Stultz

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.

Quoted 8 lines
Cc Zhangfei Gao <[email protected]>
Cc Viresh Kumar <[email protected]>
Cc Michal Marek <[email protected]>
Cc Bruce Ashfield <[email protected]>
Cc Darren Hart <[email protected]>

Thanks John!

Quoted 29 lines
---
 scripts/kconfig/merge_config.sh |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
scripts/kconfig/merge_config.sh +9 -1
index 05274fc..81b0c61 100755
@@ -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)
Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
#2 lore raw
Quoted 23 lines · Darren Hart
Quoted 11 lines · John Stultz

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.

Quoted 8 lines
Cc Zhangfei Gao <[email protected]>
Cc Viresh Kumar <[email protected]>
Cc Michal Marek <[email protected]>
Cc Bruce Ashfield <[email protected]>
Cc Darren Hart <[email protected]>
Quoted 3 lines

Thanks John!

Added to kbuild.git#kconfig.

Michal