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>
if dirname == "":
return "common"
- return re.sub(r"/|-", "_", dirname)
+ return re.sub(r"[^A-Za-z0-9]", "_", dirname)
def main(args):
global _SCRIPT