From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 17 Oct 2010 01:57:41 +0200 Subject: [U-Boot] [PATCH v2 4/5] autoconfig.mk: avoid apostophes around hex values In-Reply-To: <1286790310-5865-1-git-send-email-wd@denx.de> References: <1286790310-5865-1-git-send-email-wd@denx.de> Message-ID: <1287273462-14872-5-git-send-email-wd@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When generating include/autoconfig.mk, hex numbers would be quoted. This appears to be not a real problem, but caused some false positives during automatic testing of the builds. Don't use apostophes for decimal and hex numbers (nor or octal numbers). Signed-off-by: Wolfgang Denk --- 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/; -- 1.7.2.3