diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-08-06 17:37:04 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-08-06 17:37:04 -0700 |
commit | 9fb3d2759f920bb6714ec6471a5c932720c6903a (patch) | |
tree | 9119ddcfdaa0f46dde05bb5bba0ee44c336c12bc /attoconf/core.py | |
parent | 93215a82b4ebda6d322f75023cfea4cc7d4904d2 (diff) | |
download | attobuild-9fb3d2759f920bb6714ec6471a5c932720c6903a.tar.gz attobuild-9fb3d2759f920bb6714ec6471a5c932720c6903a.tar.bz2 attobuild-9fb3d2759f920bb6714ec6471a5c932720c6903a.tar.xz attobuild-9fb3d2759f920bb6714ec6471a5c932720c6903a.zip |
Write vars to makefile in order
Diffstat (limited to 'attoconf/core.py')
-rw-r--r-- | attoconf/core.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/attoconf/core.py b/attoconf/core.py index 0fb780a..7efd91c 100644 --- a/attoconf/core.py +++ b/attoconf/core.py @@ -44,6 +44,7 @@ class Project(object): 'aliases', 'options', 'help', + 'order', 'checks', ) def __init__(self, srcdir): @@ -53,6 +54,7 @@ class Project(object): self.aliases = {} self.options = {} self.help = Help() + self.order = [] self.checks = [] def add_help(self, text, hidden): @@ -106,8 +108,9 @@ class Project(object): init = type(init) self.options[name] = Option(init=init, type=type, var=var) if check is not None: + self.order.append(var) self.checks.append( - lambda bld: check(bld, **{help_var: bld.vars[var][0]}) ) + lambda bld: check(bld, **{help_var: bld.vars[var][0]})) if help_var is None: help_var = var |