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] == '%': elif ls[0][0] == '%':
if ls[0] == '%define': if ls[0] == '%define':
if len(ls) > 2: if len(ls) > 2:
self.defaults[ls[1].strip()] = ('none', self.opts.define(self.defaults,
'none', ls[1].strip(),
' '.join([f.strip() for f in ls[2:]])) ' '.join([f.strip() for f in ls[2:]]))
else: 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': elif ls[0] == '%include':
configs += self.parse(ls[1].strip()) configs += self.parse(ls[1].strip())
else: else: