Commit cd51878e authored by Masahiro Yamada's avatar Masahiro Yamada

tools: fix define2mk.sed to not add quotes around negative integers

The sed script, tools/scripts/define2mk.sed, converts config defines
from C headers into include/ for the use in Makefiles.

I found the tool adds quotes around negative integer values.

For example, at the point of the v2016.07-rc1 tag,
include/configs/microblaze-generic.h defines
  #define CONFIG_BOOTDELAY         -1     /* -1 disables auto-boot */

Because it is an integer option, it should be converted to:

But, the script actually converts it to:

This is a fatal problem for the tools/ because it parses
include/ for the config defines from the board headers.
CONFIG_BOOTDELAY="-1" is considered as a string type option and it
is dropped due to the type mismatch from the entry in Kconfig.

This commit fixes the script so that the tools/ can
correctly convert integer options with a negative value.
Signed-off-by: default avatarMasahiro Yamada <>
parent 6b96c1a1
......@@ -22,6 +22,8 @@
# but remove again from decimal numbers
# ... and from negative decimal numbers
# ... and from hex numbers
# ... and from configs defined from other configs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment