trace-cmd: lazily evaluate extra plugins list, fixes stray build errors causing by...
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 27 Nov 2012 18:08:42 +0000 (18:08 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 27 Nov 2012 18:08:42 +0000 (18:08 +0000)
SVN-Revision: 34390

package/devel/trace-cmd/Makefile

index c201eb0ecdfbc8a9726ff27d0a6e3a1968a12466..1d555db4d42afcea06bb553f1ff55a7d5417985b 100644 (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