1 # 2 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 # 5 # This code is free software; you can redistribute it and/or modify it 6 # under the terms of the GNU General Public License version 2 only, as 7 # published by the Free Software Foundation. Oracle designates this 8 # particular file as subject to the "Classpath" exception as provided 9 # by Oracle in the LICENSE file that accompanied this code. 10 # 11 # This code is distributed in the hope that it will be useful, but WITHOUT 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 # version 2 for more details (a copy is included in the LICENSE file that 15 # accompanied this code). 16 # 17 # You should have received a copy of the GNU General Public License version 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 # 27 # This file defines rules to build the locales information for 28 # resources in "sun.util.resources" & "sun.text.resources" packages 29 # 30 31 # Save the current FILES_java & FILES_compiled_properties variables 32 33 FILES_java_orig := $(FILES_java) 34 FILES_compiled_properties_orig := $(FILES_compiled_properties) 35 36 37 # Since all the resources files are going to be compiled into class file format, 38 # only FILES_java and FILES_compiled_properties variables will be picked up 39 # 40 # $(BUILDDIR)/java/util/FILES_java.gmk & $(BUILDDIR)/java/util/FILES_properties.gmk 41 # contain "sun.util.resources" for European language support 42 43 include $(BUILDDIR)/java/util/FILES_java.gmk 44 include $(BUILDDIR)/java/util/FILES_properties.gmk 45 46 Euro_Resources_java := $(FILES_java) 47 Euro_Resources_properties := $(FILES_compiled_properties) 48 49 # $(BUILDDIR)/java/text/FILES_java.gmk contains the "sun.text.resources" for 50 # European language support 51 52 include $(BUILDDIR)/java/text/base/FILES_java.gmk 53 54 Euro_Resources_java += $(FILES_java) 55 56 FILES_compiled_properties= 57 58 # $(BUILDDIR)/sun/text/FILES_java.gmk & $(BUILDDIR)/sun/text/FILES_properties.gmk 59 # contain both resources for Non-European language support 60 61 include $(BUILDDIR)/sun/text/FILES_java.gmk 62 include $(BUILDDIR)/sun/text/FILES_properties.gmk 63 64 NonEuro_Resources_java := $(FILES_java) 65 NonEuro_Resources_properties := $(FILES_compiled_properties) 66 67 # Restore the orignal FILES_java & FILES_compiled_properties variables 68 FILES_java := $(FILES_java_orig) 69 FILES_compiled_properties := $(FILES_compiled_properties_orig) 70 71 LocaleDataMetaInfo_Src=$(SHARE_SRC)/classes/sun/util/LocaleDataMetaInfo-XLocales.java.template 72 LocaleDataMetaInfo_Dest=$(GENSRCDIR)/sun/util/LocaleDataMetaInfo.java 73 LOCALEGEN_SH=localegen.sh 74 RESOURCE_NAMES="FormatData CollationData TimeZoneNames LocaleNames CurrencyNames CalendarData" 75 76 $(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH) 77 @$(RM) $@.tmp.euro $@.tmp.noneuro; 78 @$(prep-target) 79 @$(ECHO) $(subst .properties,'\n',$(Euro_Resources_properties)) > $@.tmp.euro; 80 @$(ECHO) $(subst .java,'\n',$(Euro_Resources_java)) >> $@.tmp.euro; 81 @$(ECHO) $(subst .properties,'\n',$(NonEuro_Resources_properties)) > $@.tmp.noneuro; 82 @$(ECHO) $(subst .java,'\n',$(NonEuro_Resources_java)) >> $@.tmp.noneuro; 83 NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \ 84 $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \ 85 $@.tmp.noneuro $< $@ 86 @$(RM) $@.tmp.euro $@.tmp.noneuro; 87 88 genlocales : $(LocaleDataMetaInfo_Dest) 89 90 clean clobber:: 91 $(RM) $(LocaleDataMetaInfo_Dest) 92