Update C file generator script
This commit is contained in:
parent
ad3de6e6b7
commit
aeffb9df99
@ -6,7 +6,7 @@ import pathlib
|
|||||||
|
|
||||||
license_header = """/* Reflow Oven Controller
|
license_header = """/* Reflow Oven Controller
|
||||||
*
|
*
|
||||||
* Copyright (C) 2020 Mario Hüttel <mario.huettel@gmx.net>
|
* Copyright (C) 2022 Mario Hüttel <mario.huettel@gmx.net>
|
||||||
*
|
*
|
||||||
* This file is part of the Reflow Oven Controller Project.
|
* This file is part of the Reflow Oven Controller Project.
|
||||||
*
|
*
|
||||||
@ -37,7 +37,7 @@ cpath = os.path.join(project_dir, sys.argv[1]+'.c')
|
|||||||
hfile = sys.argv[1]+'.h'
|
hfile = sys.argv[1]+'.h'
|
||||||
hpath = os.path.join(module_include_dir, hfile)
|
hpath = os.path.join(module_include_dir, hfile)
|
||||||
|
|
||||||
h_define = '__'+hfile.replace('.', '_').replace('-', '_').replace('/', '_').upper()+'__'
|
h_define = '_'+hfile.replace('.', '_').replace('-', '_').replace('/', '_').upper()+'_'
|
||||||
|
|
||||||
if os.path.exists(cpath) or os.path.exists(hpath):
|
if os.path.exists(cpath) or os.path.exists(hpath):
|
||||||
print("File already exists! Abort!")
|
print("File already exists! Abort!")
|
||||||
|
Loading…
Reference in New Issue
Block a user