make-rules/shared-macros.mk
branchs11-update
changeset 2434 6c9bb5cf5610
parent 2395 dd214a1128f8
child 2576 f1b6ecbb2d1e
--- a/make-rules/shared-macros.mk	Wed Nov 28 01:19:47 2012 -0800
+++ b/make-rules/shared-macros.mk	Thu Nov 29 06:06:04 2012 -0800
@@ -89,6 +89,8 @@
 
 PKG_REPO =	file:$(WS_REPO)
 
+COMPONENT_SRC_NAME =	$(COMPONENT_NAME)
+
 COMPONENT_DIR =	$(shell pwd)
 SOURCE_DIR =	$(COMPONENT_DIR)/$(COMPONENT_SRC)
 BUILD_DIR =	$(COMPONENT_DIR)/build
@@ -647,3 +649,11 @@
 NO_TESTS =	test-nothing
 test-nothing:
 	@echo "There are no tests available at this time."
+
+# default behaviour for 'component-hook' target is to echo the component
+# name and version information, but more complex behaviour can be implemented
+# via command line setting of the COMPONENT_HOOK macro.
+COMPONENT_HOOK ?=	echo $(COMPONENT_NAME) $(COMPONENT_VERSION)
+
+component-hook:
+	@$(COMPONENT_HOOK)