diff options
-rwxr-xr-x | bootstrap.py | 13 | ||||
-rwxr-xr-x | configure.py | 12 |
2 files changed, 16 insertions, 9 deletions
diff --git a/bootstrap.py b/bootstrap.py index 66ec85b..026396b 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -34,10 +34,12 @@ parser.add_option('--verbose', action='store_true', parser.add_option('--x64', action='store_true', help='force 64-bit build (Windows)',) parser.add_option('--platform', - help='target platform (' + '/'.join(platform_helper.platforms()) + ')', + help='target platform (' + + '/'.join(platform_helper.platforms()) + ')', choices=platform_helper.platforms()) parser.add_option('--force-pselect', action='store_true', - help="ppoll() is used by default on Linux, OpenBSD and Bitrig, but older versions might need to use pselect instead",) + help='ppoll() is used by default where available, ' + 'but some platforms might need to use pselect instead',) (options, conf_args) = parser.parse_args() @@ -109,7 +111,8 @@ else: cflags.append('-D_WIN32_WINNT=0x0501') if options.x64: cflags.append('-m64') -if (platform.is_linux() or platform.is_openbsd() or platform.is_bitrig()) and not options.force_pselect: +if (platform.is_linux() or platform.is_openbsd() or platform.is_bitrig()) and \ + not options.force_pselect: cflags.append('-DUSE_PPOLL') if options.force_pselect: conf_args.append("--force-pselect") @@ -153,8 +156,8 @@ if platform.is_windows(): Done! Note: to work around Windows file locking, where you can't rebuild an -in-use binary, to run ninja after making any changes to build ninja itself -you should run ninja.bootstrap instead.""") +in-use binary, to run ninja after making any changes to build ninja +itself you should run ninja.bootstrap instead.""") else: print('Building ninja using itself...') run([sys.executable, 'configure.py'] + conf_args) diff --git a/configure.py b/configure.py index 431b03e..cceb0f7 100755 --- a/configure.py +++ b/configure.py @@ -32,10 +32,12 @@ import ninja_syntax parser = OptionParser() profilers = ['gmon', 'pprof'] parser.add_option('--platform', - help='target platform (' + '/'.join(platform_helper.platforms()) + ')', + help='target platform (' + + '/'.join(platform_helper.platforms()) + ')', choices=platform_helper.platforms()) parser.add_option('--host', - help='host platform (' + '/'.join(platform_helper.platforms()) + ')', + help='host platform (' + + '/'.join(platform_helper.platforms()) + ')', choices=platform_helper.platforms()) parser.add_option('--debug', action='store_true', help='enable debugging extras',) @@ -48,7 +50,8 @@ parser.add_option('--with-python', metavar='EXE', help='use EXE as the Python interpreter', default=os.path.basename(sys.executable)) parser.add_option('--force-pselect', action='store_true', - help="ppoll() is used by default where available, but some platforms may need to use pselect instead",) + help='ppoll() is used by default where available, ' + 'but some platforms may need to use pselect instead',) (options, args) = parser.parse_args() if args: print('ERROR: extra unparsed command-line arguments:', args) @@ -167,7 +170,8 @@ else: cflags.append('-fno-omit-frame-pointer') libs.extend(['-Wl,--no-as-needed', '-lprofiler']) -if (platform.is_linux() or platform.is_openbsd() or platform.is_bitrig()) and not options.force_pselect: +if (platform.is_linux() or platform.is_openbsd() or platform.is_bitrig()) and \ + not options.force_pselect: cflags.append('-DUSE_PPOLL') def shell_escape(str): |