summaryrefslogtreecommitdiff
path: root/attoconf/core.py
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-08-06 17:37:04 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-08-06 17:37:04 -0700
commit9fb3d2759f920bb6714ec6471a5c932720c6903a (patch)
tree9119ddcfdaa0f46dde05bb5bba0ee44c336c12bc /attoconf/core.py
parent93215a82b4ebda6d322f75023cfea4cc7d4904d2 (diff)
downloadattobuild-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.py5
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