Use the new opts define and add an undefine.

This commit is contained in:
Chris Johns 2013-03-12 18:30:15 +11:00
parent b4b4f3c9de
commit fa653c2ce2

View File

@ -214,11 +214,15 @@ class buildset:
elif ls[0][0] == '%':
if ls[0] == '%define':
if len(ls) > 2:
self.defaults[ls[1].strip()] = ('none',
'none',
self.opts.define(self.defaults,
ls[1].strip(),
' '.join([f.strip() for f in ls[2:]]))
else:
self.defaults[ls[1].strip()] = ('none', 'none', '1')
self.opts.define(self.defaults, ls[1].strip())
elif ls[0] == '%undefine':
if len(ls) > 2:
raise error.general('%undefine requires just the name')
self.opts.undefine(self.defaults, ls[1].strip())
elif ls[0] == '%include':
configs += self.parse(ls[1].strip())
else: