]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Fix build for less common build directories names
authorStefan Weil <sw@weilnetz.de>
Thu, 13 Oct 2016 18:29:30 +0000 (20:29 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 28 Oct 2016 15:17:24 +0000 (18:17 +0300)
scripts/tracetool generates a C preprocessor macro from the name of the
build directory. Any characters which are possible in a directory name
but not allowed in a macro name must be substituted, otherwise builds
will fail.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
scripts/tracetool.py

index 629b2593c846f9559e845998f8f434d9dd383f92..fe9c9e904b0304195c9d7a1c4d734f1e97cb3ded 100755 (executable)
@@ -70,7 +70,7 @@ def make_group_name(filename):
 
     if dirname == "":
         return "common"
-    return re.sub(r"/|-", "_", dirname)
+    return re.sub(r"[^A-Za-z0-9]", "_", dirname)
 
 def main(args):
     global _SCRIPT