[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)
|
menuconfig(Rtt_Root)
|
||||||
exit(0)
|
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
|
# add comstr option
|
||||||
AddOption('--verbose',
|
AddOption('--verbose',
|
||||||
dest='verbose',
|
dest='verbose',
|
||||||
|
|
|
@ -6,7 +6,7 @@ def mk_rtconfig(filename):
|
||||||
try:
|
try:
|
||||||
config = file(filename)
|
config = file(filename)
|
||||||
except:
|
except:
|
||||||
print 'open .config failed'
|
print('open config:%s failed' % filename)
|
||||||
return
|
return
|
||||||
|
|
||||||
rtconfig = file('rtconfig.h', 'w')
|
rtconfig = file('rtconfig.h', 'w')
|
||||||
|
|
Loading…
Reference in New Issue