trace-cmd: lazily evaluate extra plugins list, fixes stray build errors causing by missing operands to cp if the package was never built yet

SVN-Revision: 34390
This commit is contained in:
Jo-Philipp Wich 2012-11-27 18:08:42 +00:00
parent 78cec2cfca
commit 32dcd5d6c7

View file

@ -35,9 +35,7 @@ MAKE_FLAGS += \
prefix=/usr
PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/trace-cmd/plugins
PLUGINS_ALL = $(patsubst $(PLUGINS_DIR)/plugin_%.so,%,$(wildcard $(PLUGINS_DIR)/plugin_*.so))
PLUGINS_MAIN := function hrtimer mac80211 sched_switch
PLUGINS_EXTRA = $(filter-out $(PLUGINS_MAIN),$(PLUGINS_ALL))
TARGET_CFLAGS += --std=gnu99
@ -52,7 +50,10 @@ endef
define Package/trace-cmd-extra/install
$(INSTALL_DIR) $(1)/usr/lib/trace-cmd/plugins
$(CP) \
$(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_EXTRA)) \
$$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \
$$(filter-out $(PLUGINS_MAIN), \
$$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \
$$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \
$(1)/usr/lib/trace-cmd/plugins
endef