diff options
author | Wolfgang Denk <wd@denx.de> | 2010-10-16 23:50:51 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-10-18 22:08:22 +0200 |
commit | 2bad5df7274dd2802ba9526ea7218e9c09d3f89c (patch) | |
tree | b61afb1d857bc1e626bbb32be6817f41a056d803 /tools/scripts/define2mk.sed | |
parent | 14d0a02a168b36e87665b8d7f42fa3e88263d26d (diff) | |
download | u-boot-imx-2bad5df7274dd2802ba9526ea7218e9c09d3f89c.zip u-boot-imx-2bad5df7274dd2802ba9526ea7218e9c09d3f89c.tar.gz u-boot-imx-2bad5df7274dd2802ba9526ea7218e9c09d3f89c.tar.bz2 |
autoconfig.mk: avoid apostophes around hex values
When generating include/autoconfig.mk, hex numbers would be quoted.
This caused some false positives during automatic testing of the
builds, and is known to cause some real issues for some Blackfin
configurations. Don't use apostophes for decimal and hex numbers (nor
for octal numbers).
Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'tools/scripts/define2mk.sed')
-rw-r--r-- | tools/scripts/define2mk.sed | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/scripts/define2mk.sed b/tools/scripts/define2mk.sed index af40bfa..13e2845 100644 --- a/tools/scripts/define2mk.sed +++ b/tools/scripts/define2mk.sed @@ -18,8 +18,12 @@ s/="\(.*\)"$/=\1/; # Concatenate string values s/" *"//g; - # Wrap non-numeral values with quotes - s/=\(.*\?[^0-9].*\)$/=\"\1\"/; + # Assume strings as default - add quotes around values + s/=\(..*\)/="\1"/; + # but remove again from decimal numbers + s/="\([0-9][0-9]*\)"/=\1/; + # ... and from hex numbers + s/="\(0[Xx][0-9a-fA-F][0-9a-fA-F]*\)"/=\1/; # Change '1' and empty values to "y" (not perfect, but # supports conditional compilation in the makefiles s/=$/=y/; |