parameters: (source, target, env, for_signature)
return_statement: return "-Wl,-current_version,%s" % version_string
docstring: A generator function to create the -Wl,-current_version flag if needed.
      If env['APPLELINK_NO_CURRENT_VERSION'] contains a true value no flag will be generated
      Otherwise if APPLELINK_CURRENT_VERSION is not specified, env['SHLIBVERSION']
      will be used.
  
      :param source:
      :param target:
      :param env:
      :param for_signature:
      :return: A string providing the flag to specify the current_version of the shared library
docstring_summary: A generator function to create the -Wl,-current_version flag if needed.
      If env['APPLELINK_NO_CURRENT_VERSION'] contains a true value no flag will be generated
      Otherwise if APPLELINK_CURRENT_VERSION is not specified, env['SHLIBVERSION']
      will be used.
docstring_tokens: A generator function to create the - Wl - current_version flag if needed . If env [ APPLELINK_NO_CURRENT_VERSION ] contains a true value no flag will be generated Otherwise if APPLELINK_CURRENT_VERSION is not specified env [ SHLIBVERSION ] will be used .
function: def _applelib_currentVersionFromSoVersion(source, target, env, for_signature):
      """
      A generator function to create the -Wl,-current_version flag if needed.
      If env['APPLELINK_NO_CURRENT_VERSION'] contains a true value no flag will be generated
      Otherwise if APPLELINK_CURRENT_VERSION is not specified, env['SHLIBVERSION']
      will be used.
  
      :param source:
      :param target:
      :param env:
      :param for_signature:
      :return: A string providing the flag to specify the current_version of the shared library
      """
      if env.get('APPLELINK_NO_CURRENT_VERSION', False):
          return ""
      elif env.get('APPLELINK_CURRENT_VERSION', False):
          version_string = env['APPLELINK_CURRENT_VERSION']
      elif env.get('SHLIBVERSION', False):
          version_string = env['SHLIBVERSION']
      else:
          return ""
  
      version_string = ".".join(version_string.split('.')[:3])
  
      valid, reason = _applelib_check_valid_version(version_string)
      if not valid:
          raise AppleLinkInvalidCurrentVersionException(reason)
  
      return "-Wl,-current_version,%s" % version_string
function_tokens: def _applelib_currentVersionFromSoVersion ( source , target , env , for_signature ) : if env . get ( 'APPLELINK_NO_CURRENT_VERSION' , False ) : return "" elif env . get ( 'APPLELINK_CURRENT_VERSION' , False ) : version_string = env [ 'APPLELINK_CURRENT_VERSION' ] elif env . get ( 'SHLIBVERSION' , False ) : version_string = env [ 'SHLIBVERSION' ] else : return "" version_string = "." . join ( version_string . split ( '.' ) [ : 3 ] ) valid , reason = _applelib_check_valid_version ( version_string ) if not valid : raise AppleLinkInvalidCurrentVersionException ( reason ) return "-Wl,-current_version,%s" % version_string