refactor(lv_conf_internal): simplify the uppercase conversation added in aba10b0
Reaeted to #1989
This commit is contained in:
@@ -93,14 +93,13 @@ for i in fin.read().splitlines():
|
||||
|
||||
if r:
|
||||
line = re.sub('\(.*?\)', '', r[1], 1) #remove parentheses from macros
|
||||
line_upper = line.upper();
|
||||
dr = re.sub('.*# *define', '', i, 1)
|
||||
d = "# define " + dr
|
||||
|
||||
fout.write(
|
||||
f'#ifndef {line}\n'
|
||||
f'# ifdef CONFIG_{line_upper}\n'
|
||||
f'# define {line} CONFIG_{line_upper}\n'
|
||||
f'# ifdef CONFIG_{line.upper()}\n'
|
||||
f'# define {line} CONFIG_{line.upper()}\n'
|
||||
f'# else\n'
|
||||
f'{d}\n'
|
||||
f'# endif\n'
|
||||
|
||||
Reference in New Issue
Block a user