提交 f57a682e 编写于 作者: O openharmony_ci 提交者: Gitee

!70 hb build单独编译单板,不需要hb set

Merge pull request !70 from SimonLi/master
__pycache__/
*.py[cod]
.vscode
\ No newline at end of file
.vscode
*.swp
cscope.*
tags
......@@ -186,6 +186,8 @@ class Build():
if self._target is None and Device.is_in_device():
# Compile device board
device_path, kernel, board = Device.device_menuconfig()
# xxx: build device, no need to set root manually, so set it speculatively.
self.config.root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd())))
self.config.out_path = os.path.join(self.config.root_path,
'out',
board)
......
......@@ -18,7 +18,6 @@
import os
import re
from hb.common.config import Config
from hb.cts.menuconfig import Menuconfig
......@@ -26,8 +25,7 @@ class Device():
@staticmethod
def is_in_device():
cwd_pardir = os.path.dirname(os.path.dirname(os.getcwd()))
config = Config()
return os.path.join(config.root_path, 'device') == cwd_pardir
return os.path.basename(cwd_pardir) == 'device'
@staticmethod
def is_kernel(kernel_path):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册