From d16608000193f58f163f6dc73927a21cffdaf49c Mon Sep 17 00:00:00 2001 From: Karsten Sperling Date: Mon, 8 May 2023 12:06:43 +1200 Subject: [PATCH] Tidy up dependencies of //examples/platform/linux:app-main - Use deps instead of public_deps where possible - Only build shell commands if chip_build_libshell is true - Remove explicit //src/lib/shell dependencies, it's already pulled in by //src/lib - Remove explicit dependency on OTATestEventTriggerDelegate.h --- examples/platform/linux/BUILD.gn | 56 ++++++++-------------- examples/platform/nxp/se05x/linux/BUILD.gn | 2 - 2 files changed, 19 insertions(+), 39 deletions(-) diff --git a/examples/platform/linux/BUILD.gn b/examples/platform/linux/BUILD.gn index 08580aad33c1f5..f9284bfbb6f24b 100644 --- a/examples/platform/linux/BUILD.gn +++ b/examples/platform/linux/BUILD.gn @@ -22,12 +22,6 @@ config("app-main-config") { include_dirs = [ "." ] } -source_set("ota-test-event-trigger") { - sources = [ - "${chip_root}/src/app/clusters/ota-requestor/OTATestEventTriggerDelegate.h", - ] -} - source_set("app-main") { defines = [] sources = [ @@ -35,12 +29,8 @@ source_set("app-main") { "AppMain.h", "CommissionableInit.cpp", "CommissionableInit.h", - "CommissioneeShellCommands.cpp", - "CommissioneeShellCommands.h", "CommissionerMain.cpp", "CommissionerMain.h", - "ControllerShellCommands.cpp", - "ControllerShellCommands.h", "LinuxCommissionableDataProvider.cpp", "LinuxCommissionableDataProvider.h", "NamedPipeCommands.cpp", @@ -53,29 +43,31 @@ source_set("app-main") { "testing/CustomCSRResponseOperationalKeyStore.h", ] - defines = [] + public_deps = [ + "${chip_root}/src/lib", + "${chip_root}/src/platform/logging:force_stdio", + ] + deps = [ + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/src/app/server", + ] if (chip_enable_pw_rpc) { defines += [ "PW_RPC_ENABLED" ] } + if (chip_build_libshell) { defines += [ "ENABLE_CHIP_SHELL" ] + sources += [ + "CommissioneeShellCommands.cpp", + "CommissioneeShellCommands.h", + "ControllerShellCommands.cpp", + "ControllerShellCommands.h", + ] } - public_deps = [ - ":ota-test-event-trigger", - "${chip_root}/examples/providers:device_info_provider", - "${chip_root}/src/app/server", - "${chip_root}/src/credentials:default_attestation_verifier", - "${chip_root}/src/lib", - "${chip_root}/src/lib/shell", - "${chip_root}/src/lib/shell:shell_core", - "${chip_root}/src/platform/logging:force_stdio", - ] - if (chip_enable_transport_trace) { - public_deps += - [ "${chip_root}/examples/common/tracing:trace_handlers_decoder" ] + deps += [ "${chip_root}/examples/common/tracing:trace_handlers_decoder" ] } public_configs = [ ":app-main-config" ] @@ -88,25 +80,15 @@ source_set("commissioner-main") { "CommissionerMain.h", ] - defines = [] - - if (chip_enable_pw_rpc) { - defines += [ "PW_RPC_ENABLED" ] - } if (chip_build_libshell) { defines += [ "ENABLE_CHIP_SHELL" ] } - public_deps = [ - "${chip_root}/src/app/server", - "${chip_root}/src/credentials:default_attestation_verifier", - "${chip_root}/src/lib", - "${chip_root}/src/lib/shell", - "${chip_root}/src/lib/shell:shell_core", - ] + public_deps = [ "${chip_root}/src/lib" ] + deps = [ "${chip_root}/src/app/server" ] if (chip_enable_transport_trace) { - public_deps += [ "${chip_root}/examples/common/tracing:trace_handlers" ] + deps += [ "${chip_root}/examples/common/tracing:trace_handlers" ] } public_configs = [ ":app-main-config" ] diff --git a/examples/platform/nxp/se05x/linux/BUILD.gn b/examples/platform/nxp/se05x/linux/BUILD.gn index 4956883bcec584..52ce3d417617e5 100644 --- a/examples/platform/nxp/se05x/linux/BUILD.gn +++ b/examples/platform/nxp/se05x/linux/BUILD.gn @@ -108,8 +108,6 @@ source_set("commissioner-main") { "${chip_root}/src/app/server", "${chip_root}/src/credentials:default_attestation_verifier", "${chip_root}/src/lib", - "${chip_root}/src/lib/shell", - "${chip_root}/src/lib/shell:shell_core", ] if (chip_enable_transport_trace) {