< prev index next >

make/GensrcModuleInfo.gmk

Print this page

        

@@ -90,14 +90,16 @@
       $(MODS_REST)
 
   # Returns non empty if the package exists in the current module
   # Param 1 - Name of package with dots
   PackageExists = \
-      $(strip $(wildcard $(addsuffix $(subst .,/,/$(strip $1)), \
+      $(strip $(wildcard $(foreach s, $(subst .,/,/$(strip $1)) $(subst .,/,/*/src/$(strip $1)), \
+          $(addsuffix $s, \
           $(MODULE_CLASSES_DIRS) \
           $(addsuffix /$(MODULE), $(IMPORT_MODULES_CLASSES)) \
           $(JDK_OUTPUTDIR)/modules/$(MODULE) \
+          ) \
       )))
 
   # Convert the modification lines into arguments for the modification tool.
   # Filter out modifications for non existing to-modules.
   $(foreach line, $(MODIFICATIONS), \

@@ -117,11 +119,16 @@
       $(if $(filter $(command), provides), \
         $(eval provider := $(patsubst %;,%,$(word 2, $(split_line)))) \
         $(eval class := $(patsubst %;,%,$(word 4, $(split_line)))) \
         $(eval ARGS += -$(command) $(provider)/$(class)) \
       , \
-        $(error A module-info.extra in $(MODULE) contains invalid command $(command)) \
+        $(if $(filter $(command), uses), \
+          $(eval provider := $(patsubst %;,%,$(word 2, $(split_line)))) \
+          $(eval ARGS += -$(command) $(provider)) \
+        , \
+          $(error A module-info.java.extra in $(MODULE) contains invalid command $(command)) \
+        ) \
       ) \
     ) \
   )
 
   ifneq ($(ARGS), )
< prev index next >