NO Bash required (windows compilation problem gone) - migrated to python

build flags format simplified
Binaries updated
This commit is contained in:
2019-10-17 03:13:39 +03:00
parent 0841c2b06f
commit 9cd0d924bb
46 changed files with 10216 additions and 8935 deletions

31
get_build_flags.py Normal file
View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
print(sys.argv[1:], file=sys.stderr)
#print("build_flags_"+sys.argv[1:][0])
try:
file = open("build-flags/build_flags_"+sys.argv[1:][0])
except IOError as e:
print(u'No build flags file ', file=sys.stderr)
else:
with file:
for line in file.readlines():
if not line.startswith('#'):
print (line)
file.close()
try:
file = open("custom-build-flags/build_flags_"+sys.argv[1:][0])
except IOError as e:
print(u'No custom build flags file ', file=sys.stderr)
else:
with file:
for line in file.readlines():
if not line.startswith('#'):
print (line)
file.close()
sys.stdout.write("-DPIO_SRC_REV=")
sys.stdout.flush()
os.system("git log --pretty=format:%h_%ad -1 --date=short")