Commit 126841f6 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Simplify include/generate.py

Closes #2598
parent 9b7aa043
......@@ -50,21 +50,18 @@ def file_header(fo):
fo.write("""/*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run lib/libvcc/generate.py instead.
* Edit and run include/generate.py instead.
*/
""")
#######################################################################
if os.path.isdir(os.path.join(srcroot, ".git")):
v = subprocess.check_output([
"git --git-dir=" + os.path.join(srcroot, ".git") +
" show -s --pretty=format:%H"
], shell=True, universal_newlines=True)
v = v.strip()
else:
v = "NOGIT"
v = subprocess.check_output([
"git --git-dir=%s rev-parse HEAD 2>/dev/null || echo NOGIT" %
(os.path.join(srcroot, ".git"))
], shell=True, universal_newlines=True).strip()
vcsfn = os.path.join(srcroot, "include", "vcs_version.h")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment