Default a define with no value to 1.

This commit is contained in:
Chris Johns
2013-02-11 14:22:02 +11:00
parent 2f72d35a79
commit 6fad89b9b0

View File

@@ -156,7 +156,10 @@ class buildset:
elif l[0] == '%': elif l[0] == '%':
if l.startswith('%define'): if l.startswith('%define'):
ls = l.split() ls = l.split()
if len(ls) > 2:
self.defaults[ls[1].strip()] = ('none', 'none', ls[2].strip()) self.defaults[ls[1].strip()] = ('none', 'none', ls[2].strip())
else:
self.defaults[ls[1].strip()] = ('none', 'none', '1')
elif l.startswith('%include'): elif l.startswith('%include'):
ls = l.split(' ') ls = l.split(' ')
configs += self.parse(ls[1].strip()) configs += self.parse(ls[1].strip())