[Tools] Add useconfig option for scons.
This commit is contained in:
parent
31b163c8fa
commit
bc6703d0be
|
@ -285,6 +285,16 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
|
|||
menuconfig(Rtt_Root)
|
||||
exit(0)
|
||||
|
||||
AddOption('--useconfig',
|
||||
dest = 'useconfig',
|
||||
type='string',
|
||||
help = 'make rtconfig.h from config file.')
|
||||
configfn = GetOption('useconfig')
|
||||
if configfn:
|
||||
from menuconfig import mk_rtconfig
|
||||
mk_rtconfig(configfn)
|
||||
exit(0)
|
||||
|
||||
# add comstr option
|
||||
AddOption('--verbose',
|
||||
dest='verbose',
|
||||
|
|
|
@ -6,7 +6,7 @@ def mk_rtconfig(filename):
|
|||
try:
|
||||
config = file(filename)
|
||||
except:
|
||||
print 'open .config failed'
|
||||
print('open config:%s failed' % filename)
|
||||
return
|
||||
|
||||
rtconfig = file('rtconfig.h', 'w')
|
||||
|
|
Loading…
Reference in New Issue