Commit 0ee75c5f authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Ben Walker
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 1e9c0496
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
#!/usr/bin/env python

import os
import re
import sys

comment = re.compile('^\s*#')
assign = re.compile('^\s*([a-zA-Z_]+)\s*(\?)?=\s*([^#]*)')

args = {}
args = os.environ.copy()
for arg in sys.argv:
    m = assign.match(arg)
    if m: