author | zgu |
Wed, 20 Aug 2014 21:37:50 +0000 | |
changeset 26291 | 158000a480bc |
parent 22703 | 322d8adeabe1 |
child 25874 | 83c19f00452c |
permissions | -rw-r--r-- |
14270 | 1 |
# |
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
2 |
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
14270 | 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 |
# This must be the first rule |
|
27 |
default: all |
|
28 |
||
29 |
include $(SPEC) |
|
30 |
include MakeBase.gmk |
|
31 |
include JavaCompilation.gmk |
|
32 |
||
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
33 |
include CommonLangtools.gmk |
14270 | 34 |
|
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
35 |
################################################################################ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
36 |
# Setup the compilation of the properties compilation tool. You can depend |
14270 | 37 |
# upon $(BUILD_TOOLS) to trigger a compilation of the tools. Note that we |
38 |
# add src/share/classes to the sourcepath. This is necessary since the GenStubs |
|
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
39 |
# program needs to be linked and run with the new javac sources. |
20623 | 40 |
$(eval $(call SetupJavaCompilation,BUILD_TOOLS, \ |
41 |
SETUP := BOOT_JAVAC, \ |
|
42 |
DISABLE_SJAVAC := true, \ |
|
43 |
ADD_JAVAC_FLAGS := -Xprefer:source, \ |
|
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
44 |
SRC := $(LANGTOOLS_TOPDIR)/make/tools, \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
45 |
INCLUDES := compileproperties, \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
46 |
BIN := $(LANGTOOLS_OUTPUTDIR)/buildtools_classes)) |
14270 | 47 |
|
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
48 |
################################################################################ |
14270 | 49 |
# The compileprops tools compiles a properties file into a resource bundle. |
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
50 |
TOOL_COMPILEPROPS_CMD := $(JAVA) -cp $(LANGTOOLS_OUTPUTDIR)/buildtools_classes \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
51 |
compileproperties.CompileProperties -quiet |
20623 | 52 |
|
14270 | 53 |
# Lookup the properties that need to be compiled into resource bundles. |
20623 | 54 |
PROPSOURCES := $(shell $(FIND) $(LANGTOOLS_TOPDIR)/src/share/classes -name "*.properties") |
55 |
||
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
56 |
# Strip away prefix and suffix, leaving for example only: |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
57 |
# "com/sun/tools/javac/resources/javac_zh_CN" |
20623 | 58 |
PROPPATHS := $(patsubst $(LANGTOOLS_TOPDIR)/src/share/classes/%.properties, %, $(PROPSOURCES)) |
59 |
||
14270 | 60 |
# Generate the list of java files to be created. |
20623 | 61 |
PROPJAVAS := $(patsubst %, $(LANGTOOLS_OUTPUTDIR)/gensrc/%.java, $(PROPPATHS)) |
62 |
||
14270 | 63 |
# Generate the package dirs for the tobe generated java files. |
20623 | 64 |
PROPDIRS := $(dir $(PROPJAVAS)) |
65 |
||
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
66 |
# Now generate a sequence of: |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
67 |
# "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle" |
14270 | 68 |
# suitable to be fed into the CompileProperties command. |
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
69 |
PROPCMDLINE := $(subst _SPACE_, $(SPACE), \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
70 |
$(join $(addprefix -compile_SPACE_, $(PROPSOURCES)), \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
71 |
$(addsuffix _SPACE_java.util.ListResourceBundle, \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
72 |
$(addprefix _SPACE_$(LANGTOOLS_OUTPUTDIR)/gensrc/, \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
73 |
$(addsuffix .java, $(PROPPATHS)))))) |
14270 | 74 |
|
75 |
# Now setup the rule for the generation of the resource bundles. |
|
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
76 |
$(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props: $(PROPSOURCES) $(BUILD_TOOLS) |
17650
67dcfe192818
8012566: Replace find, rm, printf and similar with their proper variables
erikj
parents:
17555
diff
changeset
|
77 |
$(RM) -r $(@D)/* |
67dcfe192818
8012566: Replace find, rm, printf and similar with their proper variables
erikj
parents:
17555
diff
changeset
|
78 |
$(MKDIR) -p $(@D) $(PROPDIRS) |
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
79 |
$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
80 |
> $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
81 |
$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
82 |
> $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
83 |
$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
84 |
> $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
85 |
$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
86 |
> $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
87 |
$(PRINTF) "jdk=$(JDK_VERSION)\nfull=$(FULL_VERSION)\nrelease=$(RELEASE)\n" \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
88 |
> $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javadoc/resources/version.properties |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
89 |
$(ECHO) Compiling $(words $(PROPSOURCES) javah javap javac jdeps javadoc) \ |
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
90 |
properties into resource bundles |
14270 | 91 |
$(TOOL_COMPILEPROPS_CMD) $(PROPCMDLINE) \ |
20623 | 92 |
-compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.properties \ |
93 |
$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javah/resources/version.java \ |
|
94 |
java.util.ListResourceBundle \ |
|
95 |
-compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.properties \ |
|
96 |
$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javap/resources/version.java \ |
|
97 |
java.util.ListResourceBundle \ |
|
98 |
-compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.properties \ |
|
99 |
$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javac/resources/version.java \ |
|
100 |
java.util.ListResourceBundle \ |
|
101 |
-compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.properties \ |
|
102 |
$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/jdeps/resources/version.java \ |
|
21888
568c5da9f16b
6726154: javadoc generated with incorrect version in comment
kizune
parents:
21887
diff
changeset
|
103 |
java.util.ListResourceBundle \ |
568c5da9f16b
6726154: javadoc generated with incorrect version in comment
kizune
parents:
21887
diff
changeset
|
104 |
-compile $(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javadoc/resources/version.properties \ |
568c5da9f16b
6726154: javadoc generated with incorrect version in comment
kizune
parents:
21887
diff
changeset
|
105 |
$(LANGTOOLS_OUTPUTDIR)/gensrc/com/sun/tools/javadoc/resources/version.java \ |
20623 | 106 |
java.util.ListResourceBundle |
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
107 |
$(TOUCH) $@ |
14270 | 108 |
|
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
109 |
all: $(LANGTOOLS_OUTPUTDIR)/gensrc/_the_props |
14270 | 110 |
|
22703
322d8adeabe1
8026773: Failing compilation in Corba does not fail the build
erikj
parents:
21888
diff
changeset
|
111 |
################################################################################ |