summaryrefslogtreecommitdiff
path: root/methods.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-03-25 11:10:34 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-03-25 11:22:19 +0100
commit13a9bfbca733821f773ca7ffd990ce962c728924 (patch)
tree206d5c959b4e441f3c651eb1065b7292607b6da0 /methods.py
parent5fede4a81c67961c6fb2309b9b0ceb753d143566 (diff)
Style: Harmonize header guards to style guide [Core]
Diffstat (limited to 'methods.py')
-rw-r--r--methods.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/methods.py b/methods.py
index 56c495468d..80c89d8c16 100644
--- a/methods.py
+++ b/methods.py
@@ -62,6 +62,9 @@ def update_version(module_version_string=""):
# NOTE: It is safe to generate this file here, since this is still executed serially
f = open("core/version_generated.gen.h", "w")
+ f.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
+ f.write("#ifndef VERSION_GENERATED_GEN_H\n")
+ f.write("#define VERSION_GENERATED_GEN_H\n")
f.write("#define VERSION_SHORT_NAME \"" + str(version.short_name) + "\"\n")
f.write("#define VERSION_NAME \"" + str(version.name) + "\"\n")
f.write("#define VERSION_MAJOR " + str(version.major) + "\n")
@@ -72,10 +75,14 @@ def update_version(module_version_string=""):
f.write("#define VERSION_MODULE_CONFIG \"" + str(version.module_config) + module_version_string + "\"\n")
f.write("#define VERSION_YEAR " + str(version.year) + "\n")
f.write("#define VERSION_WEBSITE \"" + str(version.website) + "\"\n")
+ f.write("#endif // VERSION_GENERATED_GEN_H\n")
f.close()
# NOTE: It is safe to generate this file here, since this is still executed serially
fhash = open("core/version_hash.gen.h", "w")
+ fhash.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
+ fhash.write("#ifndef VERSION_HASH_GEN_H\n")
+ fhash.write("#define VERSION_HASH_GEN_H\n")
githash = ""
gitfolder = ".git"
@@ -93,7 +100,8 @@ def update_version(module_version_string=""):
else:
githash = head
- fhash.write("#define VERSION_HASH \"" + githash + "\"")
+ fhash.write("#define VERSION_HASH \"" + githash + "\"\n")
+ fhash.write("#endif // VERSION_HASH_GEN_H\n")
fhash.close()