lv_conf_checker.py handle prerocessor indentations (e.g. # define ...)

This commit is contained in:
Gabor Kiss-Vamosi
2019-01-29 10:28:48 +01:00
parent 92be58d1d8
commit dd41f411e6
2 changed files with 31 additions and 30 deletions

View File

@@ -36,7 +36,8 @@ for i in inlines:
if('/*--END OF LV_CONF_H--*/' in i): break
if(re.search('^ *# *define .*$', i)):
new = re.sub(' +', ' ', i) #Remove extra white spaces
new = re.sub('^ *# *define', '#define ', i)
new = re.sub(' +', ' ', new) #Remove extra white spaces
splitted = new.split(' ')
fout.write('#ifndef ' + splitted[1] + '\n')
fout.write(i + '\n')