make-rules/component-report
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Fri, 12 Aug 2016 17:23:26 -0700
changeset 6610 88360f57667e
parent 5282 b4df500d2f24
permissions -rw-r--r--
Close of build 106.

PKG_REPORTS=$(CANONICAL_MANIFESTS:%.p5m=$(BUILD_DIR)/%.pkg-report)
HG_BRANCH=$(shell hg branch)
HGWEB_BASE_URL = http://userland.us.oracle.com/hg/file/$(HG_BRANCH)/
ARIA_BASE_URL = http://people.us.oracle.com/pls/oracle/find_person?p_string=
ARC_BASE_URL = http://psarc.us.oracle.com/
BUGDB_URL = http://userland.us.oracle.com/bugdb?cat-subcat=

REPORT_TRANSFORMS = $(WS_TOP)/transforms/report
CDIR=$(COMPONENT_DIR:$(WS_TOP)/%=%)

# Add all the TPNO* Makefile macros together for further processing below.
$(foreach macro, $(filter TPNO%, $(.VARIABLES)), \
    $(eval ALL_TPNOS += $$($(macro))) \
)

component-report:	$(BUILD_DIR)/component-report

$(BUILD_DIR)/component-report:	$(BUILD_DIR)/package-info
	@echo "<tr>" >[email protected]
	@echo "<td><a href='$(COMPONENT_PROJECT_URL)'>$(COMPONENT_NAME)</a></td>" >>[email protected]
	@echo "<td><a href='$(COMPONENT_ARCHIVE_URL)'>$(COMPONENT_VERSION)</a></td>" >>[email protected]
	@echo "<td><a href='$(HGWEB_BASE_URL)$(CDIR)'>$(CDIR)</a></td>" >>[email protected]
	@echo "<td>" >>[email protected] ; for pkg in $(PACKAGE) ; do \
             echo "$$pkg<br>" >>[email protected] ; \
	 done ; echo "</td>" >>[email protected]
	@echo "<td>" >>[email protected] ; for arc in $(COMP_ARC_CASE) ; do \
             echo "<a href='$(ARC_BASE_URL)$$arc'>$$arc</a><br>" >>[email protected] ; \
	 done ; echo "</td>" >>[email protected]
	@echo "<td>" >>[email protected] ; for license in $(LICENSE) ; do \
	     echo "$$license<br>" >>[email protected] ; \
	 done ; echo "</td>" >>[email protected]
	@echo "<td>" >>[email protected] ; for tpno in $(ALL_TPNOS) ; do \
	     echo "<a href='https://pls.us.oracle.com/PLS/faces/ThirdPartyHome?itemDetail=Y&aid=$$tpno'>$${tpno}</a><br>" >>[email protected] ; \
	 done ; echo "</td>" >>[email protected]
	@echo "<td>" >>[email protected] ; for bugdb in $(COMPONENT_BUGDB) ; do \
	     echo "<a href='$(BUGDB_URL)$$bugdb'>$$bugdb</a><br>" >>[email protected] ; \
	 done ; echo "</td>" >>[email protected]
	@echo "<td><a href='$(ARIA_BASE_URL)$(RESPONSIBLE_ENGINEER)'>$(RESPONSIBLE_ENGINEER)</a></td>" >>[email protected]
	@echo "<td><a href='$(ARIA_BASE_URL)$(RESPONSIBLE_MANAGER)'>$(RESPONSIBLE_MANAGER)</a></td>" >>[email protected]
	@echo "<td>$(TEAM)</td>" >>[email protected]
	@echo "</tr>" >>[email protected]

$(BUILD_DIR)/package-info:	$(PKG_REPORTS)
	@cat $(PKG_REPORTS) | sort -u >[email protected]

$(BUILD_DIR)/component-info:	$(PKG_REPORTS)
	@echo "COMPONENT_NAME=\"$(COMPONENT_NAME)\"" >[email protected]
	@echo "COMPONENT_VERSION=\"$(COMPONENT_VERSION)\"" >>[email protected]
	@echo "COMPONENT_PROJECT_URL=\"$(COMPONENT_PROJECT_URL)\"" >>[email protected]
	@echo "COMPONENT_ARCHIVE_URL=\"$(COMPONENT_ARCHIVE_URL)\"" >>[email protected]
	@echo "COMPONENT_DIR=\"$(CDIR)\"" >>[email protected]
	@echo "TPNO=\"$(ALL_TPNOS)\"" >>[email protected]
	@echo "COMPONENT_BUGDB=\"$(COMPONENT_BUGDB)\"" >>[email protected]
	@echo "RESPONSIBLE_ENGINEER=\"$(RESPONSIBLE_ENGINEER)\"" >>[email protected]
	@echo "RESPONSIBLE_MANAGER=\"$(RESPONSIBLE_MANAGER)\"" >>[email protected]
	@echo "TEAM=\"$(TEAM)\"" >>[email protected]

$(BUILD_DIR)/%.pkg-report:	%.p5m $(BUILD_DIR)
	@$(PKGMOGRIFY) $(PKG_OPTIONS) -P [email protected] $< \
		$(REPORT_TRANSFORMS) >/dev/null

include $(BUILD_DIR)/package-info