-
Notifications
You must be signed in to change notification settings - Fork 1
/
component-report
63 lines (54 loc) · 2.7 KB
/
component-report
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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>" >$@
@echo "<td><a href='$(COMPONENT_PROJECT_URL)'>$(COMPONENT_NAME)</a></td>" >>$@
@echo "<td><a href='$(COMPONENT_ARCHIVE_URL)'>$(COMPONENT_VERSION)</a></td>" >>$@
@echo "<td><a href='$(HGWEB_BASE_URL)$(CDIR)'>$(CDIR)</a></td>" >>$@
@echo "<td>" >>$@ ; for pkg in $(PACKAGE) ; do \
echo "$$pkg<br>" >>$@ ; \
done ; echo "</td>" >>$@
@echo "<td>" >>$@ ; for arc in $(COMP_ARC_CASE) ; do \
echo "<a href='$(ARC_BASE_URL)$$arc'>$$arc</a><br>" >>$@ ; \
done ; echo "</td>" >>$@
@echo "<td>" >>$@ ; for license in $(LICENSE) ; do \
echo "$$license<br>" >>$@ ; \
done ; echo "</td>" >>$@
@echo "<td>" >>$@ ; for tpno in $(ALL_TPNOS) ; do \
echo "<a href='https://pls.us.oracle.com/PLS/faces/ThirdPartyHome?itemDetail=Y&aid=$$tpno'>$${tpno}</a><br>" >>$@ ; \
done ; echo "</td>" >>$@
@echo "<td>" >>$@ ; for bugdb in $(COMPONENT_BUGDB) ; do \
echo "<a href='$(BUGDB_URL)$$bugdb'>$$bugdb</a><br>" >>$@ ; \
done ; echo "</td>" >>$@
@echo "<td><a href='$(ARIA_BASE_URL)$(RESPONSIBLE_ENGINEER)'>$(RESPONSIBLE_ENGINEER)</a></td>" >>$@
@echo "<td><a href='$(ARIA_BASE_URL)$(RESPONSIBLE_MANAGER)'>$(RESPONSIBLE_MANAGER)</a></td>" >>$@
@echo "<td>$(TEAM)</td>" >>$@
@echo "</tr>" >>$@
$(BUILD_DIR)/package-info: $(PKG_REPORTS)
@cat $(PKG_REPORTS) | sort -u >$@
$(BUILD_DIR)/component-info: $(PKG_REPORTS)
@echo "COMPONENT_NAME=\"$(COMPONENT_NAME)\"" >$@
@echo "COMPONENT_VERSION=\"$(COMPONENT_VERSION)\"" >>$@
@echo "COMPONENT_PROJECT_URL=\"$(COMPONENT_PROJECT_URL)\"" >>$@
@echo "COMPONENT_ARCHIVE_URL=\"$(COMPONENT_ARCHIVE_URL)\"" >>$@
@echo "COMPONENT_DIR=\"$(CDIR)\"" >>$@
@echo "TPNO=\"$(ALL_TPNOS)\"" >>$@
@echo "COMPONENT_BUGDB=\"$(COMPONENT_BUGDB)\"" >>$@
@echo "RESPONSIBLE_ENGINEER=\"$(RESPONSIBLE_ENGINEER)\"" >>$@
@echo "RESPONSIBLE_MANAGER=\"$(RESPONSIBLE_MANAGER)\"" >>$@
@echo "TEAM=\"$(TEAM)\"" >>$@
$(BUILD_DIR)/%.pkg-report: %.p5m $(BUILD_DIR)
@$(PKGMOGRIFY) $(PKG_OPTIONS) -P $@ $< \
$(REPORT_TRANSFORMS) >/dev/null
include $(BUILD_DIR)/package-info