genconfig: pick up defaults from the environment
This matches the behavior of Make and ensures that we rebuild correctly when the configuration is only modified in the environment. Change-Id: Iaf63c488b7c817d6c74a89da2d1de8e4c01be045 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
1e9c049638
commit
0ee75c5fc4
@ -1,12 +1,13 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
comment = re.compile('^\s*#')
|
comment = re.compile('^\s*#')
|
||||||
assign = re.compile('^\s*([a-zA-Z_]+)\s*(\?)?=\s*([^#]*)')
|
assign = re.compile('^\s*([a-zA-Z_]+)\s*(\?)?=\s*([^#]*)')
|
||||||
|
|
||||||
args = {}
|
args = os.environ.copy()
|
||||||
for arg in sys.argv:
|
for arg in sys.argv:
|
||||||
m = assign.match(arg)
|
m = assign.match(arg)
|
||||||
if m:
|
if m:
|
||||||
|
Loading…
Reference in New Issue
Block a user