summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2017-01-31 13:22:25 +0000
committerBernard Xiong <[email protected]>2017-01-31 13:22:25 +0000
commit033d254c4da3b074acf6160a9d02e790a8fa9449 (patch)
treef9b230e6a618a64e068d2c645490160102927b76 /tools
parenta1e5a3b3091ead710e19f358fc83bfa9de9cc5f9 (diff)
[tools] rename KConfig menu name
Diffstat (limited to 'tools')
-rw-r--r--tools/mkrtconfig.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/tools/mkrtconfig.py b/tools/mkrtconfig.py
deleted file mode 100644
index 31d30ff265..0000000000
--- a/tools/mkrtconfig.py
+++ /dev/null
@@ -1,50 +0,0 @@
-import os
-
-# make rtconfig.h from .config
-
-def mk_rtconfig(filename):
- try:
- config = file(filename)
- except:
- print 'open .config failed'
- return
-
- rtconfig = file('rtconfig.h', 'w')
- rtconfig.write('#ifndef RT_CONFIG_H__\n')
- rtconfig.write('#define RT_CONFIG_H__\n\n')
-
- empty_line = 1
-
- for line in config:
- line = line.lstrip(' ').replace('\n', '').replace('\r', '')
-
- if len(line) == 0: continue
-
- if line[0] == '#':
- if len(line) == 1:
- if empty_line:
- continue
-
- rtconfig.write('\n')
- empty_line = 1
- continue
-
- rtconfig.write('/*%s */\n' % line[1:])
- empty_line = 0
- else:
- empty_line = 0
- setting = line.split('=')
- if len(setting) >= 2:
- if setting[0].startswith('CONFIG_'):
- setting[0] = setting[0][7:]
-
- if setting[1] == 'y':
- rtconfig.write('#define %s\n' % setting[0])
- else:
- rtconfig.write('#define %s %s\n' % (setting[0], setting[1]))
-
- rtconfig.write('#endif\n')
- rtconfig.close()
-
-if __name__ == "__main__":
- mk_rtconfig('.config')