def check_sdk_root():
    'Check validity of NACL_SDK_ROOT.'
    root = get_sdk_root()
    if (not os.path.isdir(root)):
        raise error.Error(('$NACL_SDK_ROOT does not exist: %s' % root))
    landmark = os.path.join(root, 'tools', 'getos.py')
    if (not os.path.exists(landmark)):
        raise error.Error(("$NACL_SDK_ROOT (%s) doesn't look right. Couldn't find landmark file (%s)" % (root, landmark)))
    if (not check_sdk_version(MIN_SDK_VERSION)):
        raise error.Error(('This version of webports requires at least version %s of\nthe NaCl SDK. The version in $NACL_SDK_ROOT is %s. If you want\nto use webports with an older version of the SDK please checkout\none of the pepper_XX branches (or run with\n--skip-sdk-version-check).' % (MIN_SDK_VERSION, get_sdk_version())))
Check validity of NACL_SDK_ROOT.
def check_sdk_root():
    
    root = get_sdk_root()
    if (not os.path.isdir(root)):
        raise error.Error(('$NACL_SDK_ROOT does not exist: %s' % root))
    landmark = os.path.join(root, 'tools', 'getos.py')
    if (not os.path.exists(landmark)):
        raise error.Error(("$NACL_SDK_ROOT (%s) doesn't look right. Couldn't find landmark file (%s)" % (root, landmark)))
    if (not check_sdk_version(MIN_SDK_VERSION)):
        raise error.Error(('This version of webports requires at least version %s of\nthe NaCl SDK. The version in $NACL_SDK_ROOT is %s. If you want\nto use webports with an older version of the SDK please checkout\none of the pepper_XX branches (or run with\n--skip-sdk-version-check).' % (MIN_SDK_VERSION, get_sdk_version())))