Browse Source

Fix build for less common build directories names

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>
Stefan Weil 8 years ago
parent
commit
630b210b9a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/tracetool.py

+ 1 - 1
scripts/tracetool.py

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