--- a/Makefile Mon Nov 05 09:26:49 2012 -0800
+++ b/Makefile Mon Nov 05 14:07:04 2012 -0800
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
#
include make-rules/shared-macros.mk
@@ -35,11 +35,12 @@
clobber: TARGET = clobber
setup: TARGET = setup
test: TARGET = test
+component-hook: TARGET = component-hook
.DEFAULT: publish
download setup prep build install publish validate clean clobber \
-test: $(SUBDIRS)
+test component-hook: $(SUBDIRS)
$(SUBDIRS): FORCE
+echo "$(TARGET) [email protected]" ; $(GMAKE) -C [email protected] $(TARGET)
--- a/components/Makefile Mon Nov 05 09:26:49 2012 -0800
+++ b/components/Makefile Mon Nov 05 14:07:04 2012 -0800
@@ -57,6 +57,7 @@
clean: TARGET = clean
clobber: TARGET = clobber
test: TARGET = test
+component-hook: TARGET = component-hook
prep build install publish test: TEMPLATE_ZONE=$(ZONE)
prep build install publish test: LOG = >$(WS_LOGS)/$(@F).$(TARGET).log 2>&1
@@ -73,6 +74,8 @@
download prep: $(COMPONENT_DIRS.nosetup)
+component-hook: $(COMPONENT_DIRS.nosetup)
+
clean: $(COMPONENT_DIRS.nosetup)
$(RM) components.mk depends.mk .profile
--- a/make-rules/shared-macros.mk Mon Nov 05 09:26:49 2012 -0800
+++ b/make-rules/shared-macros.mk Mon Nov 05 14:07:04 2012 -0800
@@ -650,3 +650,12 @@
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)
+