Bug 1258618 - Use True instead of '1' for add_old_configure_assignment. r=nalexander
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 22 Mar 2016 14:12:29 +0900
changeset 343653 43d66eea833b04be65a145051c708dd5c6587a80
parent 343652 34d422497ef9a8d95435c63778652b4d135769bf
child 343654 35140f3dd988a7a7138943d7d594b87c7c0c8cc9
child 343678 b68566e511b75a9a5b8a1f1cb462bd5109219c2e
push id13661
push userbmo:mh+mozilla@glandium.org
push dateWed, 23 Mar 2016 00:49:41 +0000
reviewersnalexander
bugs1258618
milestone48.0a1
Bug 1258618 - Use True instead of '1' for add_old_configure_assignment. r=nalexander
build/moz.configure/init.configure
js/moz.configure
moz.configure
toolkit/moz.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -621,22 +621,22 @@ def milestone(build_env):
 
     set_config('GRE_MILESTONE', milestone)
 
     is_nightly = is_release = False
 
     if 'a1' in milestone:
         set_config('NIGHTLY_BUILD', True)
         set_define('NIGHTLY_BUILD', True)
-        add_old_configure_assignment('NIGHTLY_BUILD', '1')
+        add_old_configure_assignment('NIGHTLY_BUILD', True)
         is_nightly = True
     elif 'a' not in milestone:
         set_config('RELEASE_BUILD', True)
         set_define('RELEASE_BUILD', True)
-        add_old_configure_assignment('RELEASE_BUILD', '1')
+        add_old_configure_assignment('RELEASE_BUILD', True)
         is_release = True
 
     return namespace(version=milestone,
                      is_nightly=is_nightly,
                      is_release=is_release)
 
 # This is temporary until js/src/configure and configure are merged.
 # Use instead of option() in js/moz.configure
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -17,17 +17,17 @@ def building_js(build_project, help):
 # will still need to be set depending on building_js above.
 option(env='JS_STANDALONE', default=building_js,
        help='Reserved for internal use')
 
 @depends('JS_STANDALONE')
 def js_standalone(value):
     if value:
         set_config('JS_STANDALONE', True)
-        add_old_configure_assignment('JS_STANDALONE', '1')
+        add_old_configure_assignment('JS_STANDALONE', True)
 
 
 js_option('--disable-js-shell', default=building_js,
        help='Do not build the JS shell')
 
 @depends('--disable-js-shell')
 def js_shell(value):
     if not value:
@@ -54,17 +54,17 @@ js_option('--disable-export-js', default
           help='Do not mark JS symbols as DLL exported/visible')
 
 @depends('--disable-shared-js', '--disable-export-js')
 def static_js(shared_js, export_js):
     if shared_js:
         if not export_js:
             error('Must export JS symbols when building a shared library.')
         set_config('JS_SHARED_LIBRARY', True)
-        add_old_configure_assignment('JS_SHARED_LIBRARY', '1')
+        add_old_configure_assignment('JS_SHARED_LIBRARY', True)
     else:
         if export_js:
             set_define('STATIC_EXPORTABLE_JS_API', True)
         else:
             set_define('STATIC_JS_API', True)
         set_define('MOZ_STATIC_JS', True)
 
 
