MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / Preprocessing

Function Preprocessing

tools/building.py:454–470  ·  view source on GitHub ↗
(input, suffix, output = None, CPPPATH = None)

Source from the content-addressed store, hash-verified

452 print('AddDepend arguements are illegal!')
453
454def Preprocessing(input, suffix, output = None, CPPPATH = None):
455 if hasattr(rtconfig, "CPP") and hasattr(rtconfig, "CPPFLAGS"):
456 if output == None:
457 import re
458 output = re.sub(r'[\.]+.*', suffix, input)
459 inc = ' '
460 cpppath = CPPPATH
461 for cpppath_item in cpppath:
462 inc += ' -I' + cpppath_item
463 CPP = rtconfig.EXEC_PATH + '/' + rtconfig.CPP
464 if not os.path.exists(CPP):
465 CPP = rtconfig.CPP
466 CPP += rtconfig.CPPFLAGS
467 path = GetCurrentDir() + '/'
468 os.system(CPP + inc + ' ' + path + input + ' -o ' + path + output)
469 else:
470 print('CPP tool or CPPFLAGS is undefined in rtconfig!')
471
472def MergeGroup(src_group, group):
473 src_group['src'] = src_group['src'] + group['src']

Callers 1

dts_to_dtbFunction · 0.85

Calls 1

GetCurrentDirFunction · 0.70

Tested by

no test coverage detected