parameters: (conf)
docstring: Make sure optional xcode project command(s) are injected into the configuration pipeline as needed
docstring_summary: Make sure optional xcode project command(s) are injected into the configuration pipeline as needed
docstring_tokens: Make sure optional xcode project command ( s ) are injected into the configuration pipeline as needed
function: def inject_xcode_commands(conf):
      """
      Make sure optional xcode project command(s) are injected into the configuration pipeline as needed
      """
      if not isinstance(conf, ConfigurationContext):
          return
      if not Utils.unversioned_sys_platform() == 'darwin':
          return
  
      def _add_optioned_command(option, command):
          if conf.is_option_true(option):
              # Workflow improvement: for all builds generate projects after the build
              # except when using the default build target 'utilities' then do it before
              if 'build' in Options.commands:
                  build_cmd_idx = Options.commands.index('build')
                  Options.commands.insert(build_cmd_idx, command)
              else:
                  Options.commands.append(command)
  
      # Insert the optional xcode project generation commands in the configure pipeline
      _add_optioned_command('generate_ios_projects_automatically', 'xcode_ios')
  
      _add_optioned_command('generate_appletv_projects_automatically', 'xcode_appletv')
  
      _add_optioned_command('generate_mac_projects_automatically', 'xcode_mac')
function_tokens: def inject_xcode_commands ( conf ) : if not isinstance ( conf , ConfigurationContext ) : return if not Utils . unversioned_sys_platform ( ) == 'darwin' : return def _add_optioned_command ( option , command ) : if conf . is_option_true ( option ) : # Workflow improvement: for all builds generate projects after the build # except when using the default build target 'utilities' then do it before if 'build' in Options . commands : build_cmd_idx = Options . commands . index ( 'build' ) Options . commands . insert ( build_cmd_idx , command ) else : Options . commands . append ( command ) # Insert the optional xcode project generation commands in the configure pipeline _add_optioned_command ( 'generate_ios_projects_automatically' , 'xcode_ios' ) _add_optioned_command ( 'generate_appletv_projects_automatically' , 'xcode_appletv' ) _add_optioned_command ( 'generate_mac_projects_automatically' , 'xcode_mac' )