def Define(d, flavor):
 if (flavor == 'win'):
  d = d.replace('#', ('\\%03o' % ord('#')))
 return QuoteShellArgument(ninja_syntax.escape(('-D' + d)), flavor)

def Define ( d , flavor ) : if ( flavor == 'win' ) : d = d . replace ( '#' , ( '\\%03o' % ord ( '#' ) ) ) return QuoteShellArgument ( ninja_syntax . escape ( ( '-D' + d ) ) , flavor )
takes a preprocessor define and returns a -d parameter thats ninja- and shell-escaped .