Bug 1258618 - Allow to use bools as values given to add_old_configure_assignment draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 22 Mar 2016 13:47:37 +0900
changeset 343315 bb47ba6dcee7b21c643c2a5e39dcdd28540399ef
parent 343314 3b68ecbe4a329c916c5d570a769cf3c6b94d5e5a
child 343316 de7dc25ccad53b2aa95f2ce423b7985e2f0e8f87
push id13583
push userbmo:mh+mozilla@glandium.org
push dateTue, 22 Mar 2016 07:55:21 +0000
bugs1258618
milestone48.0a1
Bug 1258618 - Allow to use bools as values given to add_old_configure_assignment
build/moz.configure/init.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -128,18 +128,23 @@ def old_configure_assignments(help):
 def extra_old_configure_args(help):
     return []
 
 @template
 def add_old_configure_assignment(var, value):
     @depends(old_configure_assignments)
     @advanced
     def add_assignment(assignments):
-        from mozbuild.shellutil import quote
-        assignments.append('%s=%s' % (var, quote(value)))
+        if value is True:
+            assignments.append('%s=1' % var)
+        elif value is False:
+            assignments.append('%s=' % var)
+        else:
+            from mozbuild.shellutil import quote
+            assignments.append('%s=%s' % (var, quote(value)))
 
 @template
 def add_old_configure_arg(arg):
     @depends(extra_old_configure_args)
     def add_arg(args):
         args.append(arg)