Skip to content

Commit 2bad5df

Browse files
committed
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>
1 parent 14d0a02 commit 2bad5df

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/scripts/define2mk.sed

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@
1818
s/="\(.*\)"$/=\1/;
1919
# Concatenate string values
2020
s/" *"//g;
21-
# Wrap non-numeral values with quotes
22-
s/=\(.*\?[^0-9].*\)$/=\"\1\"/;
21+
# Assume strings as default - add quotes around values
22+
s/=\(..*\)/="\1"/;
23+
# but remove again from decimal numbers
24+
s/="\([0-9][0-9]*\)"/=\1/;
25+
# ... and from hex numbers
26+
s/="\(0[Xx][0-9a-fA-F][0-9a-fA-F]*\)"/=\1/;
2327
# Change '1' and empty values to "y" (not perfect, but
2428
# supports conditional compilation in the makefiles
2529
s/=$/=y/;

0 commit comments

Comments
 (0)