From cec297475f3af986022b701751622a0604db7cd7 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Sat, 22 Feb 2020 01:25:46 +0800 Subject: [PATCH] [build] fix command t not found (#4588) There may be some bug in automake when computing dependencies, causing output error messages as following when installing: ```bash /bin/bash: t: command not found ``` This issue is introduced in #4558. --- src/ncp/Makefile.am | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/ncp/Makefile.am b/src/ncp/Makefile.am index 3e0b2d3fa..2711b570d 100644 --- a/src/ncp/Makefile.am +++ b/src/ncp/Makefile.am @@ -82,14 +82,19 @@ libopenthread_rcp_a_CPPFLAGS = \ $(COMMON_CPPFLAGS) \ $(NULL) -libopenthread_ncp_mtd_a_LIBADD = \ - $(addprefix $(top_builddir)/src/spinel/,$(filter %.o,$(shell $(AR) t $(top_builddir)/src/spinel/libopenthread-spinel-ncp.a))) +list_objects = $(addprefix $(dir $(1)),$(filter %.o,$(shell $(AR) t $(1)))) -libopenthread_ncp_ftd_a_LIBADD = \ - $(addprefix $(top_builddir)/src/spinel/,$(filter %.o,$(shell $(AR) t $(top_builddir)/src/spinel/libopenthread-spinel-ncp.a))) +libopenthread_ncp_mtd_a_LIBADD = \ + $(call list_objects,$(top_builddir)/src/spinel/libopenthread-spinel-ncp.a) \ + $(NULL) -libopenthread_rcp_a_LIBADD = \ - $(addprefix $(top_builddir)/src/spinel/,$(filter %.o,$(shell $(AR) t $(top_builddir)/src/spinel/libopenthread-spinel-rcp.a))) +libopenthread_ncp_ftd_a_LIBADD = \ + $(call list_objects,$(top_builddir)/src/spinel/libopenthread-spinel-ncp.a) \ + $(NULL) + +libopenthread_rcp_a_LIBADD = \ + $(call list_objects,$(top_builddir)/src/spinel/libopenthread-spinel-rcp.a) \ + $(NULL) COMMON_SOURCES = \ changed_props_set.cpp \