Skip to content

Commit bc6703d

Browse files
committed
[Tools] Add useconfig option for scons.
1 parent 31b163c commit bc6703d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

tools/building.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,16 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
285285
menuconfig(Rtt_Root)
286286
exit(0)
287287

288+
AddOption('--useconfig',
289+
dest = 'useconfig',
290+
type='string',
291+
help = 'make rtconfig.h from config file.')
292+
configfn = GetOption('useconfig')
293+
if configfn:
294+
from menuconfig import mk_rtconfig
295+
mk_rtconfig(configfn)
296+
exit(0)
297+
288298
# add comstr option
289299
AddOption('--verbose',
290300
dest='verbose',

tools/menuconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def mk_rtconfig(filename):
66
try:
77
config = file(filename)
88
except:
9-
print 'open .config failed'
9+
print('open config:%s failed' % filename)
1010
return
1111

1212
rtconfig = file('rtconfig.h', 'w')

0 commit comments

Comments
 (0)