!517 为内核模块的BUILD.gn自动添加默认的group
Merge pull request !517 from Caoruihong/hdf_config
This commit is contained in:
commit
ba16cd34d4
|
@ -70,10 +70,6 @@ kernel_module(module_name) {
|
|||
public_configs = [ ":public" ]
|
||||
}
|
||||
|
||||
group("arm") {
|
||||
public_deps = [ ":$module_name" ]
|
||||
}
|
||||
|
||||
config("public") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
|
|
|
@ -144,10 +144,6 @@ kernel_module(module_name) {
|
|||
public_configs = [ ":public" ]
|
||||
}
|
||||
|
||||
group("usb") {
|
||||
public_deps = [ ":$module_name" ]
|
||||
}
|
||||
|
||||
config("public") {
|
||||
include_dirs = [ "." ]
|
||||
include_dirs += [ "$LITEOSTHIRDPARTY/FreeBSD/sys/dev/evdev" ]
|
||||
|
|
|
@ -56,7 +56,3 @@ kernel_module(module_name) {
|
|||
config("public") {
|
||||
include_dirs = [ "$LITEOSTHIRDPARTY/zlib" ]
|
||||
}
|
||||
|
||||
group("zlib") {
|
||||
public_deps = [ ":$module_name" ]
|
||||
}
|
||||
|
|
12
liteos.gni
12
liteos.gni
|
@ -34,6 +34,18 @@ LITEOSTHIRDPARTY = "//third_party"
|
|||
HDFTOPDIR = "//drivers/adapter/khdf/liteos"
|
||||
|
||||
template("kernel_module") {
|
||||
current_dir_name = get_path_info(rebase_path("."), "file")
|
||||
if (target_name != current_dir_name) {
|
||||
build_gn = rebase_path("BUILD.gn")
|
||||
cmd = "if grep -q '^\s*group\s*(\s*\"$current_dir_name\"\s*)\s*{\s*\$' $build_gn; then echo true; else echo false; fi"
|
||||
has_current_dir_group = exec_script("//build/lite/run_shell_cmd.py", [ cmd ], "value")
|
||||
if (!has_current_dir_group) {
|
||||
module_name = target_name
|
||||
group(current_dir_name) {
|
||||
public_deps = [ ":$module_name" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
if (defined(invoker.module_switch) && !invoker.module_switch) {
|
||||
group(target_name) {
|
||||
not_needed(invoker, "*")
|
||||
|
|
|
@ -57,7 +57,3 @@ config("public") {
|
|||
include_dirs += LWIP_PORTING_INCLUDE_DIRS
|
||||
include_dirs += LWIP_INCLUDE_DIRS
|
||||
}
|
||||
|
||||
group("lwip-2.1") {
|
||||
public_deps = [ ":$module_name" ]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue