make/common/Modules.gmk
changeset 47735 45af799ceb6a
parent 47701 be620a591379
child 47853 3e345eba9255
--- a/make/common/Modules.gmk	Mon Nov 13 15:54:20 2017 +0100
+++ b/make/common/Modules.gmk	Mon Nov 13 16:32:30 2017 +0100
@@ -409,8 +409,10 @@
 # $1 - Module to find legal dirs for
 FindModuleLegalDirs = \
     $(strip $(wildcard \
-        $(addsuffix /$(strip $1), $(IMPORT_MODULES_LEGAL)) \
-        $(foreach sub, $(LEGAL_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
+        $(addsuffix /$(strip $1), $(SUPPORT_OUTPUTDIR)/modules_legal \
+            $(IMPORT_MODULES_LEGAL)) \
+        $(foreach sub, $(LEGAL_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS))) \
+    ))
 
 ################################################################################