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): ...@@ -50,21 +50,18 @@ def file_header(fo):
fo.write("""/* fo.write("""/*
* NB: This file is machine generated, DO NOT EDIT! * 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([ v = subprocess.check_output([
"git --git-dir=" + os.path.join(srcroot, ".git") + "git --git-dir=%s rev-parse HEAD 2>/dev/null || echo NOGIT" %
" show -s --pretty=format:%H" (os.path.join(srcroot, ".git"))
], shell=True, universal_newlines=True) ], shell=True, universal_newlines=True).strip()
v = v.strip()
else:
v = "NOGIT"
vcsfn = os.path.join(srcroot, "include", "vcs_version.h") 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