[FL-2052] New build system based on scons (#1269)
This commit is contained in:
19
site_scons/fbt/util.py
Normal file
19
site_scons/fbt/util.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import SCons
|
||||
from SCons.Subst import quote_spaces
|
||||
|
||||
import re
|
||||
|
||||
|
||||
WINPATHSEP_RE = re.compile(r"\\([^\"'\\]|$)")
|
||||
|
||||
|
||||
def tempfile_arg_esc_func(arg):
|
||||
arg = quote_spaces(arg)
|
||||
if SCons.Platform.platform_default() != "win32":
|
||||
return arg
|
||||
# GCC requires double Windows slashes, let's use UNIX separator
|
||||
return WINPATHSEP_RE.sub(r"/\1", arg)
|
||||
|
||||
|
||||
def wrap_tempfile(env, command):
|
||||
env[command] = '${TEMPFILE("' + env[command] + '","$' + command + 'STR")}'
|
Reference in New Issue
Block a user