diff --git a/makefile b/makefile index 613c02b..8825b5d 100644 --- a/makefile +++ b/makefile @@ -102,11 +102,11 @@ clean: build: mkdir build -config.h: - python tools/config.py +config.h: config config: python tools/config.py + git update-index --assume-unchanged config.h 2> /dev/null || true help: @echo "Valid targets are" diff --git a/tools/config.py b/tools/config.py index 1e153b7..81c5a3c 100755 --- a/tools/config.py +++ b/tools/config.py @@ -321,13 +321,10 @@ class OpenChronosApp(object): def save_config(self): - print "save" for key,field in self.fields.iteritems(): - print key, field if isinstance(field, (tuple, list)): for item in field: if hasattr(item, "get_state"): - print item.get_state() if item.get_state(): # found the set radio button DATA[key]["value"] = item.value @@ -348,7 +345,9 @@ class OpenChronosApp(object): fp.write(HEADER) for key,dat in DATA.iteritems(): if not "value" in dat: - continue + continue + if "type" in dat and dat["type"] == "info": + continue if DATA[key].get("ifndef", False): fp.write("#ifndef %s\n" %key) if isinstance(dat["value"], bool):