From 80cf1c22b629d524de18f20dcfd155d889ee5d2f Mon Sep 17 00:00:00 2001 From: Isamu Mogi Date: Sat, 11 May 2013 08:31:51 +0000 Subject: gbuild: Replace SHOWINCLUDES_PREFIX without regexp. With MSVC Japanese, SHOWINCLUDES_PREFIX includes regexp special charactor \x5b (left square bracket). In this case replacing SHOWINCLUDES_PREFIX with regexp fails. To fix it, this commit changes the script not to use regexp. Example value of $SHOWINCLUDES_PREFIX from MSVC Japanese: $ echo $SHOWINCLUDES_PREFIX | hexdump -C 83 81 83 82 3a 20 83 43 83 93 83 4e 83 8b 81 5b |....:.C...N...[| 83 68 20 83 74 83 40 83 43 83 8b 3a 20 20 43 3a |.h.t.@.C..: C:| 5c 54 65 6d 70 5c 73 74 64 69 6f 2e 68 0d 0a |\Temp\stdio.h..| Change-Id: Ic7d85fc3a93807de11155488e9d0368427375c78 Reviewed-on: https://gerrit.libreoffice.org/3579 Reviewed-by: Kohei Yoshida Tested-by: Kohei Yoshida --- solenv/gbuild/platform/filter-showIncludes.awk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'solenv/gbuild/platform') diff --git a/solenv/gbuild/platform/filter-showIncludes.awk b/solenv/gbuild/platform/filter-showIncludes.awk index 9d94f3b546bf..5d3fdcb91863 100755 --- a/solenv/gbuild/platform/filter-showIncludes.awk +++ b/solenv/gbuild/platform/filter-showIncludes.awk @@ -31,8 +31,6 @@ BEGIN { if (!showincludes_prefix) { showincludes_prefix = "Note: including file:" } - regex = "^ *" showincludes_prefix " *" - pattern = "/" regex "/" # to match especially drive letters in whitelist case insensitive IGNORECASE = 1 @@ -42,8 +40,10 @@ BEGIN { } { - if ($0 ~ regex) { - sub(regex, "") + sub(/^ */, "") + if (index($0, showincludes_prefix) == 1) { + $0 = substr($0, 1, length(showincludes_prefix)) + sub(/^ */, "") gsub(/\\/, "/") gsub(/ /, "\\ ") if ($0 ~ whitelist) { # filter out system headers -- cgit