@@ -99,17 +99,17 @@ js_option('--enable-instruments', env='M
 @depends('--enable-instruments', target)
 def instruments(value, target):
     if value and target.os != 'OSX':
         error('--enable-instruments cannot be used when targeting %s'
               % target.os)
     if value:
         set_config('MOZ_INSTRUMENTS', True)
         set_define('MOZ_INSTRUMENTS', True)
-        add_old_configure_assignment('MOZ_INSTRUMENTS', '1')
+        add_old_configure_assignment('MOZ_INSTRUMENTS', True)
         imply_option('--enable-profiling', reason='--enable-instruments')
 
 
 js_option('--enable-callgrind', env='MOZ_CALLGRIND',
           help='Enable callgrind profiling')
 
 @depends('--enable-callgrind')
 def callgrind(value):
@@ -122,17 +122,17 @@ js_option('--enable-profiling', env='MOZ
           help='Set compile flags necessary for using sampling profilers '
                '(e.g. shark, perf)')
 
 @depends('--enable-profiling', target)
 def profiling(value, target):
     if value:
         set_config('MOZ_PROFILING', True)
         set_define('MOZ_PROFILING', True)
-        add_old_configure_assignment('MOZ_PROFILING', '1')
+        add_old_configure_assignment('MOZ_PROFILING', True)
 
         if target.kernel == 'WINNT' or (target.kernel == 'Linux' and
                                         target.os == 'GNU'):
             imply_option('--enable-vtune', reason='--enable-profiling')
 
 
 js_option('--enable-vtune', env='MOZ_VTUNE', help='Enable vtune profiling')
 
--- a/moz.configure
+++ b/moz.configure
@@ -37,17 +37,17 @@ def artifact_builds(value):
 
 option('--disable-compile-environment',
        help='Disable compiler/library checks')
 
 @depends('--disable-compile-environment')
 def compile_environment(value):
     if value:
         set_config('COMPILE_ENVIRONMENT', True)
-        add_old_configure_assignment('COMPILE_ENVIRONMENT', '1')
+        add_old_configure_assignment('COMPILE_ENVIRONMENT', True)
     return bool(value)
 
 
 @depends('--help')
 @advanced
 def build_backends_choices(help):
     from mozbuild.backend import backends
     return tuple(backends)
@@ -158,17 +158,17 @@ def yasm_asflags(yasm, target):
                 asflags = '-f elf32'
             elif target.cpu == 'x86_64':
                 asflags = '-f elf64'
         if asflags:
             asflags += ' -rnasm -pnasm'
             set_config('YASM_ASFLAGS', asflags)
             set_config('HAVE_YASM', True)
             # Until the YASM variable is not necessary in old-configure.
-            add_old_configure_assignment('YASM', '1')
+            add_old_configure_assignment('YASM', True)
         return asflags
 
 # Miscellaneous programs
 # ==============================================================
 check_prog('DOXYGEN', ('doxygen',), allow_missing=True)
 check_prog('TAR', ('gnutar', 'gtar', 'tar'))
 check_prog('UNZIP', ('unzip',))
 check_prog('XARGS', ('xargs',))
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -51,17 +51,17 @@ option('--enable-dmd', env='MOZ_DMD',
        help='Enable Dark Matter Detector (heap profiler). '
             'Also enables jemalloc, replace-malloc and profiling')
 
 @depends('--enable-dmd')
 def dmd(value):
     if value:
         set_config('MOZ_DMD', True)
         set_define('MOZ_DMD', True)
-        add_old_configure_assignment('MOZ_DMD', '1')
+        add_old_configure_assignment('MOZ_DMD', True)
         imply_option('--enable-profiling')
 
 
 # Javascript engine
 # ==============================================================
 include('../js/moz.configure')
 
 
@@ -156,17 +156,17 @@ def x11(value, toolkit):
         error('--with-x is only valid with --enable-default-toolkit={%s}'
               % ','.join(x11_toolkits))
 
     if value and toolkit in x11_toolkits:
         set_config('MOZ_ENABLE_XREMOTE', True)
         set_define('MOZ_ENABLE_XREMOTE', True)
         set_config('MOZ_X11', True)
         set_define('MOZ_X11', True)
-        add_old_configure_assignment('MOZ_X11', '1')
+        add_old_configure_assignment('MOZ_X11', True)
 
     return value and toolkit in x11_toolkits
 
 
 # GL Provider
 # ==============================================================
 option('--with-gl-provider', nargs=1, help='Set GL provider backend type')
 
@@ -212,27 +212,27 @@ def instrument_event_loop(value, toolkit
 # ==============================================================
 option(env='USE_FC_FREETYPE',
        help='Force-enable the use of fontconfig freetype')
 
 @depends('USE_FC_FREETYPE', toolkit)
 def fc_freetype(value, toolkit):
     if value or (toolkit in ('gtk2', 'gtk3', 'qt') and
                  value.origin == 'default'):
-        add_old_configure_assignment('USE_FC_FREETYPE', '1')
+        add_old_configure_assignment('USE_FC_FREETYPE', True)
 
 
 # Apple platform decoder support
 # ==============================================================
 @depends(toolkit)
 def applemedia(toolkit):
     if toolkit in ('cocoa', 'uikit'):
         set_config('MOZ_APPLEMEDIA', True)
         set_define('MOZ_APPLEMEDIA', True)
-        add_old_configure_assignment('MOZ_APPLEMEDIA', '1')
+        add_old_configure_assignment('MOZ_APPLEMEDIA', True)
         return True
     return False
 
 
 # Windows Media Foundation support
 # ==============================================================
 option('--disable-wmf',
        help='Disable support for Windows Media Foundation')
@@ -280,17 +280,17 @@ option('--disable-fmp4', env='MOZ_FMP4',
 def fmp4(value, target, wmf, applemedia):
     enabled = bool(value)
     if value.origin == 'default':
         # target.os == 'Android' includes all B2G versions
         enabled = wmf or applemedia or target.os == 'Android'
     if enabled:
         set_config('MOZ_FMP4', True)
         set_define('MOZ_FMP4', True)
-        add_old_configure_assignment('MOZ_FMP4', '1')
+        add_old_configure_assignment('MOZ_FMP4', True)
     return enabled
 
 
 # EME Support
 # ==============================================================
 option('--enable-eme', nargs='*', choices=('adobe',),
        help='Enable support for Encrypted Media Extensions')