62 # Param 1 - Variable to add targets to |
62 # Param 1 - Variable to add targets to |
63 # Param 2 - Extra properties files to process |
63 # Param 2 - Extra properties files to process |
64 define SetupCompileProperties |
64 define SetupCompileProperties |
65 # Lookup the properties that need to be compiled into resource bundles. |
65 # Lookup the properties that need to be compiled into resource bundles. |
66 PROPSOURCES := $2 \ |
66 PROPSOURCES := $2 \ |
67 $$(shell $(FIND) $(LANGTOOLS_TOPDIR)/src/$(MODULE)/share/classes -name "*.properties") |
67 $$(shell $(FIND) $(TOPDIR)/src/$(MODULE)/share/classes -name "*.properties") |
68 |
68 |
69 # Convert .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties |
69 # Convert .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties |
70 # to .../langtools/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java |
70 # to .../langtools/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java |
71 # Strip away prefix and suffix, leaving for example only: |
71 # Strip away prefix and suffix, leaving for example only: |
72 # "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN" |
72 # "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN" |
73 PROPJAVAS := $$(patsubst $(LANGTOOLS_TOPDIR)/src/%, \ |
73 PROPJAVAS := $$(patsubst $(TOPDIR)/src/%, \ |
74 $(SUPPORT_OUTPUTDIR)/gensrc/%, \ |
74 $(SUPPORT_OUTPUTDIR)/gensrc/%, \ |
75 $$(patsubst %.properties, %.java, \ |
75 $$(patsubst %.properties, %.java, \ |
76 $$(subst /share/classes,, $$(PROPSOURCES)))) |
76 $$(subst /share/classes,, $$(PROPSOURCES)))) |
77 |
77 |
78 # Generate the package dirs for the to be generated java files. Sort to remove |
78 # Generate the package dirs for the to be generated java files. Sort to remove |
102 # Parse property files in given location and generate a Java-like enum in the gensrc folder. |
102 # Parse property files in given location and generate a Java-like enum in the gensrc folder. |
103 # Param 1 - Variable to add targets to |
103 # Param 1 - Variable to add targets to |
104 # Param 2 - Extra properties files to process |
104 # Param 2 - Extra properties files to process |
105 define SetupParseProperties |
105 define SetupParseProperties |
106 # property files to process |
106 # property files to process |
107 PARSEPROPSOURCES := $$(addprefix $(LANGTOOLS_TOPDIR)/src/$(MODULE)/share/classes/, $2) |
107 PARSEPROPSOURCES := $$(addprefix $(TOPDIR)/src/$(MODULE)/share/classes/, $2) |
108 |
108 |
109 PARSEPROPALLDIRS := $$(patsubst $(LANGTOOLS_TOPDIR)/src/$(MODULE)/share/classes/%, \ |
109 PARSEPROPALLDIRS := $$(patsubst $(TOPDIR)/src/$(MODULE)/share/classes/%, \ |
110 $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/%, \ |
110 $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/%, \ |
111 $$(dir $$(PARSEPROPSOURCES))) |
111 $$(dir $$(PARSEPROPSOURCES))) |
112 |
112 |
113 PARSEPROPDIRS := $$(sort $$(PARSEPROPALLDIRS)) |
113 PARSEPROPDIRS := $$(sort $$(PARSEPROPALLDIRS)) |
114 |
114 |