projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ns16550: change to allow 32 bit access to registers
[platform/kernel/u-boot.git]
/
tools
/
scripts
/
define2mk.sed
diff --git
a/tools/scripts/define2mk.sed
b/tools/scripts/define2mk.sed
index
6464627
..
13e2845
100644
(file)
--- a/
tools/scripts/define2mk.sed
+++ b/
tools/scripts/define2mk.sed
@@
-7,19
+7,23
@@
#
# Only process values prefixed with #define CONFIG_
#
# Only process values prefixed with #define CONFIG_
-/^#define CONFIG_[A-Za-z0-9_]
\+
/ {
+/^#define CONFIG_[A-Za-z0-9_]
[A-Za-z0-9_]*
/ {
# Strip the #define prefix
s/#define *//;
# Change to form CONFIG_*=VALUE
# Strip the #define prefix
s/#define *//;
# Change to form CONFIG_*=VALUE
- s/
\+
/=/;
+ s/
*
/=/;
# Drop trailing spaces
s/ *$//;
# drop quotes around string values
s/="\(.*\)"$/=\1/;
# Concatenate string values
s/" *"//g;
# Drop trailing spaces
s/ *$//;
# drop quotes around string values
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/;
# Change '1' and empty values to "y" (not perfect, but
# supports conditional compilation in the makefiles
s/=$/=y/;