# HG changeset patch # User erikj # Date 1424687856 -3600 # Node ID e91fff38083a092faef06f220916071dadc909c4 # Parent cb98c9bc4e6db32cb7188632b4e4dbd327451435 8073498: Enhance GensrcProperties.gmk to allow an alternative source root Reviewed-by: tbell, mchung, ihse diff -r cb98c9bc4e6d -r e91fff38083a jdk/make/gensrc/GensrcProperties.gmk --- a/jdk/make/gensrc/GensrcProperties.gmk Sat Feb 21 13:46:24 2015 +0100 +++ b/jdk/make/gensrc/GensrcProperties.gmk Mon Feb 23 11:37:36 2015 +0100 @@ -53,15 +53,21 @@ # Param 1 - Variable to add targets to, must not contain space # Param 2 - Properties files to process # Param 3 - The super class for the generated classes +# Param 4 - Module path root, defaults to $(JDK_TOPDIR)/src define SetupCompileProperties $1_SRCS := $2 $1_CLASS := $3 + $1_MODULE_PATH_ROOT := $4 + + ifeq ($$($1_MODULE_PATH_ROOT), ) + $1_MODULE_PATH_ROOT := $(JDK_TOPDIR)/src + endif # Convert .../src//share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties # to .../support/gensrc//com/sun/tools/javac/resources/javac_zh_CN.java # Strip away prefix and suffix, leaving for example only: # "/share/classes/com/sun/tools/javac/resources/javac_zh_CN" - $1_JAVAS := $$(patsubst $(JDK_TOPDIR)/src/%, \ + $1_JAVAS := $$(patsubst $$($1_MODULE_PATH_ROOT)/%, \ $(SUPPORT_OUTPUTDIR)/gensrc/%, \ $$(patsubst %.properties, %.java, \ $$(subst /$(OPENJDK_TARGET_OS)/classes,, \