--- a/make/common/Modules.gmk Wed Apr 19 10:24:42 2017 +0200
+++ b/make/common/Modules.gmk Wed Apr 19 10:44:40 2017 +0200
@@ -294,15 +294,15 @@
( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \
$(NAWK) -v MODULE=$(call GetModuleNameFromModuleInfo, $m) '\
BEGIN { if (MODULE != "java.base") printf(" java.base"); } \
- /requires/ { sub(/;/, ""); \
- sub(/requires/, ""); \
- sub(/transitive/, ""); \
- sub(/\/\/.*/, ""); \
- sub(/\/\*.*\*\//, ""); \
- gsub(/^ +\*.*/, ""); \
- gsub(/ /, ""); \
- printf(" %s", $$0) } \
- END { printf("\n") }' $m \
+ /^ *requires/ { sub(/;/, ""); \
+ sub(/requires/, ""); \
+ sub(/transitive/, ""); \
+ sub(/\/\/.*/, ""); \
+ sub(/\/\*.*\*\//, ""); \
+ gsub(/^ +\*.*/, ""); \
+ gsub(/ /, ""); \
+ printf(" %s", $$0) } \
+ END { printf("\n") }' $m \
) >> $@ $(NEWLINE))
-include $(MODULE_DEPS_MAKEFILE)
@@ -320,6 +320,11 @@
$(foreach n, $(call FindDepsForModule, $m), \
$(call FindDepsForModule, $n))))
+# Finds transitive dependencies in 3 levels for a set of modules.
+# Param 1: List of modules to find transitive deps for
+FindTransitiveDepsForModules = \
+ $(sort $(foreach m, $1, $(call FindTransitiveDepsForModule, $m)))
+
# Upgradeable modules are those that are either defined as upgradeable or that
# require an upradeable module.
FindAllUpgradeableModules = \