From 414de033e0a73e2c839d5cc075b303e7642de806 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Mon, 23 Feb 2015 11:37:36 +0100 Subject: [PATCH] 8073498: Enhance GensrcProperties.gmk to allow an alternative source root Reviewed-by: tbell, mchung, ihse --- jdk/make/gensrc/GensrcProperties.gmk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jdk/make/gensrc/GensrcProperties.gmk b/jdk/make/gensrc/GensrcProperties.gmk index fc7504cddfd..dc78489e0b9 100644 --- a/jdk/make/gensrc/GensrcProperties.gmk +++ b/jdk/make/gensrc/GensrcProperties.gmk @@ -53,15 +53,21 @@ endef # 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,, \