am d68530ba: am 85448773: select default search_path by platform

* commit 'd68530ba9ac7563487ff4a9e1527db1e2e3f88be':
  select default search_path by platform
This commit is contained in:
Doug Zongker 2014-09-10 01:00:52 +00:00 committed by Android Git Automerger
commit a7eba15e76
2 changed files with 11 additions and 4 deletions

View file

@ -1441,7 +1441,7 @@ endif
$(hide) zipinfo -1 $@ | awk 'BEGIN { FS="BOOT/RAMDISK/" } /^BOOT\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -S $(SELINUX_FC) > $(zip_root)/META/boot_filesystem_config.txt $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="BOOT/RAMDISK/" } /^BOOT\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -S $(SELINUX_FC) > $(zip_root)/META/boot_filesystem_config.txt
$(hide) zipinfo -1 $@ | awk 'BEGIN { FS="RECOVERY/RAMDISK/" } /^RECOVERY\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -S $(SELINUX_FC) > $(zip_root)/META/recovery_filesystem_config.txt $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="RECOVERY/RAMDISK/" } /^RECOVERY\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -S $(SELINUX_FC) > $(zip_root)/META/recovery_filesystem_config.txt
$(hide) (cd $(zip_root) && zip -q ../$(notdir $@) META/*filesystem_config.txt) $(hide) (cd $(zip_root) && zip -q ../$(notdir $@) META/*filesystem_config.txt)
$(hide) ./build/tools/releasetools/add_img_to_target_files $@ $(hide) ./build/tools/releasetools/add_img_to_target_files -p $(HOST_OUT) $@
.PHONY: target-files-package .PHONY: target-files-package
target-files-package: $(BUILT_TARGET_FILES_PACKAGE) target-files-package: $(BUILT_TARGET_FILES_PACKAGE)

View file

@ -42,7 +42,13 @@ if not hasattr(os, "SEEK_SET"):
class Options(object): pass class Options(object): pass
OPTIONS = Options() OPTIONS = Options()
OPTIONS.search_path = "out/host/linux-x86"
DEFAULT_SEARCH_PATH_BY_PLATFORM = {
"linux2": "out/host/linux-x86",
"darwin": "out/host/darwin-x86",
}
OPTIONS.search_path = DEFAULT_SEARCH_PATH_BY_PLATFORM.get(sys.platform, None)
OPTIONS.signapk_path = "framework/signapk.jar" # Relative to search_path OPTIONS.signapk_path = "framework/signapk.jar" # Relative to search_path
OPTIONS.extra_signapk_args = [] OPTIONS.extra_signapk_args = []
OPTIONS.java_path = "java" # Use the one on the path by default. OPTIONS.java_path = "java" # Use the one on the path by default.
@ -651,8 +657,9 @@ def ParseOptions(argv,
if extra_option_handler is None or not extra_option_handler(o, a): if extra_option_handler is None or not extra_option_handler(o, a):
assert False, "unknown option \"%s\"" % (o,) assert False, "unknown option \"%s\"" % (o,)
os.environ["PATH"] = (os.path.join(OPTIONS.search_path, "bin") + if OPTIONS.search_path:
os.pathsep + os.environ["PATH"]) os.environ["PATH"] = (os.path.join(OPTIONS.search_path, "bin") +
os.pathsep + os.environ["PATH"])
return args return args