Lines Matching refs:os

26 import os
129 elif os.path.isabs(target):
131 rel_path = os.path.relpath(abs_path, get_android_root_dir())
136 rel_path = paths[0].strip(os.sep)
137 abs_path = os.path.join(get_android_root_dir(), rel_path)
140 or os.path.isdir(os.path.join(get_android_root_dir(), target))):
141 rel_path = target.strip(os.sep)
142 abs_path = os.path.join(get_android_root_dir(), rel_path)
145 abs_path = os.path.abspath(os.path.join(os.getcwd(), target))
146 rel_path = os.path.relpath(abs_path, get_android_root_dir())
149 abs_path = os.getcwd()
153 rel_path = os.path.relpath(abs_path, get_android_root_dir())
276 if not os.path.isdir(abs_path):
308 return os.path.join(get_android_root_dir(), rel_path)
359 return os.path.join(get_soong_out_path(), file_name)
375 cwd = os.getcwd()
379 os.chdir(cwd)
391 android_out_dir = os.getenv(constants.ANDROID_OUT_DIR)
392 out_dir_common_base = os.getenv(constant.OUT_DIR_COMMON_BASE_ENV_VAR)
393 android_out_dir_common_base = (os.path.join(
394 out_dir_common_base, os.path.basename(android_root_path))
409 android_root_path = os.environ.get(constants.ANDROID_BUILD_TOP)
421 return os.path.join(get_android_root_dir(), constant.AIDEGEN_ROOT_PATH)
436 return os.path.join(get_android_root_dir(), get_android_out_dir(), 'soong')
462 return os.path.isfile(os.path.join(abs_path, constant.ANDROID_BP))
474 return os.path.isfile(os.path.join(abs_path, constant.ANDROID_MK))
500 return str(data).replace(os.path.expanduser('~'), constant.USER_HOME)
639 if not os.path.exists(os.path.dirname(path)):
640 os.makedirs(os.path.dirname(path))
651 product = os.environ.get(constant.TARGET_PRODUCT)
652 build_variant = os.environ.get(constant.TARGET_BUILD_VARIANT)
668 bp_java_path = os.path.join(
672 bp_cc_path = os.path.join(
675 data[constant.GEN_COMPDB] = os.path.join(get_soong_out_path(),
695 return os.linesep.join([s for s in xml_string.splitlines() if s.strip()])
720 dir_list = relpath.split(os.sep)
722 real_path = os.path.join(get_android_root_dir(),
723 os.sep.join(dir_list[:i]),
725 if os.path.exists(real_path):
726 return os.path.dirname(real_path)