changeset 2117:ac5b9049ea28

8157511: JDK-8157348 broke gensrc of module infos with extra provides Reviewed-by: mchung
author erikj
date Mon, 23 May 2016 11:21:50 +0200
parents 18c129c4a770
children 647e0142a5a5
files make/GensrcModuleInfo.gmk
diffstat 1 files changed, 16 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/make/GensrcModuleInfo.gmk	Sat May 21 18:23:28 2016 +0200
+++ b/make/GensrcModuleInfo.gmk	Mon May 23 11:21:50 2016 +0200
@@ -102,13 +102,23 @@
   $(foreach line, $(MODIFICATIONS), \
     $(eval split_line := $(subst /,$(SPACE),$(line))) \
     $(eval command := $(word 1, $(split_line))) \
-    $(eval package := $(patsubst %;,%,$(word 2, $(split_line)))) \
-    $(if $(call PackageExists, $(package)), \
-      $(eval to_module := $(patsubst %;,%,$(word 4, $(split_line)))) \
-      $(if $(to_module), \
-        $(eval ARGS += -$(command) $(package)/$(to_module)) \
+    $(if $(filter $(command), exports), \
+      $(eval package := $(patsubst %;,%,$(word 2, $(split_line)))) \
+      $(if $(call PackageExists, $(package)), \
+        $(eval to_module := $(patsubst %;,%,$(word 4, $(split_line)))) \
+        $(if $(to_module), \
+          $(eval ARGS += -$(command) $(package)/$(to_module)) \
+        , \
+          $(eval ARGS += -$(command) $(package)) \
+        ) \
+      ) \
+    , \
+      $(if $(filter $(command), provides), \
+        $(eval provider := $(patsubst %;,%,$(word 2, $(split_line)))) \
+        $(eval class := $(patsubst %;,%,$(word 4, $(split_line)))) \
+        $(eval ARGS += -$(command) $(provider)/$(class)) \
       , \
-        $(eval ARGS += -$(command) $(package)) \
+        $(error A module-info.extra in $(MODULE) contains invalid command $(command)) \
       ) \
     ) \
   )