提交 92e6d2d3 编写于 作者: O ohair

7074397: Build infrastructure changes (makefile re-write)

Summary: New makefiles transition, old and new living side by side for now.
Reviewed-by: ohair, jjg, dholmes, ohrstrom, erikj, ihse, tgranat, ykantser
Contributed-by: Nohrstrom &lt;fredrik.ohrstrom@oracle.com&gt;, erikj &lt;erik.joelsson@oracle.com&gt;, ihse &lt;magnus.ihse.bursie@oracle.com&gt;, tgranat &lt;torbjorn.granat@oracle.com&gt;, ykantser <yekaterina.kantserova@oracle.com>
上级 a2ca2b14
......@@ -153,8 +153,8 @@ strip_prop_options_clean:
# Strip the properties files
strip_all_props: $(STRIPPROPERTIES_JARFILE) $(STRIP_PROP_options)
@if [ -s $(STRIP_PROP_options) ] ; then \
$(ECHO) "$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) -optionsfile $(STRIP_PROP_options)" ; \
$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) -optionsfile $(STRIP_PROP_options) ; \
$(ECHO) "$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) @$(STRIP_PROP_options)" ; \
$(BOOT_JAVA_CMD) -jar $(STRIPPROPERTIES_JARFILE) @$(STRIP_PROP_options) ; \
fi
@$(java-vm-cleanup)
......@@ -243,8 +243,8 @@ compile_prop_options_clean:
compile_all_props: $(COMPILEPROPERTIES_JARFILE) $(COMPILE_PROP_options)
@if [ `$(CAT) $(COMPILE_PROP_options) | $(WC) -l` -ge 1 ] ; then \
$(MKDIR) -p $(GENSRCDIR); \
$(ECHO) "$(BOOT_JAVA_CMD) -jar $(COMPILEPROPERTIES_JARFILE) -optionsfile $(COMPILE_PROP_options)";\
$(BOOT_JAVA_CMD) -jar $(COMPILEPROPERTIES_JARFILE) -optionsfile $(COMPILE_PROP_options) ; \
$(ECHO) "$(BOOT_JAVA_CMD) -jar $(COMPILEPROPERTIES_JARFILE) @$(COMPILE_PROP_options)";\
$(BOOT_JAVA_CMD) -jar $(COMPILEPROPERTIES_JARFILE) @$(COMPILE_PROP_options) ; \
$(java-vm-cleanup); \
fi
......
......@@ -90,6 +90,7 @@ public class CompileProperties {
private static String outfiles[] ;
private static String supers[] ;
private static int compileCount = 0;
private static boolean quiet = false;
private static boolean parseOptions(String args[]) {
boolean ok = true;
......@@ -114,21 +115,21 @@ public class CompileProperties {
outfiles[compileCount] = args[++i];
supers[compileCount] = args[++i];
compileCount++;
} else if ( "-optionsfile".equals(args[i]) && i+1 < args.length ) {
String filename = args[++i];
} else if ( args[i].charAt(0) == '@') {
String filename = args[i].substring(1);
FileInputStream finput = null;
byte contents[] = null;
try {
finput = new FileInputStream(filename);
int byteCount = finput.available();
if ( byteCount <= 0 ) {
error("The -optionsfile file is empty", null);
error("The @file is empty", null);
ok = false;
} else {
contents = new byte[byteCount];
int bytesRead = finput.read(contents);
if ( byteCount != bytesRead ) {
error("Cannot read all of -optionsfile file", null);
error("Cannot read all of @file", null);
ok = false;
}
}
......@@ -144,7 +145,7 @@ public class CompileProperties {
error("cannot close " + filename, e);
}
}
if ( ok = true && contents != null ) {
if ( ok && contents != null ) {
String tokens[] = (new String(contents)).split("\\s+");
if ( tokens.length > 0 ) {
ok = parseOptions(tokens);
......@@ -163,6 +164,13 @@ public class CompileProperties {
public static void main(String[] args) {
boolean ok = true;
if (args.length >= 1 && args[0].equals("-quiet"))
{
quiet = true;
String[] newargs = new String[args.length-1];
System.arraycopy(args, 1, newargs, 0, newargs.length);
args = newargs;
}
/* Original usage */
if (args.length == 2 && args[0].charAt(0) != '-' ) {
ok = createFile(args[0], args[1], "ListResourceBundle");
......@@ -197,18 +205,20 @@ public class CompileProperties {
System.err.println("usage:");
System.err.println(" java -jar compileproperties.jar path_to_properties_file path_to_java_output_file [super_class]");
System.err.println(" -OR-");
System.err.println(" java -jar compileproperties.jar {-compile path_to_properties_file path_to_java_output_file super_class} -or- -optionsfile filename");
System.err.println(" java -jar compileproperties.jar {-compile path_to_properties_file path_to_java_output_file super_class} -or- @filename");
System.err.println("");
System.err.println("Example:");
System.err.println(" java -jar compileproperties.jar -compile test.properties test.java ListResourceBundle");
System.err.println(" java -jar compileproperties.jar -optionsfile option_file");
System.err.println(" java -jar compileproperties.jar @option_file");
System.err.println("option_file contains: -compile test.properties test.java ListResourceBundle");
}
private static boolean createFile(String propertiesPath, String outputPath,
String superClass) {
boolean ok = true;
if (!quiet) {
System.out.println("parsing: " + propertiesPath);
}
Properties p = new Properties();
try {
p.load(new FileInputStream(propertiesPath));
......@@ -221,7 +231,9 @@ public class CompileProperties {
}
if ( ok ) {
String packageName = inferPackageName(propertiesPath, outputPath);
if (!quiet) {
System.out.println("inferred package name: " + packageName);
}
List<String> sortedKeys = new ArrayList<>();
for ( Object key : p.keySet() ) {
sortedKeys.add((String)key);
......@@ -276,8 +288,10 @@ public class CompileProperties {
error("IO error close " + outputPath, e);
}
}
if (!quiet) {
System.out.println("wrote: " + outputPath);
}
}
return ok;
}
......
package build.tools.generatecharacter;
import java.util.regex.*;
import java.util.*;
import java.io.*;
......
......@@ -36,6 +36,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
......@@ -53,82 +54,89 @@ public class StripProperties {
}
}
private static List<String> parseOptions(String args[]) {
List<String> files = new ArrayList<String>();
private static List<String> infiles = new ArrayList<String>();
private static List<String> outfiles = new ArrayList<String>();
private static boolean parseOptions(String args[]) {
boolean ok = true;
for ( int i = 0; i < args.length ; i++ ) {
if ( "-optionsfile".equals(args[i]) && i+1 < args.length ) {
String filename = args[++i];
if ( "-clean".equals(args[i]) && i+2 < args.length ) {
infiles.add(args[++i]);
outfiles.add(args[++i]);
} else if ( args[i].charAt(0)=='@') {
String filename = args[i].substring(1);
FileInputStream finput = null;
byte contents[] = null;
try {
finput = new FileInputStream(filename);
int byteCount = finput.available();
if ( byteCount <= 0 ) {
error("The -optionsfile file is empty", null);
files = null;
error("The @file is empty", null);
ok = false;
} else {
contents = new byte[byteCount];
int bytesRead = finput.read(contents);
if ( byteCount != bytesRead ) {
error("Cannot read all of -optionsfile file", null);
files = null;
error("Cannot read all of @file", null);
ok = false;
}
}
} catch ( IOException e ) {
error("cannot open " + filename, e);
files = null;
ok = false;
}
if ( finput != null ) {
try {
finput.close();
} catch ( IOException e ) {
files = null;
ok = false;
error("cannot close " + filename, e);
}
}
if ( files != null && contents != null ) {
if ( ok && contents != null ) {
String tokens[] = (new String(contents)).split("\\s+");
if ( tokens.length > 0 ) {
List<String> ofiles = parseOptions(tokens);
if ( ofiles != null ) {
files.addAll(ofiles);
} else {
error("No files found in file", null);
files = null;
}
ok = parseOptions(tokens);
}
}
if ( files == null ) {
if ( !ok ) {
break;
}
} else {
files.add(args[i]);
infiles.add(args[i]);
outfiles.add(args[i]);
}
}
return files;
return ok;
}
private static boolean stripFiles(List<String> files) {
private static boolean stripFiles(List<String> infiles, List<String> outfiles) {
boolean ok = true;
for ( String file : files ) {
Iterator<String> inIter = infiles.iterator();
Iterator<String> outIter = outfiles.iterator();
for (; inIter.hasNext(); ) {
String infile = inIter.next();
String outfile = outIter.next();
Properties prop = new Properties();
InputStream in = null;
try {
in = new BufferedInputStream(new FileInputStream(file));
in = new BufferedInputStream(new FileInputStream(infile));
prop.load(in);
} catch ( FileNotFoundException e ) {
error("Cannot access file " + file, e);
error("Cannot access file " + infile, e);
ok = false;
} catch ( IOException e ) {
error("IO exception processing file " + file, e);
error("IO exception processing file " + infile, e);
ok = false;
}
if ( in != null ) {
try {
in.close();
} catch ( IOException e ) {
error("IO exception closing file " + file, e);
error("IO exception closing file " + infile, e);
ok = false;
}
}
......@@ -138,18 +146,18 @@ public class StripProperties {
OutputStream out = null;
try {
out = new FileOutputStream(file);
out = new FileOutputStream(outfile);
storeProperties(prop, out);
out.flush();
} catch ( IOException e ) {
error("IO exception processing file " + file, e);
error("IO exception processing file " + outfile, e);
ok = false;
}
if ( out != null ) {
try {
out.close();
} catch ( IOException e ) {
error("IO exception closing file " + file, e);
error("IO exception closing file " + outfile, e);
ok = false;
}
}
......@@ -166,8 +174,8 @@ public class StripProperties {
* @param args Names of properties files to process and replace contents
*/
public static void main(String args[]) {
List<String> files = parseOptions(args);
if ( files == null || !stripFiles(files) ) {
boolean ok = parseOptions(args);
if ( !ok || !stripFiles(infiles, outfiles) ) {
System.exit(1);
}
}
......
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include NativeCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
# Append demo goals to this variable.
BUILD_DEMOS=
# The demo structure and contents should really be cleaned up.
# Now every other demo has its own quirks where to put the
# READMEs and other files.
##################################################################################################
define SetupAppletDemo
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1,\
SETUP:=GENERATE_USINGJDKBYTECODE$2,\
SRC:=$(JDK_TOPDIR)/src/$3share/demo/applets/$1,\
BIN:=$(JDK_OUTPUTDIR)/newdemo/applets/$1,\
COPY:=.html .java .xyz .obj .au .gif))
BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
endef
$(eval $(call SetupAppletDemo,ArcTest))
$(eval $(call SetupAppletDemo,BarChart))
$(eval $(call SetupAppletDemo,Blink))
$(eval $(call SetupAppletDemo,CardTest))
$(eval $(call SetupAppletDemo,Clock))
$(eval $(call SetupAppletDemo,DitherTest))
$(eval $(call SetupAppletDemo,DrawTest))
$(eval $(call SetupAppletDemo,Fractal))
$(eval $(call SetupAppletDemo,GraphicsTest))
$(eval $(call SetupAppletDemo,MoleculeViewer))
$(eval $(call SetupAppletDemo,NervousText))
$(eval $(call SetupAppletDemo,SimpleGraph))
$(eval $(call SetupAppletDemo,SortDemo))
$(eval $(call SetupAppletDemo,SpreadSheet))
# Build WireFrame without a server since it
# has a class Matrix3D that also exists in MoleculeViewer.
$(eval $(call SetupAppletDemo,WireFrame,_NOSERV))
ifndef OPENJDK
$(eval $(call SetupAppletDemo,Animator,,closed/))
$(eval $(call SetupAppletDemo,GraphLayout,_NOSERV,closed/))
$(eval $(call SetupAppletDemo,JumpingBox,,closed/))
$(eval $(call SetupAppletDemo,TicTacToe,,closed/))
endif
##################################################################################################
PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf
define SetupDemo
# Param 1 = Name of the demo
# Param 2 = Subdirectory of the demo below the demo directory.
# Param 3 = Additional javac flags.
# Param 4 = The main class for the jar.
# Param 5 = Additional source directory.
# Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed)
# Param 7 = List of files to copy
# Param 8 = Base name of jar file. Defaults to $1
# Param 9 = Exclude list
# Param 10 = Extra copy patterns
# Param 11 = Extra manifest attribute
# Param 12 = Suffix for compiler setup name
# In some demos the source is found in a subdir called src.
$1_MAIN_SRC:=$$(wildcard $(JDK_TOPDIR)/src/$6share/demo/$2/$1/src)
ifeq ($$($1_MAIN_SRC),)
$1_MAIN_SRC:=$(JDK_TOPDIR)/src/$6share/demo/$2/$1
endif
ifneq ($8,)
$1_JARFILE := $8.jar
else
$1_JARFILE := $1.jar
endif
# Compile java classes if there are any.
$1_JAVA_FILES_EXIST := $$(shell $$(FIND) $$($1_MAIN_SRC) -name "*.java")
ifneq ($$($1_JAVA_FILES_EXIST),)
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_$1,\
SETUP:=GENERATE_USINGJDKBYTECODE$(12),\
ADD_JAVAC_FLAGS:=$3,\
SRC:=$$($1_MAIN_SRC) $5,\
BIN:=$(JDK_OUTPUTDIR)/newdemoclasses/$2/$1,\
COPY:=$(PATTERNS_TO_COPY) $(10),\
JAR:=$(JDK_OUTPUTDIR)/newdemo/$2/$1/$$($1_JARFILE),\
JARMAIN:=$4,\
MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf,\
EXTRA_MANIFEST_ATTR:=$(11),\
SRCZIP:=$(JDK_OUTPUTDIR)/newdemo/$2/$1/src.zip,\
EXCLUDE_FILES:=$9))
BUILD_DEMOS += $$(BUILD_DEMO_$1) \
$(JDK_OUTPUTDIR)/newdemo/$2/$1/$$($1_JARFILE) \
$(JDK_OUTPUTDIR)/newdemo/$2/$1/src.zip
endif
# Copy files.
$1_COPY_TARGETS := $$(patsubst $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%,\
$(JDK_OUTPUTDIR)/newdemo/$2/$1/%,\
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/,$7)))
ifneq ($7,)
$(JDK_OUTPUTDIR)/newdemo/$2/$1/% : $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%
mkdir -p $$(@D)
cp $$< $$@
chmod -f ug+w $$@
BUILD_DEMOS += $$($1_COPY_TARGETS)
endif
endef
$(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html))
$(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/_the.services : \
$(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/CodePointIM.jar \
$(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
(cd $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM && \
$(MKDIR) -p _the.tmp/META-INF/services && \
$(CP) $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
cd _the.tmp && \
$(JAR) uf $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
cd META-INF/services && \
$(JAR) uf $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor)
$(RM) -r $(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/_the.tmp
touch $@
BUILD_DEMOS+=$(JDK_OUTPUTDIR)/newdemo/jfc/CodePointIM/_the.services
$(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*))
$(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt))
$(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*))
$(eval $(call SetupDemo,Notepad,jfc,,Notepad,,,README*))
$(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*))
$(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html))
$(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*))
$(eval $(call SetupDemo,TransparentRuler,jfc,,transparentruler.Ruler,,,README*))
$(eval $(call SetupDemo,jconsole-plugin,scripting,-cp $(JDK_OUTPUTDIR)/lib/jconsole.jar,,,,*.xml *.txt))
$(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*))
$(eval $(call SetupDemo,JTop,management,-cp $(JDK_OUTPUTDIR)/lib/jconsole.jar,JTop,,,README*))
$(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*))
$(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*))
$(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java))
ifndef OPENJDK
$(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*))
$(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*))
$(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo))
$(eval $(call SetupDemo,Stylepad,jfc,,Stylepad,\
$(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt))
$(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT,\
SplashScreen-Image: resources/images/splash.png,_NOSERV))
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%,\
$(JDK_OUTPUTDIR)/newdemo/nbproject/%,\
$(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/demo/nbproject/ -type f))
$(JDK_OUTPUTDIR)/newdemo/nbproject/% : $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%
mkdir -p $(@D)
cp $< $@
chmod -f ug+w $@
endif
##################################################################################################
# Why do we install a demo jar into the main jre/lib/ext????????????????
$(JDK_OUTPUTDIR)/lib/ext/zipfs.jar : $(JDK_OUTPUTDIR)/newdemo/nio/zipfs/zipfs.jar
$(MKDIR) -p $(@D)
$(CP) $< $@
BUILD_DEMOS += $(JDK_OUTPUTDIR)/lib/ext/zipfs.jar
##################################################################################################
# In the old makefiles, j2dbench was not compiled.
#$(eval $(call SetupDemo,J2DBench,java2d,/src,,j2dbench/J2DBench))
define SetupJVMTIDemo
# Param 1 = Name of the demo
# Param 2 = add these directories to the includes, default is agent_util
# Param 3 = extra CFLAGS
# Param 4 = C or C++ (defaults to C)
# Param 5 = libs for posix
# Param 6 = libs for winapi
# Param 7 = libs for solaris
BUILD_DEMO_JVMTI_$1_EXTRA_SRC:= $$(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/demo/jvmti/$1) \
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2))
BUILD_DEMO_JVMTI_$1_EXTRA_INC:=$$(addprefix -I,$$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
BUILD_DEMO_JVMTI_$1_LANG:=C
BUILD_DEMO_JVMTI_$1_O_FLAG:=$(C_O_FLAG_NORM)
ifneq (,$4)
BUILD_DEMO_JVMTI_$1_LANG:=$4
endif
ifeq (C++,$4)
$1_EXTRA_CXX:=$(LIBCXX)
BUILD_DEMO_JVMTI_$1_O_FLAG:=$(CXX_O_FLAG_NORM)
endif
$$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1,\
SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
LANG:=$$(BUILD_DEMO_JVMTI_$1_LANG),\
CFLAGS:=$(CFLAGS_JDKLIB) $$(BUILD_DEMO_JVMTI_$1_O_FLAG) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3,\
LDFLAGS:=$(LDFLAGS_JDKLIB),\
LDFLAGS_SUFFIX:=$$($1_EXTRA_CXX),\
LDFLAGS_SUFFIX_posix:=$5,\
LDFLAGS_SUFFIX_winapi:=$6,\
LDFLAGS_SUFFIX_solaris:=-lc $7,\
BIN:=$(JDK_OUTPUTDIR)/newdemoobjs/jvmti/$1,\
LIB:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/lib/$(LIBRARY_PREFIX)$1$(SHARED_LIBRARY_SUFFIX)))
$$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1,\
SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
ZIP:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/src.zip))
$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/README.txt : $(JDK_TOPDIR)/src/share/demo/jvmti/$1/README.txt
$(MKDIR) -p $$(@D)
$(CP) $$< $$@
$(CHMOD) -f ug+w $$@
ifneq (,$$(wildcard $(JDK_TOPDIR)/src/share/demo/jvmti/$1/*.java))
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA,\
SETUP:=GENERATE_USINGJDKBYTECODE,\
SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1,\
BIN:=$(JDK_OUTPUTDIR)/newdemoclasses/jvmti/$1,\
COPY:=$(PATTERNS_TO_COPY),\
JAR:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/$1.jar,\
JARMAIN:=,\
MANIFEST:=$(JDK_TOPDIR)/make/tools/manifest.mf))
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jvmti/$1/$1.jar
endif
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jvmti/$1/lib/$(LIBRARY_PREFIX)$1$(SHARED_LIBRARY_SUFFIX) \
$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/src.zip \
$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/README.txt
endef
$(eval $(call SetupJVMTIDemo,compiledMethodLoad, agent_util))
$(eval $(call SetupJVMTIDemo,gctest, agent_util))
$(eval $(call SetupJVMTIDemo,heapTracker, agent_util java_crw_demo))
$(eval $(call SetupJVMTIDemo,heapViewer, agent_util))
# hprof contains error messages using __FILE__ macro. These expand to the absolute path
# in the new build system and relative in the old, causing the binaries to differ.
$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo,\
-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt,C,\
-ldl,ws2_32.lib winmm.lib,-lsocket -lnsl))
$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo))
$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo))
$(eval $(call SetupJVMTIDemo,waiters, agent_util,,C++))
$(eval $(call SetupJVMTIDemo,versionCheck, agent_util))
##################################################################################################
# The jpda demo (com/sun/tools/example) is oddly enough stored in src/share/classes.
# At least, we do not need to compile the jpda demo, just jar/zip up the sources.
JPDA_SOURCES:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example -type f)
# The number of files are few enough so that we can use echo safely below to list them.
JPDA_FILES:=$(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES))
$(JDK_OUTPUTDIR)/newdemo/jpda/src.zip : $(JPDA_SOURCES)
mkdir -p $(@D)
(cd $(JDK_TOPDIR)/src/share/classes && $(ZIP) -qru $@ com -i "com/sun/tools/example/*")
$(JDK_OUTPUTDIR)/newdemo/jpda/examples.jar : $(JPDA_SOURCES)
mkdir -p $(@D)
$(RM) $(@D)/_the.sources
$(call ListPathsSafely,JPDA_FILES,\n, >> $(@D)/_the.sources)
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/tools/manifest.mf > $(@D)/_the.manifest
$(ECHO) "Main-Class: " >> $(@D)/_the.manifest
(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm $@ $(@D)/_the.manifest @$(@D)/_the.sources)
(cd $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example && $(JAR) uf $@ README)
$(JDK_OUTPUTDIR)/newdemo/jpda/com/sun/tools/example/README : $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example/README
mkdir -p $(@D)
$(CP) $< $@
$(CHMOD) -f ug+w $@
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jpda/src.zip $(JDK_OUTPUTDIR)/newdemo/jpda/examples.jar \
$(JDK_OUTPUTDIR)/newdemo/jpda/com/sun/tools/example/README
##################################################################################################
$(JDK_OUTPUTDIR)/newdemo/management/index.html : $(JDK_TOPDIR)/src/share/demo/management/index.html
mkdir -p $(@D)
$(CP) $< $@
$(CHMOD) -f ug+w $@
$(JDK_OUTPUTDIR)/newdemo/jvmti/index.html : $(JDK_TOPDIR)/src/share/demo/jvmti/index.html
mkdir -p $(@D)
$(CP) $< $@
$(CHMOD) -f ug+w $@
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/management/index.html \
$(JDK_OUTPUTDIR)/newdemo/jvmti/index.html
##################################################################################################
# The netbeans project files are copied into the demo directory.
NETBEANS_DEMO_PROJECTS_FILES=$(shell $(FIND) $(JDK_TOPDIR)/src/share/demo/nbproject -type f)
$(JDK_OUTPUTDIR)/newdemo/_the.nbproject: $(NETBEANS_DEMO_PROJECTS_FILES)
$(MKDIR) -p $(JDK_OUTPUTDIR)/newdemo
$(RM) -rf $(JDK_OUTPUTDIR)/newdemo/nbproject
echo Copying Netbeans demo projects
(cd $(JDK_TOPDIR)/src/share/demo && cp -r nbproject $(JDK_OUTPUTDIR)/newdemo)
touch $@
##################################################################################################
$(JDK_OUTPUTDIR)/newdemo/README : $(JDK_TOPDIR)/src/share/demo/README
mkdir -p $(@D)
cp $< $@
##################################################################################################
all: $(BUILD_DEMOS) $(JDK_OUTPUTDIR)/newdemo/_the.nbproject $(JDK_OUTPUTDIR)/newdemo/README
.PHONY: all
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
EXCLUDES:= sun/dc \
sun/security/pkcs11 \
com/sun/pept \
com/sun/tools/example/trace\
com/sun/tools/example/debug/bdi\
com/sun/tools/example/debug/event\
com/sun/tools/example/debug/gui \
javax/crypto \
com/oracle/security
ifdef OPENJDK
EXCLUDES+= com/sun/jmx/snmp \
sun/management/snmp \
com/sun/script
endif
ifneq ($(PLATFORM),solaris)
# Exclude Solaris nio and two security related files in src/share/classes
EXFILES:=SolarisAclFileAttributeView.java \
SolarisFileStore.java \
SolarisFileSystem.java \
SolarisFileSystemProvider.java \
SolarisNativeDispatcher.java \
SolarisUserDefinedFileAttributeView.java \
SolarisWatchService.java \
DevPollArrayWrapper.java \
DevPollSelectorImpl.java \
DevPollSelectorProvider.java \
SolarisAsynchronousChannelProvider.java \
SolarisEventPort.java \
SolarisAclFileAttributeView.java \
SolarisFileStore.java \
SolarisFileSystem.java \
SolarisFileSystemProvider.java \
SolarisUserDefinedFileAttributeView.java \
SolarisNativeDispatcher.java \
SolarisWatchService.java \
SolarisLoginModule.java \
SolarisSystem.java \
sun/tools/attach/SolarisAttachProvider.java \
sun/tools/attach/SolarisVirtualMachine.java
endif
# Why?
EXFILES+=WrapperGenerator.java
ifneq ($(PLATFORM),windows)
# Exclude Window security related files in src/share/classes
EXFILES+=NTLoginModule.java \
NTSystem.java
endif
ifeq ($(PLATFORM),windows)
# Does nio channels exist on Windows?
EXCLUDES+=sun/nio/ch
endif
ifneq ($(PLATFORM),linux)
EXCLUDES+=com/sun/java/swing/plaf/gtk
EXFILES+=sun/tools/attach/LinuxAttachProvider.java \
sun/tools/attach/LinuxVirtualMachine.java
endif
ifneq ($(PLATFORM),macosx)
EXFILES+=sun/nio/fs/BsdFileStore.java \
sun/nio/fs/BsdFileSystem.java \
sun/nio/fs/BsdFileSystemProvider.java \
sun/nio/fs/BsdNativeDispatcher.java \
sun/tools/attach/BsdAttachProvider.java \
sun/tools/attach/BsdVirtualMachine.java
endif
# Generated nimbus files that apparently should not be compiled...
EXFILES+=InternalFrameTitlePanePainter.java \
OptionPaneMessageAreaPainter.java \
ScrollBarPainter.java \
SliderPainter.java \
SpinnerPainter.java \
SplitPanePainter.java \
TabbedPanePainter.java
# New class /java/lang/annotation/ContainerAnnotation.java is not included in old
# build
EXFILES+=java/lang/annotation/ContainerAnnotation.java
# Exclude BreakIterator classes that are just used in compile process to generate
# data files and shouldn't go in the product
EXFILES+=sun/text/resources/BreakIteratorRules.java \
sun/text/resources/BreakIteratorRules_th.java
# TODO: Add BUILD_HEADLESS_ONLY to configure?
ifdef BUILD_HEADLESS_ONLY
EXCLUDES+=sun/applet
endif
ifdef OPENJDK
EXCLUDES+=sun/java2d/cmm/kcms
else
EXCLUDES+=sun/java2d/cmm/lcms
endif
# Not used on windows
ifneq ($(PLATFORM), windows)
EXFILES+=sun/awt/AWTCharset.java
endif
# Exclude some generated AWT files that were implicitly not included by the old build.
EXFILES+=sun/awt/X11/ScreenFormat.java \
sun/awt/X11/XArc.java \
sun/awt/X11/XChar2b.java \
sun/awt/X11/XCharStruct.java \
sun/awt/X11/XClassHint.java \
sun/awt/X11/XComposeStatus.java \
sun/awt/X11/XExtCodes.java \
sun/awt/X11/XFontProp.java \
sun/awt/X11/XFontSetExtents.java \
sun/awt/X11/XFontStruct.java \
sun/awt/X11/XGCValues.java \
sun/awt/X11/XHostAddress.java \
sun/awt/X11/XIMCallback.java \
sun/awt/X11/XIMHotKeyTrigger.java \
sun/awt/X11/XIMHotKeyTriggers.java \
sun/awt/X11/XIMPreeditCaretCallbackStruct.java \
sun/awt/X11/XIMPreeditDrawCallbackStruct.java \
sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \
sun/awt/X11/XIMStatusDrawCallbackStruct.java \
sun/awt/X11/XIMStringConversionCallbackStruct.java \
sun/awt/X11/XIMStringConversionText.java \
sun/awt/X11/XIMStyles.java \
sun/awt/X11/XIMText.java \
sun/awt/X11/XIMValuesList.java \
sun/awt/X11/XImage.java \
sun/awt/X11/XKeyboardControl.java \
sun/awt/X11/XKeyboardState.java \
sun/awt/X11/XOMCharSetList.java \
sun/awt/X11/XOMFontInfo.java \
sun/awt/X11/XOMOrientation.java \
sun/awt/X11/XPoint.java \
sun/awt/X11/XRectangle.java \
sun/awt/X11/XSegment.java \
sun/awt/X11/XStandardColormap.java \
sun/awt/X11/XTextItem.java \
sun/awt/X11/XTextItem16.java \
sun/awt/X11/XTextProperty.java \
sun/awt/X11/XTimeCoord.java \
sun/awt/X11/XWindowChanges.java \
sun/awt/X11/XdbeSwapInfo.java \
sun/awt/X11/XmbTextItem.java \
sun/awt/X11/XwcTextItem.java
# Exclude sun/security files that should go in a separate jar
EXFILES+=sun/security/ec/ECDHKeyAgreement.java \
sun/security/ec/ECDSASignature.java \
sun/security/ec/ECKeyPairGenerator.java \
sun/security/ec/SunEC$1.java \
sun/security/ec/SunEC.java \
sun/security/ec/SunECEntries.java
# Exclude another implicitly not included file.
EXFILES+=sun/util/locale/AsciiUtil.java
ifeq ($(PLATFORM), linux)
EXFILES+=sun/nio/fs/PollingWatchService.java
endif
# TODO: Fix when converting NIO
# Exclude *-linux-arm.java and *-linux-ppc.java from closed.
EXFILES+=-linux-arm.java \
-linux-ppc.java
# TODO: Is this necessary?
ifeq ($(PLATFORM), windows)
EXFILES+=sun/net/sdp/SdpProvider.java
else
EXFILES+=sun/net/www/protocol/http/ntlm/NTLMAuthSequence.java
endif
# Acquire a list of files that should be copied straight over to the classes.
include CopyIntoClasses.gmk
# Now we have COPY_PATTERNS, COPY_FILES and COPY_EXTRA
ifndef OPENJDK
CLOSED_SRC_DIRS:=$(JDK_TOPDIR)/src/closed/share/classes \
$(JDK_TOPDIR)/src/closed/$(LEGACY_HOST_OS_API)/classes
endif
$(eval $(call SetupJavaCompilation,BUILD_JDK,\
SETUP:=GENERATE_JDKBYTECODE,\
SRC:=$(JDK_TOPDIR)/src/share/classes \
$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes \
$(JDK_OUTPUTDIR)/gensrc \
$(CLOSED_SRC_DIRS),\
EXCLUDES:=$(EXCLUDES),\
EXCLUDE_FILES:=$(EXFILES),\
BIN:=$(JDK_OUTPUTDIR)/newclasses,\
COPY:=$(COPY_PATTERNS),\
COPY_FILES:=$(COPY_FILES),\
JAR:=$(JDK_OUTPUTDIR)/newrt.jar,\
HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers))
# copy with -a to preserve timestamps so dependencies down the line aren't messed up
all: $(BUILD_JDK) $(JDK_OUTPUTDIR)/newrt.jar $(COPY_EXTRA)
(cd $(JDK_OUTPUTDIR); \
$(CP) -rp newclasses/* classes; \
$(FIND) classes -name "_the.*" $(FIND_DELETE); \
$(TOUCH) $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin)
.PHONY: all
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
defalt: all
include $(SPEC)
include MakeBase.gmk
include NativeCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
BUILD_LAUNCHERS=
define SetupLauncher
# TODO: Fix mapfile on solaris. Won't work with ld as linker.
# Parameter 1 is the name of the launcher (java,javac,jar...)
# Parameter 2 are extra CFLAGS
# Parameter 3 are extra LDFLAGS
# Parameter 4 are extra LDFLAGS_SUFFIX_posix
# Parameter 5 are extra LDFLAGS_SUFFIX_winapi
$(call SetupNativeCompilation,BUILD_LAUNCHER_$1,\
SRC:=$(JDK_TOPDIR)/src/share/bin,\
INCLUDE_FILES:=main.c,\
LANG:=C,\
CFLAGS:=$(CFLAGS_JDKEXE) $(C_O_FLAG_NORM) \
-I$(JDK_TOPDIR)/src/share/bin \
-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin \
-I$(JDK_TOPDIR)/src/$(PLATFORM)/bin \
-DFULL_VERSION='"$(FULL_VERSION)"' \
-DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-DLIBARCHNAME='"$(ARCH)"' \
-DLAUNCHER_NAME='"openjdk"' \
-DPROGNAME='"$1"' $(DPACKAGEPATH) \
$2,\
CFLAGS_linux:=-fPIC,\
LDFLAGS:=$(LDFLAGS_JDKEXE) \
$(call SET_SHARED_LIBRARY_ORIGIN,../lib/$(LIBARCH)/jli) \
$(call SET_SHARED_LIBRARY_ORIGIN,../jre/lib/$(LIBARCH)/jli) \
$3,\
LDFLAGS_linux:=$(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/launchers/mapfile-$(ARCH)),\
LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX),\
LDFLAGS_SUFFIX_posix:=$4 -lc,\
LDFLAGS_SUFFIX_winapi:=$5,\
BIN:=$(JDK_OUTPUTDIR)/newobjs/$1_objs,\
EXE:=$(JDK_OUTPUTDIR)/newobjs/$1$(EXE_SUFFIX),\
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
RC_FLAGS:=$(RC_FLAGS)\
/D "JDK_FNAME=$1$(EXE_SUFFIX)" \
/D "JDK_INTERNAL_NAME=$1" \
/D "JDK_FTYPE=0x1L")
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/newobjs/$1$(EXE_SUFFIX) $(JDK_OUTPUTDIR)/bin/$1$(EXE_SUFFIX)
endef
##########################################################################################
XLIBS:=-lX11
ifeq ($(PLATFORM),macosx)
DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"'
XLIBS:=
endif
$(eval $(call SetupLauncher,java,\
-DEXPAND_CLASSPATH_WILDCARDS))
ifeq ($(PLATFORM),solaris)
THREAD_LIB:=-lthread
endif
ifeq ($(PLATFORM),linux)
THREAD_LIB:=-lpthread
endif
ifndef BUILD_HEADLESS_ONLY
$(eval $(call SetupLauncher,appletviewer,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',,\
$(THREAD_LIB) $(XLIBS) -ldl))
endif
$(eval $(call SetupLauncher,extcheck,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,idlj,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.corba.se.idl.toJavaPortable.Compile"$(COMMA) }'))
$(eval $(call SetupLauncher,jar,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jarsigner,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.JarSigner"$(COMMA) }'))
$(eval $(call SetupLauncher,javac,\
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,javadoc,\
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,javah,\
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javah.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,javap,\
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }'))
BUILD_LAUNCHER_jconsole_CPPFLAGS_windows:=-DJAVAW
BUILD_LAUNCHER_jconsole_LDFLAGS_windows:=user32.lib
$(eval $(call SetupLauncher,jconsole,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
$(eval $(call SetupLauncher,jdb,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
$(eval $(call SetupLauncher,jhat,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jinfo,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
"sun.tools.jinfo.JInfo"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
$(eval $(call SetupLauncher,jmap,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
"sun.tools.jmap.JMap"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
$(eval $(call SetupLauncher,jps,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jps.Jps"$(COMMA) }'))
$(eval $(call SetupLauncher,jrunscript,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jsadebugd,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.jvm.hotspot.jdi.SADebugServer"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
$(eval $(call SetupLauncher,jstack,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
"sun.tools.jstack.JStack"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
$(eval $(call SetupLauncher,jstat,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstat.Jstat"$(COMMA) }'))
$(eval $(call SetupLauncher,jstatd,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }'))
$(eval $(call SetupLauncher,keytool,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.KeyTool"$(COMMA) }'))
$(eval $(call SetupLauncher,native2ascii,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
ifndef BUILD_HEADLESS_ONLY
$(eval $(call SetupLauncher,policytool,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }'))
endif
$(eval $(call SetupLauncher,rmic,\
-DEXPAND_CLASSPATH_WILDCARDS \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,schemagen,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.jxc.SchemaGenerator"$(COMMA) }'))
$(eval $(call SetupLauncher,serialver,\
-DEXPAND_CLASSPATH_WILDCARDS \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }'))
$(eval $(call SetupLauncher,xjc,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }'))
$(eval $(call SetupLauncher,wsgen,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsGen"$(COMMA) }'))
$(eval $(call SetupLauncher,wsimport,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }'))
$(eval $(call SetupLauncher,orbd,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
"-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
"com.sun.corba.se.impl.activation.ORBD"$(COMMA) }'))
$(eval $(call SetupLauncher,servertool,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.corba.se.impl.activation.ServerTool"$(COMMA) }'))
$(eval $(call SetupLauncher,tnameserv,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
"-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
$(eval $(call SetupLauncher,pack200,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) "--pack" }'))
$(eval $(call SetupLauncher,rmid,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }'))
$(eval $(call SetupLauncher,rmiregistry,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
$(eval $(call SetupLauncher,jcmd,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
ifeq ($(PLATFORM),windows)
$(eval $(call SetupLauncher,kinit,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
$(eval $(call SetupLauncher,klist,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }'))
$(eval $(call SetupLauncher,ktab,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
endif
##########################################################################################
# The order of the object files on the link command line affects the size of the resulting
# binary (at least on linux) which causes the size to differ between old and new build.
UNPACKEXE_ZIPOBJS = $(JDK_OUTPUTDIR)/newobjs/libzip/zcrc32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/newobjs/libzip/deflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/newobjs/libzip/trees$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/newobjs/libzip/zadler32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/newobjs/libzip/compress$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/newobjs/libzip/zutil$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/newobjs/libzip/inflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/newobjs/libzip/infback$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/newobjs/libzip/inftrees$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/newobjs/libzip/inffast$(OBJ_SUFFIX)
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\
SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
EXCLUDE_FILES:=jni.cpp,\
LANG:=C++,\
CFLAGS:=$(CXXFLAGS_JDKEXE) $(CXX_O_FLAG_NORM) \
-DFULL \
-I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\
CFLAGS_release:=-DPRODUCT,\
CFLAGS_linux:=-fPIC,\
LDFLAGS:=$(LDFLAGS_JDKEXE) \
$(call SET_SHARED_LIBRARY_MAPFILE,makefiles/mapfiles/libunpack/mapfile-vers-unpack200) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX:=$(UNPACKEXE_ZIPOBJS) $(LIBCXX),\
LDFLAGS_SUFFIX_solaris:=-lc,\
BIN:=$(JDK_OUTPUTDIR)/newobjs/unpackexe,\
EXE:=$(JDK_OUTPUTDIR)/newobjs/unpack200$(EXE_SUFFIX),\
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
RC_FLAGS:=$(RC_FLAGS)\
/D "JDK_FNAME=unpack200.exe" \
/D "JDK_INTERNAL_NAME=unpack200" \
/D "JDK_FTYPE=0x1L"))
$(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX): $(UNPACKEXE_ZIPOBJS)
ifeq ($(HOST_OS_API),winapi)
UNPACK_MANIFEST:=$(JDK_OUTPUTDIR)/newobjs/unpackexe/unpack200.exe.manifest
IMVERSIONVALUE=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VERSION).$(COOKED_BUILD_NUMBER)
SED_ALL_MANIFEST=$(SED) -e 's%IMVERSION%$(IMVERSIONVALUE)%g'
$(UNPACK_MANIFEST): $(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest
$(CAT) $< | $(SED_ALL_MANIFEST) > $@
# Adding a dependency to spec file might be a good idea here, to force rerun on version change.
$(JDK_OUTPUTDIR)/newobjs/unpackexe/unpack200.exe.manifest.mt: $(UNPACK_MANIFEST)
$(MT) /manifest $< /outputresource:$(JDK_OUTPUTDIR)/newobjs/unpack200$(EXE_SUFFIX);#1
touch $@
$(JDK_OUTPUTDIR)/newobjs/unpackexe/unpack200.exe.manifest.mt: $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX)
endif
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX)
##########################################################################################
#
# The java-rmi.cgi script in bin/ only gets delivered in certain situations
#
JAVA_RMI_CGI:=$(JDK_OUTPUTDIR)/bin/java-rmi.cgi
ifeq ($(PLATFORM), linux)
BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
endif
ifeq ($(PLATFORM), solaris)
ifeq ($(ARCH_DATA_MODEL), 32)
BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
endif
endif
# TODO:
# On windows java-rmi.cgi shouldn't be bundled since Java 1.2, but has been built all
# this time anyway. Since jdk6, it has been built from the wrong source and resulted
# in a copy of the standard java launcher named "java-rmi.exe" ending up in the final
# images bin dir. This weird behavior is mimicked here in the converted makefiles for
# now. Should probably just be deleted.
# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052
ifeq ($(HOST_OS_API),winapi)
$(eval $(call SetupLauncher,java-rmi,\
-DEXPAND_CLASSPATH_WILDCARDS,\
$(call SET_SHARED_LIBRARY_MAPFILE,makefiles/java/main/java/mapfile-$(ARCH))))
$(JAVA_RMI_CGI): $(JDK_OUTPUTDIR)/newobjs/java-rmi$(EXE_SUFFIX)
$(CP) $< $@
BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
else
$(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh
$(CP) $< $@
$(CHMOD) a+x $@
endif
##########################################################################################
$(JDK_OUTPUTDIR)/bin/% : $(JDK_OUTPUTDIR)/newobjs/%
echo Copying $(@F)
$(CP) $< $@
$(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
all: $(BUILD_LAUNCHERS)
.PHONY: all
此差异已折叠。
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
INCLUDEDIR = $(JDK_OUTPUTDIR)/include
# TODO: Platform dir needs to be "win32" on windows /erikj
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM)
#
# Copy exported header files to outputdir.
#
H_TARGET_FILES =$(INCLUDEDIR)/jdwpTransport.h \
$(INCLUDEDIR)/jni.h \
$(INCLUDEDIR)/jvmti.h \
$(INCLUDEDIR)/jvmticmlr.h \
$(INCLUDEDIR)/classfile_constants.h \
$(INCLUDEDIR)/jawt.h \
$(PLATFORM_INCLUDE)/jni_md.h \
$(PLATFORM_INCLUDE)/jawt_md.h
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
$(PLATFORM_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/javavm/export/%.h
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
COPY_FILES = $(H_TARGET_FILES)
##########################################################################################
LIBDIR = $(JDK_OUTPUTDIR)/lib
SERVICETAG_LIBDIR = $(LIBDIR)/servicetag
$(SERVICETAG_LIBDIR)/jdk_header.png: $(JDK_TOPDIR)/src/share/classes/com/sun/servicetag/resources/jdk_header.png
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
$(CHMOD) 444 $@
COPY_FILES += $(SERVICETAG_LIBDIR)/jdk_header.png
##########################################################################################
MGMT_LIBDIR = $(LIBDIR)/management
MGMT_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/management
MGMT_SRC_FILES = $(wildcard $(MGMT_LIB_SRC)/*)
MGMT_TARGET_FILES = $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))
$(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
$(CHMOD) 644 $@
$(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
$(CHMOD) 444 $@
COPY_FILES += $(MGMT_TARGET_FILES)
##########################################################################################
LOGGING_LIB_SRC = $(JDK_TOPDIR)/src/share/lib
$(LIBDIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
COPY_FILES += $(LIBDIR)/logging.properties
##########################################################################################
#
# Copy property files from sun/print to LIBDIR
#
PSFONTPROPFILE_SRC_DIR = $(JDK_TOPDIR)/src/share/classes/sun/print
PSFONTPROPFILE_SRCS = $(wildcard $(PSFONTPROPFILE_SRC_DIR)/*.properties*)
PSFONTPROPFILE_TARGET_FILES = $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIBDIR),$(PSFONTPROPFILE_SRCS))
$(PSFONTPROPFILE_TARGET_FILES): $(PSFONTPROPFILE_SRCS)
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
COPY_FILES += $(PSFONTPROPFILE_TARGET_FILES)
##########################################################################################
#
# Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR
#
PLATFORM_LIB_SRC = $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
$(LIBDIR)/flavormap.properties: $(PLATFORM_LIB_SRC)/flavormap.properties
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
COPY_FILES += $(LIBDIR)/flavormap.properties
CURSORS_DEST_DIR = $(LIBDIR)/images/cursors
CURSORS_PLATFORM_LIB_SRC = $(PLATFORM_LIB_SRC)/images/cursors
$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_PLATFORM_LIB_SRC)/cursors.properties
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
COPY_FILES += $(CURSORS_DEST_DIR)/cursors.properties
CURSORS_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/images/cursors
ifeq ($(PLATFORM), windows)
CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
else # PLATFORM
CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
endif # PLATFORM
CURSORS_TARGET_FILES = $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
$(CURSORS_TARGET_FILES): $(CURSORS_SRC_FILES)
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
COPY_FILES += $(CURSORS_TARGET_FILES)
##########################################################################################
CONTENT_TYPES_SRC=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
$(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
COPY_FILES += $(LIBDIR)/content-types.properties
##########################################################################################
ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm
ifdef OPENJDK
ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
else
ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
endif
ICCPROFILE_SRCS:=$(wildcard $(ICCPROFILE_SRC_DIR)/*.pf)
ICCPROFILE_TARGET_FILES:=$(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
$(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
$(CHMOD) 444 $@
COPY_FILES += $(ICCPROFILE_TARGET_FILES)
##########################################################################################
#make sure freetype dll will be available at runtime as well as link time
#
#NB: Default freetype build system uses -h linker option and
# result .so contains hardcoded library name that is later
# used for adding dependencies to other objects
# (e.g. libfontmanager.so).
#
# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
# without overcomplicating logic here.
# To workaround this we hardcode .6 suffix for now.
#
# Note that .so.6 library will not be found by System.loadLibrary()
# but fortunately we need to load FreeType library explicitly
# on windows only
#
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifdef OPENJDK
ifeq ($(PLATFORM), windows)
FREETYPE_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
else
ifeq ($(USING_SYSTEM_FT_LIB), false)
FREETYPE_LIB = $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/$(call SHARED_LIBRARY,freetype).6
endif
endif
$(FREETYPE_LIB):
$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
COPY_FILES += $(FREETYPE_LIB)
endif
##########################################################################################
# Copy msvcr100.dll on windows
ifeq ($(PLATFORM),windows)
MSVCRNN_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCRNN_DLL))
$(MSVCRNN_TARGET): $(MSVCRNN_DLL)
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
COPY_FILES += $(MSVCRNN_TARGET)
endif
##########################################################################################
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Copy icu and _dict files used by the text break iterator
COPY_PATTERNS = .icu _dict
# Copy config files for com.sun.org.apache.xml.internal.security
XMLSECURITY_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource
COPY_FILES += \
$(XMLSECURITY_RESOURCEDIR)/config.dtd \
$(XMLSECURITY_RESOURCEDIR)/config.xml
# Copy sun/tools related files into the classes directory.
# Extra jstat files
JSTAT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/sun/tools/jstat/resources
COPY_FILES += \
$(JSTAT_RESOURCEDIR)/jstat_options \
$(JSTAT_RESOURCEDIR)/jstat_unsupported_options
# Extra jhat files
JHAT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/com/sun/tools/hat/resources
COPY_FILES += \
$(JHAT_RESOURCEDIR)/hat.js \
$(JHAT_RESOURCEDIR)/oqlhelp.html \
$(JHAT_RESOURCEDIR)/platform_names.txt
# Extra jrunscript files
JRUNSCRIPT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/com/sun/tools/script/shell
COPY_FILES += \
$(JRUNSCRIPT_RESOURCEDIR)/init.js \
$(JRUNSCRIPT_RESOURCEDIR)/messages.properties
# Extra jvmstat files
COPY_FILES += \
$(JDK_TOPDIR)/src/share/classes/sun/jvmstat/perfdata/resources/aliasmap
# Servicetag resources
SERVICETAG_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/servicetag/resources
COPY_FILES += \
$(SERVICETAG_RESOURCES_DIR)/product_registration.xsd \
$(SERVICETAG_RESOURCES_DIR)/register.html \
$(SERVICETAG_RESOURCES_DIR)/register_ja.html \
$(SERVICETAG_RESOURCES_DIR)/register_zh_CN.html \
$(wildcard $(SERVICETAG_RESOURCES_DIR)/javase_*.properties)
# JConsole resources
JCONSOLE_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources
COPY_FILES += \
$(wildcard $(JCONSOLE_RESOURCES_DIR)/*.png) \
$(wildcard $(JCONSOLE_RESOURCES_DIR)/*.gif)
# Print resources
PRINT_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/sun/print/resources
COPY_FILES += \
$(wildcard $(PRINT_RESOURCES_DIR)/*.png)
# IDN resources
COPY_FILES += \
$(JDK_TOPDIR)/src/share/classes/sun/net/idn/uidna.spp
##########################################################################################
#
# Copy the META-INF/services configuration files that are scattered around the source tree
# into classes/META-INF/services. Be aware that META-INF directories that are located at a
# source root (.../classes/META-INF) are automatically copied verbatim by the
# SetupJavaCompilation macro.
#
# Any other META-INF/services configuration file is found here and platform specific comments
# are uncommented and the configuration file is stored in the output META-INF directory.
# Make sure the output directory is created.
$(shell $(MKDIR) -p $(JDK_OUTPUTDIR)/newclasses/META-INF/services)
# Find all META-INF/services/* files
ALL_META-INF_DIRS_share:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
ALL_META-INF_DIRS_hostapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes -type d -a -name META-INF)
# Platform specific overrides shared
ifneq ($(ALL_META-INF_DIRS_hostapi),)
ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_hostapi) \
$(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes%,%,$(ALL_META-INF_DIRS_hostapi)),\
$(ALL_META-INF_DIRS_share))
else
ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_share)
endif
# Filter out META-INF dirs that shouldn't be included
ALL_META-INF_DIRS:=$(filter-out %sun/nio/cs/ext/META-INF,$(ALL_META-INF_DIRS))
ifdef OPENJDK
ALL_META-INF_DIRS:=$(filter-out %com/sun/script/javascript/META-INF,$(ALL_META-INF_DIRS))
endif
SRC_SERVICES_FILES:=$(wildcard $(addsuffix /services/*,$(ALL_META-INF_DIRS)))
ifdef OPENJDK
SRC_SERVICES_FILES:=$(filter-out %sun/dc/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES))
SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.PCMM,$(SRC_SERVICES_FILES))
else
SRC_SERVICES_FILES:=$(filter-out %sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES))
SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.PCMM,$(SRC_SERVICES_FILES))
endif
# The number of services files are relatively few. If the increase in numbers, then
# we have to use ListPathsSafelyNow here.
# Change $(JDK_TOPDIR)/src/.../META-INF/services/yyyy into $(JDK_OUTPUTDIR)/newclasses/META-INF/services/yyyy
# The \n in the printf command is needed to make sed work on Solaris.
OUT_SERVICES_FILES:=$(addprefix $(JDK_OUTPUTDIR)/newclasses/META-INF/services/,\
$(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g'))
OUT_SERVICES_FILES_COLON:=$(addsuffix :,$(OUT_SERVICES_FILES))
# Exception handling for print services with no META-INF directory
SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/print/services/*)
OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/newclasses/META-INF/services/,\
$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/print/services/%,%,\
$(SRC_SERVICES_FILES_PRINT)))
OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :,$(OUT_SERVICES_FILES_PRINT))
RULES_SERVICES_PRINT = $(join $(OUT_SERVICES_FILES_PRINT_COLON),$(SRC_SERVICES_FILES_PRINT))
# Now setup the dependency rules to generate a META-INF/services/... from the correct source.
META-INF_RULES_SERVICES:=$(RULES_SERVICES_PRINT) $(join $(OUT_SERVICES_FILES_COLON),$(SRC_SERVICES_FILES))
# Eval the newly created rules to incorporate them into the make tree.
define addto_meta-inf_services
$1
echo Installing META-INF/services/$$(@F)
$(CAT) $$< | $(SED) -e "s/^#\[$(PLATFORM)\]//" > $$@
endef
$(foreach i,$(META-INF_RULES_SERVICES),$(eval $(call addto_meta-inf_services,$i)))
# Here is the generic rule, whose receipt the above rules will trigger.
COPY_EXTRA += $(OUT_SERVICES_FILES)
COPY_EXTRA += $(OUT_SERVICES_FILES_PRINT)
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
SAMPLE_TARGET_DIR = $(JDK_OUTPUTDIR)/sample
SAMPLE_SOURCE_DIR = $(JDK_TOPDIR)/src/share/sample
SAMPLE_CLOSED_SOURCE_DIR = $(JDK_TOPDIR)/src/closed/share/sample
SAMPLE_SOLARIS_SOURCE_DIR = $(JDK_TOPDIR)/src/solaris/sample
# Exclude the vm directory
SAMPLE_FIND_FILTER = -name vm -prune -o
SAMPLE_SOURCE := $(shell $(FIND) $(SAMPLE_SOURCE_DIR) $(SAMPLE_FIND_FILTER) -type f -print)
SAMPLE_TARGET := $(subst $(SAMPLE_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOURCE))
ifndef OPENJDK
# Exclude Main.java in EbayClient dir
SAMPLE_CLOSED_SOURCE := $(shell $(FIND) $(SAMPLE_CLOSED_SOURCE_DIR) -type f -print | $(GREP) -v EbayClient/Main.java)
SAMPLE_CLOSED_TARGET := $(subst $(SAMPLE_CLOSED_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_CLOSED_SOURCE))
SAMPLE_TARGET += $(SAMPLE_CLOSED_TARGET)
endif
ifeq ($(PLATFORM),solaris)
SAMPLE_SOLARIS_SOURCE := $(shell $(FIND) $(SAMPLE_SOLARIS_SOURCE_DIR) -type f -print)
SAMPLE_SOLARIS_TARGET := $(subst $(SAMPLE_SOLARIS_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOLARIS_SOURCE))
SAMPLE_TARGET += $(SAMPLE_SOLARIS_TARGET)
endif
$(SAMPLE_TARGET_DIR)/dtrace/%: $(SAMPLE_SOLARIS_SOURCE_DIR)/dtrace/%
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
$(SAMPLE_TARGET_DIR)/webservices/%: $(SAMPLE_CLOSED_SOURCE_DIR)/webservices/%
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
$(SAMPLE_TARGET_DIR)/%: $(SAMPLE_SOURCE_DIR)/%
$(MKDIR) -p $(@D)
rm -f $@
$(CP) $< $@
COPY_FILES += $(SAMPLE_TARGET)
all: $(COPY_FILES)
.PHONY: all
#
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Make file for generating BreakIterator data files.
#
# input
#
# Notes: sun.text.resources.BreakIteratorRules no longer goes to runtime.
# They are used at JDK build phase in order to create $(BIFILES) which
# are used on runtime instead.
#
TEXT_SRCDIR = $(JDK_TOPDIR)/src/share/classes
TEXT_PKG = sun/text/resources
TEXT_SOURCES = %$(TEXT_PKG)/BreakIteratorRules.java \
%$(TEXT_PKG)/BreakIteratorInfo.java \
%$(TEXT_PKG)/BreakIteratorRules_th.java \
%$(TEXT_PKG)/BreakIteratorInfo_th.java
# Generate BreakIteratorData
BREAK_ITERATOR_DIR = $(JDK_OUTPUTDIR)/break_iterator
BREAK_ITERATOR_CLASSES = $(BREAK_ITERATOR_DIR)/classes
# JAVAC_SOURCE_PATH_UGLY_OVERRIDE is set to isolate the compile to just those
# two files in that directory and not get anything implicit from
# surrounding directories which aren't jdk 6 compatible.
# Because we are targeting jdk 6, but the surrounding source code is jdk 7. Ugh.
# These two files should be moved out to a build tool!
$(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR,\
SETUP:=GENERATE_OLDBYTECODE,\
SRC:=$(TEXT_SRCDIR),\
JAVAC_SOURCE_PATH_UGLY_OVERRIDE:=$(TEXT_SRCDIR)/$(TEXT_PKG),\
INCLUDES:=$(TEXT_PKG),\
INCLUDE_FILES:=$(TEXT_SOURCES),\
BIN:=$(BREAK_ITERATOR_CLASSES)))
# Generate data resource files.
# input
UNICODEDATA = $(JDK_TOPDIR)/make/tools/UnicodeData/UnicodeData.txt
# output
DATA_PKG_DIR = $(JDK_OUTPUTDIR)/newclasses/sun/text/resources
BIFILES = $(DATA_PKG_DIR)/CharacterBreakIteratorData \
$(DATA_PKG_DIR)/WordBreakIteratorData \
$(DATA_PKG_DIR)/LineBreakIteratorData \
$(DATA_PKG_DIR)/SentenceBreakIteratorData
BIFILES_TH = $(DATA_PKG_DIR)/WordBreakIteratorData_th \
$(DATA_PKG_DIR)/LineBreakIteratorData_th
$(BIFILES): $(BREAK_ITERATOR_DIR)/_the.bifiles
$(BREAK_ITERATOR_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
$(BREAK_ITERATOR_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
$(ECHO) "Generating BreakIteratorData"
$(MKDIR) -p $(DATA_PKG_DIR)
rm -f $(BIFILES)
$(TOOL_GENERATEBREAKITERATORDATA) \
-o $(DATA_PKG_DIR) \
-spec $(UNICODEDATA)
touch $@
$(BIFILES_TH): $(BREAK_ITERATOR_DIR)/_the.bifiles_th
$(BREAK_ITERATOR_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
$(BREAK_ITERATOR_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
$(ECHO) "Generating BreakIteratorData_th"
$(MKDIR) -p $(DATA_PKG_DIR)
rm -f $(BIFILES_TH)
$(TOOL_GENERATEBREAKITERATORDATA) \
-o $(DATA_PKG_DIR) \
-spec $(UNICODEDATA) \
-language th
touch $@
BREAK_ITERATOR += $(BIFILES) $(BIFILES_TH)
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include RMICompile.gmk
CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
# Depend on files in newclasses for now to avoid bad dependency handling caused by
# copy always updating timestamps in classes.
NEWCLASSES_DIR := $(JDK_OUTPUTDIR)/newclasses
# Generate classes into separate dir for now. Can't drop in same dir as JavaCompilation
# macros as that will mess up recompile deps.
STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/newrmicclasses
RMIC_GENSRC_DIR := $(JDK_OUTPUTDIR)/gendocsrc_rmic
GENCLASSES :=
##########################################################################################
#
# Generate RMI stubs
#
$(eval $(call SetupRMICompilation,RMI_12,\
CLASSES:=sun.rmi.server.Activation$$$$ActivationSystemImpl\
java.rmi.activation.ActivationGroup\
com.sun.jndi.rmi.registry.ReferenceWrapper,\
CLASSES_DIR:=$(NEWCLASSES_DIR),\
STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
RUN_V12:=true))
GENCLASSES += $(RMI_12)
$(eval $(call SetupRMICompilation,RMI_11,\
CLASSES:=sun.rmi.registry.RegistryImpl\
sun.rmi.transport.DGCImpl,\
CLASSES_DIR:=$(NEWCLASSES_DIR),\
STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
RUN_V11:=true))
GENCLASSES += $(RMI_11)
# For RMI/IIOP call rmic a second time with -standardPackage option
# so that *_tie classes are generated in package without the prefix
# org.omg.stub (6375696)
JMAN_RMI_CLASSES:=javax.management.remote.rmi.RMIConnectionImpl\
javax.management.remote.rmi.RMIServerImpl
$(eval $(call SetupRMICompilation,RMI_IIOP,\
CLASSES:=$(JMAN_RMI_CLASSES),\
CLASSES_DIR:=$(NEWCLASSES_DIR),\
STUB_CLASSES_DIR:=$(STUB_CLASSES_DIR),\
RUN_V12:=true,\
RUN_IIOP:=true,\
RUN_IIOP_STDPKG:=true))
GENCLASSES += $(RMI_IIOP)
# Keep generated RMI/JRMP Stub source files and copy them to RMIC_GENSRC_DIR
# so that javadoc can include them in the API (4997471)
$(eval $(call SetupRMICompilation,RMI_SRC,\
CLASSES:=$(JMAN_RMI_CLASSES),\
CLASSES_DIR:=$(NEWCLASSES_DIR),\
STUB_CLASSES_DIR:=$(RMIC_GENSRC_DIR),\
RUN_V12:=true,\
KEEP_GENERATED:=true))
GENCLASSES += $(filter %.java,$(RMI_SRC))
##########################################################################################
all: $(GENCLASSES)
$(FIND) $(RMIC_GENSRC_DIR) -name "*.class" $(FIND_DELETE)
$(CP) -rp $(STUB_CLASSES_DIR)/* $(CLASSES_DIR)
.PHONY: all
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
# We need the tools.
include Tools.gmk
# Now include all the rules that generate data resources.
# These are written directly into newclasses dir.
include GendataBreakIterator.gmk
GENDATA += $(BREAK_ITERATOR)
##########################################################################################
$(GENDATA) : $(BUILD_TOOLS)
all: $(GENDATA)
.PHONY: all
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include NativeCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
# We need the tools.
include Tools.gmk
# Now include all the rules that generate Java sources.
# The Java sources are written into the gensrc_.... directories.
include GensrcProperties.gmk
GENSRC += $(GENSRC_PROPERTIES)
include GensrcLocaleDataMetaInfo.gmk
GENSRC += $(GENSRC_LOCALEDATAMETAINFO)
include GensrcCharacterData.gmk
GENSRC += $(GENSRC_CHARACTERDATA)
include GensrcJDWP.gmk
GENSRC += $(GENSRC_JDWP)
include GensrcMisc.gmk
GENSRC += $(GENSRC_MISC)
$(GENSRC) : $(BUILD_TOOLS)
all: $(GENSRC)
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc
(cd $(JDK_OUTPUTDIR) && \
chmod -R u+rw gensrc && \
cp -rp gensrc_characterdata/* gensrc && \
cp -rp gensrc_properties/* gensrc && \
cp -rp gensrc_localedatametainfo/* gensrc && \
cp -rp gensrc_jdwp/* gensrc && \
cp -rp gensrc_misc/* gensrc)
.PHONY: all
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Rules to create $(JDK_OUTPUTDIR)/gensrc_characterdata/sun/lang/CharacterData*.java
#
GENSRC_CHARACTERDATA:=
CHARACTERDATA = $(JDK_TOPDIR)/make/tools/GenerateCharacter
UNICODEDATA = $(JDK_TOPDIR)/make/tools/UnicodeData
define SetupCharacterData
$(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/$1.java : $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS)
mkdir -p $$(@D)
echo Generating $1.java
$(TOOL_GENERATECHARACTER) $2 \
-template $(CHARACTERDATA)/$1.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
-proplist $(UNICODEDATA)/PropList.txt \
-o $(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/$1.java -string \
-usecharforbyte $3
GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/$1.java
endef
$(eval $(call SetupCharacterData,CharacterDataLatin1,,-latin1 8))
$(eval $(call SetupCharacterData,CharacterData00,-plane 0,11 4 1))
$(eval $(call SetupCharacterData,CharacterData01,-plane 1,11 4 1))
$(eval $(call SetupCharacterData,CharacterData02,-plane 2,11 4 1))
$(eval $(call SetupCharacterData,CharacterData0E,-plane 14,11 4 1))
# Copy two Java files that need no preprocessing.
$(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/%.java : $(CHARACTERDATA)/%.java.template
$(MKDIR) -p $(@D)
echo Generating $(@F)
$(CP) -f $< $@
GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/CharacterDataUndefined.java \
$(JDK_OUTPUTDIR)/gensrc_characterdata/java/lang/CharacterDataPrivateUse.java
$(GENSRC_CHARACTERDATA) : $(BUILD_TOOLS)
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Translate the Java debugger wire protocol (jdwp.spec) file into a JDWP.java file
# and a JDWPCommands.h C-header file.
$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
$(JDK_OUTPUTDIR)/gensrc_jdwp/com/sun/tools/jdi/JDWP.java : $(JDK_TOPDIR)/makefiles/jpda/jdwp/jdwp.spec
mkdir -p $(@D)
mkdir -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
$(ECHO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
$(TOOL_JDWPGEN) $< -jdi $@ -include $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
GENSRC_JDWP:= $(JDK_OUTPUTDIR)/gensrc_jdwp/com/sun/tools/jdi/JDWP.java \
$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Scan for all locale resources and extract for which locales there exists
# resources. Then put this meta information about exiting (supported?) locales
# into LocaleDataMetaInfo.java
# First go look for all locale files
LOCALE_FILES:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes \
-name "FormatData_*.java" -o -name "FormatData_*.properties" -o \
-name "CollationData_*.java" -o -name "CollationData_*.properties" -o \
-name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \
-name "LocaleNames_*.java" -o -name "LocaleNames_*.properties" -o \
-name "CurrencyNames_*.java" -o -name "CurrencyNames_*.properties" -o \
-name "CalendarData_*.java" -o -name "CalendarData_*.properties")
# Then translate the locale files into for example: FormatData_sv
LOCALE_RESOURCES:=$(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
# Include the list of resources found during the previous compile.
-include $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/_the.locale_resources
MISSING_RESOURCES:=$(filter-out $(LOCALE_RESOURCES),$(PREV_LOCALE_RESOURCES))
NEW_RESOURCES:=$(filter-out $(PREV_LOCALE_RESOURCES),$(LOCALE_RESOURCES))
ifneq (,$(MISSING_RESOURCES)$(NEW_RESOURCES))
# There is a difference in the number of supported resources. Trigger a regeneration.
$(shell $(RM) $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java)
endif
# The non-euro zone locales have to be separated from the euro-zone locales.
NON_EURO_LOCALES:=ar% hi% iw% ja% ko% th% vi% zh%
# This macro creates a sed expression that substitues for example:
# #FormatData_EuroLocales# with: be be_BY bg bg_BG ca ca_ES... and some more.
CAPTURE_LOCALE='s/$$(HASH)$1_$2EuroLocales$$(HASH)/ $$($3 $(NON_EURO_LOCALES),$$(filter-out $1,$$(subst $1_,,$$(filter $1_%,$(LOCALE_RESOURCES)))))/g'
SED_ARGS:=-e 's|$(HASH)warn This file is preprocessed before being compiled|// -- This file was mechanically generated: Do not edit! -- //|g'
#sun.text.resources.FormatData
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,FormatData,,filter-out))
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,FormatData,Non,filter))
#sun.text.resources.CollationData
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CollationData,,filter-out))
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CollationData,Non,filter))
#sun.util.resources.TimeZoneNames
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,TimeZoneNames,,filter-out))
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,TimeZoneNames,Non,filter))
#sun.util.resources.LocaleNames
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,LocaleNames,,filter-out))
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,LocaleNames,Non,filter))
#sun.util.resources.CurrencyNames
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CurrencyNames,,filter-out))
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CurrencyNames,Non,filter))
#sun.util.resources.CalendarData
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CalendarData,,filter-out))
$(eval SED_ARGS+=-e $(call CAPTURE_LOCALE,CalendarData,Non,filter))
$(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java: \
$(JDK_TOPDIR)/src/share/classes/sun/util/LocaleDataMetaInfo-XLocales.java.template
mkdir -p $(@D)
$(ECHO) Creating sun/util/LocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/_the.locale_resources
$(SED) $(SED_ARGS) $(JDK_TOPDIR)/src/share/classes/sun/util/LocaleDataMetaInfo-XLocales.java.template \
> $(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java
GENSRC_LOCALEDATAMETAINFO:=$(JDK_OUTPUTDIR)/gensrc_localedatametainfo/sun/util/LocaleDataMetaInfo.java
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
##########################################################################################
# Install the launcher name, release version string, full version
# string and the runtime name into the Version.java file.
# To be printed by java -version
$(JDK_OUTPUTDIR)/gensrc_misc/sun/misc/Version.java: \
$(JDK_TOPDIR)/src/share/classes/sun/misc/Version.java.template
$(MKDIR) -p $(@D)
echo Generating sun/misc/Version.java
$(SED) -e 's/@@launcher_name@@/$(LAUNCHER_NAME)/g' \
-e 's/@@java_version@@/$(RELEASE)/g' \
-e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \
-e 's/@@java_runtime_name@@/$(RUNTIME_NAME)/g' \
$< > $@
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/misc/Version.java
##########################################################################################
# Version file for jconsole
$(JDK_OUTPUTDIR)/gensrc_misc/sun/tools/jconsole/Version.java: \
$(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/Version.java.template
$(MKDIR) -p $(@D)
echo Generating sun/tools/jconsole/Version.java
$(SED) -e 's/@@jconsole_version@@/$(FULL_VERSION)/g' $< > $@
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/tools/jconsole/Version.java
##########################################################################################
ifeq ($(HOST_OS_API),posix)
UPSUFFIX:=$(PLATFORM)
ifeq ($(PLATFORM),macosx)
UPSUFFIX:=bsd
endif
# UNIXProcess.java is different for solaris and linux. We need to copy
# the correct UNIXProcess.java over to $(JDK_OUTPUTDIR)/gensrc/java/lang/.
$(JDK_OUTPUTDIR)/gensrc_misc/java/lang/UNIXProcess.java : \
$(JDK_TOPDIR)/src/solaris/classes/java/lang/UNIXProcess.java.$(UPSUFFIX)
$(MKDIR) -p $(@D)
echo Copying UNIXProcess.java.$(PLATFORM) to java/lang/UNIXProcess.java
$(CP) $< $@
$(CHMOD) u+rw $@
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/java/lang/UNIXProcess.java
endif
##########################################################################################
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# All .properties files to be compiled are appended to this variable.
ALL_COMPILED_PROPSOURCES:=
# All generated .java files from compilation are appended to this variable.
ALL_COMPILED_PROPJAVAS:=
# The (very long) command line for compilation, stored in a file, prior to use.
COMPILE_PROPCMDLINE:=
# All .properties files to be cleaned are appended to this variable.
ALL_CLEANED_PROPSOURCES:=
# All generated cleaned .properties files from cleaning are appended to this variable.
ALL_CLEANED_PROPOUTPUT:=
# The (very long) command line for cleaning, stored in a file, prior to use.
CLEAN_PROPCMDLINE:=
define add_properties_to_compile
# $1 is the name of the properties group
# $2 is the files belonging to this group
# $3 is the super class for the generated java file.
# $4 is a from pattern for translating stripped name from source to target
# $5 is the to pattern replacing $3 in the target
# Strip away prefix and suffix,
# leaving for example: sun/util/resources/CurrencyNames_sv
$1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/%.properties,%,\
$$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties,%,$2))
# Apply optional name transformation, example: hz_TW -> hz_HK
$(if $4,$1_PROPPATHS:=$$(patsubst $4,$5,$$($1_PROPPATHS)))
# Accumulate all found properties files.
ALL_COMPILED_PROPSOURCES+=$2
# Generate the list of to be created java files.
ALL_COMPILED_PROPJAVAS+=$$(patsubst %,$(JDK_OUTPUTDIR)/gensrc_properties/%.java,$$($1_PROPPATHS))
# Now generate a sequence of "-compile ...CurrencyNames_sv.properties ...CurrencyNames_sv.java ListResourceBundle"
# suitable to be fed into the CompileProperties command.
COMPILE_PROPCMDLINE+=$$(subst _SPACE_,$(SPACE),$$(join $$(addprefix -compile_SPACE_,$2), \
$$(addsuffix _SPACE_$(strip $3),\
$$(addprefix _SPACE_$(JDK_OUTPUTDIR)/gensrc_properties/,\
$$(addsuffix .java,$$($1_PROPPATHS))))))
endef
define add_properties_to_clean
# $1 is the name of the properties group
# $2 is the files belonging to this group
# $3 is a from pattern for translating stripped name from source to target
# $4 is the to pattern replacing $3 in the target
# $5 optional name of extra directory to put properties files in (ex: resources)
# Strip away prefix and suffix,
# leaving for example: sun/util/resources/CurrencyNames_sv
$1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/%.properties,%,\
$$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties,%,$2))
# Apply optional name transformation, example: hz_TW -> hz_HK
$(if $3,$1_PROPPATHS:=$$(patsubst $3,$4,$$($1_PROPPATHS)))
# Accumulate all found properties files.
ALL_CLEANED_PROPSOURCES+=$2
# Generate the list of to be created java files.
$1_PROPOUTPUT:=$$(patsubst %,$(JDK_OUTPUTDIR)/newclasses/%.properties,$$($1_PROPPATHS))
# If the properties target file isn't in a "resources" dir, add one.
ifneq ($5,)
$1_PROPOUTPUT:=$$(foreach p,$$($1_PROPOUTPUT), $$(dir $$p)$5/$$(notdir $$p))
endif
ALL_CLEANED_PROPOUTPUT+=$$($1_PROPOUTPUT)
# Now generate a sequence of "-clean ...[src]...CurrencyNames_sv.properties ...[build]...CurrencyNames_sv.properties"
# suitable to be fed into the StripProperties command.
CLEAN_PROPCMDLINE+=$$(subst _SPACE_,$(SPACE),$$(join $$(addprefix -clean_SPACE_,$2), \
$$(addprefix _SPACE_,$$($1_PROPOUTPUT))))
endef
# Some packages contain pregenerated java files instead of properties files.
# But unfortunately not all properties should be converted, some should be
# copied....argggghhh.
# For example:
# sun/applet/resources
# sun/misc/resources
# sun/text/resources
# sun/tools/jconsole/resources
# sun/tools/native2ascii/resources
# sun/util/resources
# Some packages have properties that need to be converted to java source files.
#com/sun/accessibility/internal/resources
$(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources -name "*.properties"),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources -name "*.properties"),\
ListResourceBundle,%zh_TW,%zh_HK))
#com/sun/imageio/plugins/common
#com/sun/java/swing/plaf/gtk/resources
#com/sun/java/swing/plaf/motif/resources
#com/sun/java/swing/plaf/windows/resources
#com/sun/java/util/jar/pack
$(eval $(call add_properties_to_clean,JNDI_COSNAMING,\
$(JDK_TOPDIR)/src/share/classes/com/sun/java/util/jar/pack/intrinsic.properties))
#com/sun/jndi/cosnaming
$(eval $(call add_properties_to_clean,JNDI_COSNAMING,\
$(JDK_TOPDIR)/src/share/classes/com/sun/jndi/cosnaming/jndiprovider.properties))
#com/sun/jndi/ldap
$(eval $(call add_properties_to_clean,JNDI_COSNAMING,\
$(JDK_TOPDIR)/src/share/classes/com/sun/jndi/ldap/jndiprovider.properties))
#com/sun/org/apache/xml/internal/security/resource
#FIXME: The "xmlsecurity*.properties" pattern is not ideal; we might want to find
#a better way to select the properties files that are needed.
$(eval $(call add_properties_to_clean,XML_SECURITY,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/org/apache/xml/internal/security/resource -name "xmlsecurity*.properties")))
#com/sun/rowset
$(eval $(call add_properties_to_clean,COM_SUN_ROWSET,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/rowset -name "*.properties")))
$(eval $(call add_properties_to_clean,COM_SUN_ROWSET_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/rowset -name "*zh_TW.properties"),\
%zh_TW,%zh_HK))
#com/sun/servicetag/resources
#com/sun/swing/internal/plaf/basic/resources
#com/sun/swing/internal/plaf/metal/resources
#com/sun/swing/internal/plaf/synth/resources
#com/sun/tools/jdi/resources
$(eval $(call add_properties_to_compile,COM_SUN_TOOLS_JDI,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/tools/jdi/resources -name "*.properties"),\
ListResourceBundle))
#com/sun/tools/script/shell
#java/util
#javax/sql/rowset
#sun/awt/resources
$(eval $(call add_properties_to_compile,SUN_AWT,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/awt/resources -name "*.properties"),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_AWT_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/awt/resources -name "*.properties"),\
ListResourceBundle,%zh_TW,%zh_HK))
#sun/launcher/resources
$(eval $(call add_properties_to_compile,SUN_LAUNCHER,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/launcher/resources -name "*.properties"),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_LAUNCHER_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/launcher/resources -name "*.properties"),\
ListResourceBundle,%zh_TW,%zh_HK))
#sun/management/resources
#sun/print
#sun/print/resources
$(eval $(call add_properties_to_compile,SUN_PRINT,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/print/resources -name "*.properties"),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_PRINT_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/print/resources -name "*.properties"),\
ListResourceBundle,%zh_TW,%zh_HK))
#sun/rmi/registry/resources
$(eval $(call add_properties_to_clean,SUN_RMI_REGISTRY,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources -name "*.properties")))
$(eval $(call add_properties_to_clean,SUN_RMI_REGISTRY_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/rmi/registry/resources -name "*zh_TW.properties"),\
%zh_TW,%zh_HK))
#sun/rmi/rmic/resources
$(eval $(call add_properties_to_clean,SUN_RMI_RMIC,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/rmi/rmic/resources -name "*.properties")))
#sun/rmi/server/resources
$(eval $(call add_properties_to_clean,SUN_RMI_SERVER,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources -name "*.properties")))
$(eval $(call add_properties_to_clean,SUN_RMI_SERVER_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/rmi/server/resources -name "*zh_TW.properties"),\
%zh_TW,%zh_HK))
# sun/tools/jar/resources
$(eval $(call add_properties_to_compile,SUN_TOOLS_JAR,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources -name "*.properties"),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_TOOLS_JAR_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources -name "*.properties"),\
ListResourceBundle,%zh_TW,%zh_HK))
#sun/tools/javac/resources
# It's unclear if the other localized property files here are supposed to be copied or not
# but the old build system didn't copy them.
$(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/javac/resources -name "javac.properties")))
#sun/tools/serialver
$(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/serialver -name "*.properties"),,,resources))
#sun/util/logging/resources
$(eval $(call add_properties_to_compile,SUN_UTIL_LOGGING,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources -name "*.properties"),\
ListResourceBundle))
$(eval $(call add_properties_to_compile,SUN_UTIL_LOGGING_HK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources -name "*.properties"),\
ListResourceBundle,%zh_TW,%zh_HK))
# sun/util/resources
$(eval $(call add_properties_to_compile,SUN_UTIL,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/util/resources -name "*.properties"),\
LocaleNamesBundle))
# Now setup the rule for the generation of the resource bundles.
$(JDK_OUTPUTDIR)/gensrc_properties/_the.compiled_properties : $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS)
$(RM) -rf $(JDK_OUTPUTDIR)/gensrc_properties/*
# Generate all output directories in advance since the build tool does not do that...
$(MKDIR) -p $(sort $(dir $(ALL_COMPILED_PROPJAVAS)))
echo Compiling $(words $(ALL_COMPILED_PROPSOURCES)) properties into resource bundles
$(call ListPathsSafely,COMPILE_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/gensrc_properties/_the.cmdline)
$(TOOL_COMPILEPROPERTIES) -quiet @$(JDK_OUTPUTDIR)/gensrc_properties/_the.cmdline
touch $@
# Now setup the rule for the generation of the cleaned properties.
# FIXME: We currently don't handle removed properties incrementally.
$(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties : $(ALL_CLEANED_PROPSOURCES) $(BUILD_TOOLS)
$(RM) -f $(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties.cmdline
# Generate all output directories in advance since the build tool does not do that...
$(MKDIR) -p $(sort $(dir $(ALL_CLEANED_PROPOUTPUT)))
echo Copying and cleaning $(words $(ALL_CLEANED_PROPSOURCES)) properties
$(call ListPathsSafely,CLEAN_PROPCMDLINE,\n, >> $(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties.cmdline)
$(TOOL_STRIPPROPERTIES) @$(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties.cmdline
touch $@
$(ALL_COMPILED_PROPJAVAS) : $(JDK_OUTPUTDIR)/gensrc_properties/_the.compiled_properties
$(ALL_CLEANED_PROPOUTPUT) : $(JDK_OUTPUTDIR)/newclasses/_the.cleaned_properties
# Some zh_HK resources are just copied of zh_TW
$(JDK_OUTPUTDIR)/gensrc_properties/%_zh_HK.java: $(JDK_TOPDIR)/src/share/classes/%_zh_TW.java
$(MKDIR) -p $(@D)
$(CAT) $< | $(SED) -e '/class/s/_zh_TW/_zh_HK/' > $@
ZH_HK_JAVA:= sun/applet/resources/MsgAppletViewer_zh_HK.java \
sun/misc/resources/Messages_zh_HK.java \
sun/security/util/AuthResources_zh_HK.java
ZH_HK_JAVA_FILES:=$(addprefix $(JDK_OUTPUTDIR)/gensrc_properties/,$(ZH_HK_JAVA))
GENSRC_PROPERTIES:=$(ALL_COMPILED_PROPJAVAS) $(ALL_CLEANED_PROPOUTPUT) $(ZH_HK_JAVA_FILES)
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Setup.gmk
default: $(IMAGES_OUTPUTDIR)/_the.images
include Tools.gmk
JARS:=
##########################################################################################
JCONSOLE_JAR_DEPS := \
$(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses/sun/tools/jconsole/ -name "_the.package") \
$(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses/com/sun/tools/jconsole/ -name "_the.package")
$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,$(JCONSOLE_JAR_DEPS),\
SRCS:=$(JDK_OUTPUTDIR)/newclasses,\
SUFFIXES:=.class .gif .png,\
INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
JARMAIN:=sun.tools.jconsole.JConsole,\
JAR:=$(JDK_OUTPUTDIR)/lib/jconsole.jar,\
SKIP_METAINF:=true))
JARS+=$(JDK_OUTPUTDIR)/lib/jconsole.jar
##########################################################################################
# Need to define BUILDDIR for Release.gmk to work
BUILDDIR=$(JDK_TOPDIR)/makefiles
include common/Defs.gmk
include common/Release.gmk
# A rudimentary attempt at band-aiding the dependency tracking.
DEPS:= $(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses -name "*.class" -type f) \
$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f) \
$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f)
$(IMAGES_OUTPUTDIR)/_the.images : $(DEPS) $(JARS)
$(MKDIR) -p $(@D)
# Restart this makefile, ugly, but since double colon (::) rules
# have been used in Release.gmk, it is impossible to craft on
# dependencies on these. I.e. -do-not-use- :: rules!!!!!
# Repeat after me: -do-not-use- :: rules!!!!!
$(MAKE) -j1 -f Images.gmk $(IMAGES_MAKE_ARGS) images
$(TOUCH) $@
.PHONY: default
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
include $(SPEC)
include MakeBase.gmk
all: $(JDK_OUTPUTDIR)/_the.legacy_make
DEPS:= $(shell $(FIND) $(JDK_TOPDIR)/makefiles/java -type f) \
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/javax -type f) \
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/sun -type f) \
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/com -type f) \
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/apple -type f)
$(JDK_OUTPUTDIR)/_the.legacy_make: $(DEPS)
(echo Building single threaded Java subdir && \
$(MAKE) -j1 -C java all && \
(if test "$(PLATFORM)" = macosx; then \
echo Building single threaded Apple subdir && \
$(MAKE) -j1 -C apple all; \
fi) && \
echo Building single threaded javax subdir && \
$(MAKE) -j1 -C javax all && \
echo Building single threaded sun subdir && \
$(MAKE) -j1 -C sun all && \
echo Building single threaded com subdir && \
$(MAKE) -j1 -C com all && \
if [ -z "$(OPENJDK)" ]; then \
echo Building single threaded altclasses subdir && \
$(MAKE) -j1 -C altclasses all; \
fi && \
touch $@)
.PHONY: all
#
# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include NativeCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
# Setup the build tools.
include Tools.gmk
all: $(BUILD_TOOLS)
+make -f GenerateJavaSources.gmk
# Drop back to the old makefiles for
# packages/libs that have not yet been converted.
+make -f LegacyMakefiles.gmk
# Ok, now gensrc is fully populated.
+make -f GenerateData.gmk
+make -f CompileJavaClasses.gmk
# The classes have been built, now generate
# classes that have other sources.
+make -f GenerateClasses.gmk
# The classes are now built and
# any javah files have now been generated.
+make -f CompileNativeLibraries.gmk
# Finally compile the launchers.
+make -f CompileLaunchers.gmk
# Now we have a complete jdk, which you can run.
# It is not yet wrapped up as an installed image.
# The demos are compiled against this jdk.
ifndef NO_DEMOS
+make -f CompileDemos.gmk
endif
# Now copy the sample sources into the jdk.
ifndef NO_SAMPLES
+make -f CopySamples.gmk
endif
# Create the final jdk and jre images, to be wrapped up
# into packages, or instealled.
images: all
+make $(IMAGES_MAKE_ARGS) -f Images.gmk
BINARIES:=$(shell if test -d $(IMAGES_OUTPUTDIR)/j2sdk-image/bin; then cd $(IMAGES_OUTPUTDIR)/j2sdk-image/bin && $(LS) ; fi)
INSTALLDIR:=openjdk-$(RELEASE)
# Install the jdk image, in a very crude way. Not taking into
# account, how to install properly on macosx or windows etc.
install: images
echo Installing jdk image into $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
echo and creating $(words $(BINARIES)) links from $(INSTALL_PREFIX)/bin into the jdk.
$(MKDIR) -p $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
$(RM) -r $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/*
$(CP) -rp $(IMAGES_OUTPUTDIR)/j2sdk-image/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
$(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
$(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
# Create the deb,rpm,tgz,zip, packages.
packages: images
echo Creating packages...well, in the future.
$(MKDIR) -p $(OUTPUT_ROOT)/packages
.PHONY: all install
BUILD,RUNTIME 5.8 Sparc 109147-24 x86 109148-24 REQ "Linker patch"
BUILD,RUNTIME 5.8 Sparc 108652-66 x86 108653-55 REQ "Xserver patch"
BUILD,RUNTIME 5.8 Sparc 108940-52 x86 108941-52 REQ "Motif 2.1 patch"
BUILD,RUNTIME 5.8 Sparc 108989-02 x86 108990-02 REQ "Accounting patch"
BUILD,RUNTIME 5.8 Sparc none x86 111307-04 REQ "boot.bin, bootconf.exe, bootenv.rc and nbp patch"
BUILD,RUNTIME 5.8 Sparc 111310-01 x86 111311-01 REQ "libhcpagent.so.l patch"
BUILD,RUNTIME 5.8 Sparc 112396-02 x86 112397-02 REQ "fgrep patch"
BUILD,RUNTIME 5.8 Sparc 108987-13 x86 108988-13 REQ "patchadd, patchrm patch"
BUILD,RUNTIME 5.8 Sparc 111111-03 x86 111112-03 REQ "nawk patch"
BUILD,RUNTIME 5.8 Sparc 108528-20 x86 108529-20 REQ "Kernel update"
BUILD,RUNTIME 5.8 Sparc 108993-18 x86 none REQ "LDAP2 Patch"
BUILD,RUNTIME 5.8 Sparc none x86 110400-01 REQ "RBAC Feature patch"
BUILD,RUNTIME 5.8 Sparc none x86 111024-02 REQ "/kernel/fs/mntfs patch"
BUILD,RUNTIME 5.8 Sparc none x86 108994-18 REQ "LDAP2 patch"
BUILD,RUNTIME 5.8 Sparc 109147-23 x86 109148-23 REQ "linker patch"
BUILD,RUNTIME 5.8 Sparc 111308-03 x86 111309-03 REQ "Performance for apps using memory alloc"
RUNTIME 5.8 Sparc 112003-03 x86 none REQ "Fontset patch for sparcv9"
RUNTIME 5.8 Sparc 108921-16 x86 108922-16 REQ "CDE patch"
RUNTIME 5.8 Sparc 108773-18 x86 108774-18 REQ "X input method patch"
RUNTIME 5.8 Sparc 110386-03 x86 none REQ "RBAC Feature Patch"
RUNTIME 5.8 Sparc 111023-02 x86 none REQ "/kernel/fs/mntfs and /kernel/fs/sparcv9/mntfs patch"
RUNTIME 5.8 Sparc 112472-01 x86 112473-01 OPT "Font2DTest2 patch"
RUNTIME 5.8 Sparc 112438-01 x86 112439-01 REQ "/kernel/drv/random patch"
COMPILER 5.8 Sparc 109505-06 x86 109502-03 REQ "For C 5.0, C++ 5.0"
COMPILER 5.8 Sparc 109513-05 x86 109514-03 REQ "For Forte Development 6 C compiler"
COMPILER 5.8 Sparc 109508-03 x86 109509-03 REQ "For Forte Development 6 update 1 C++ compiler"
COMPILER 5.8 Sparc 109510-03 x86 109511-03 REQ "For Forte 6.1 Debugger"
COMPILER 5.8 Sparc 109516-02 x86 109517-02 REQ "For Forte 6.1 Performance Analyzer"
COMPILER 5.8 Sparc 110480-01 x86 110481-01 REQ "For Forte TeamWare"
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
JAVAC_JARS ?= "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar
JAVAH_JARS ?= "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar" -jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javah.jar
DISABLE_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
# The generate old bytecode javac setup uses the new compiler to compile for the
# boot jdk to generate tools that need to be run with the boot jdk.
# Thus we force the target bytecode to 6.
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE,\
JVM:=$(JAVA),\
JAVAC:=$(JAVAC_JARS),\
FLAGS:=-source 7 -target 7 -bootclasspath $(BOOT_RTJAR) $(DISABLE_WARNINGS),\
SERVER_DIR:=$(JAVAC_SERVERS),\
SERVER_JVM:=$(SERVER_JAVA),\
MODE:=$(JAVAC_USE_MODE),\
USE_DEPS:=$(JAVAC_USE_DEPS)))
# The generate new bytecode javac setup uses the new compiler to compile for the
# new jdk. This new bytecode might only be possible to run using the new jvm.
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE,\
JVM:=$(JAVA),\
JAVAC:=$(JAVAC_JARS),\
JAVAH:=$(JAVAH_JARS),\
FLAGS:=-bootclasspath "$(JDK_OUTPUTDIR)/newclasses$(PATH_SEP)$(JDK_OUTPUTDIR)/classes" -Xprefer:source -XDignore.symbol.file=true $(DISABLE_WARNINGS),\
SERVER_DIR:=$(JAVAC_SERVERS),\
SERVER_JVM:=$(SERVER_JAVA),\
MODE:=$(JAVAC_USE_MODE),\
USE_DEPS:=$(JAVAC_USE_DEPS)))
# After the jdk is built, we want to build demos using only the recently
# generated jdk classes and nothing else, no jdk source, etc etc.
# I.e. the rt.jar, but since rt.jar has not yet been generated
# (it will be in "make images") therefore we use classes instead.
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE,\
JVM:=$(JAVA),\
JAVAC:=$(JAVAC_JARS),\
FLAGS:= -Xbootclasspath:$(JDK_OUTPUTDIR)/classes $(DISABLE_WARNINGS),\
SERVER_DIR:=$(JAVAC_SERVERS),\
SERVER_JVM:=$(SERVER_JAVA),\
MODE:=$(JAVAC_USE_MODE),\
USE_DEPS:=$(JAVAC_USE_DEPS)))
# A temporary solution to work around the fact that Matrix3D.java
# exists in several applets. The javacserver does not like to be
# fed the same class twice. Thus we compile one applet outside of the
# javacserver.
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE_NOSERV,\
JVM:=$(JAVA),\
JAVAC:=$(JAVAC_JARS),\
FLAGS:= -Xbootclasspath:$(JDK_OUTPUTDIR)/classes $(DISABLE_WARNINGS),\
MODE:=SINGLE_THREADED_BATCH,\
USE_DEPS:=FALSE))
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
ifeq (,$(BUILD_TOOLS))
$(eval $(call SetupJavaCompilation,BUILD_TOOLS,\
SETUP:=GENERATE_OLDBYTECODE,\
SRC:=$(JDK_TOPDIR)/make/tools/src,\
BIN:=$(JDK_OUTPUTDIR)/btclasses))
endif
ifndef DISABLE_NIMBUS
$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template : \
$(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
mkdir -p $(@D)
cp $< $@
BUILD_TOOLS += $(foreach i,$(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template),$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
endif
# Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
TOOL_ADDJSUM=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.addjsum.AddJsum
# The buildmetaindex tool creates a meta-index to make core class loaders lazier.
TOOL_BUILDMETAINDEX=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.buildmetaindex.BuildMetaIndex
# The comment checker is not currently used. Should it be removed or added to javac?
TOOL_COMMENTCHECKER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.commentchecker.CommentChecker
TOOL_COMPILEFONTCONFIG=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.compilefontconfig.CompileFontConfig
TOOL_COMPILEPROPERTIES=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.compileproperties.CompileProperties
TOOL_STRIPPROPERTIES=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.stripproperties.StripProperties
TOOL_JARREORDER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.jarreorder.JarReorder
TOOL_GENERATECHARACTER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.generatecharacter.GenerateCharacter
TOOL_CHARACTERNAME=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.generatecharacter.CharacterName
TOOL_DIRDIFF=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.dirdiff.DirDiff
TOOL_DTDBUILDER=$(JAVA) -Ddtd_home=$(JDK_TOPDIR)/make/tools/dtdbuilder/dtds \
-cp $(JDK_OUTPUTDIR)/btclasses build.tools.dtdbuilder.DTDBuilder
TOOL_GENERATEBREAKITERATORDATA=$(JAVA) \
-cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.generatebreakiteratordata.GenerateBreakIteratorData
TOOL_GENERATECURRENCYDATA=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.generatecurrencydata.GenerateCurrencyData
TOOL_HASHER=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.hasher.Hasher
# Jarsplit used in jdk/makefiles/common/Release.gmk
TOOL_JARSPLIT=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.jarsplit.JarSplit
TOOL_JAVAZIC=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.javazic.Main
# TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
# and nbproject/project.properties in the same dir. Needs to be looked at.
TOOL_JDWPGEN=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.jdwpgen.Main
# TODO: Lots of files in jdk/make/tools/CharsetMapping dir
TOOL_CHARSETMAPPING=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.charsetmapping.Main
TOOL_SPP=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses build.tools.spp.Spp
# TODO: Only referenced in jdk/make/tools/sharing/README.txt. Find out what it means.
TOOL_MAKECLASSLIST=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.makeclasslist.MakeClasslist
# Nimbus is used somewhere in the swing build.
TOOL_GENERATENIMBUS=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.generatenimbus.Generator
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for building alternate runtime classes (not used by default)
#
BUILDDIR = ..
PRODUCT = altclasses
include $(BUILDDIR)/common/Defs.gmk
# Root of alternate class sources
ALTCLASSES_SRCDIR = $(CLOSED_SRC)/share/altclasses
# Alternate runtime classes
ALTRT_JAR_FILE = $(LIBDIR)/alt-rt.jar
ALTRT_JAR_SOURCE_FILE = $(TEMPDIR)/alt-rt.jarsrclist
ALTRT_JAR_SOURCES = $(wildcard $(ALTCLASSES_SRCDIR)/java/*/*.java)
# Use a special file suffix for the file that holds the source list
.SUFFIXES: .jarsrclist
# Build rules
all build:
@if [ -d $(ALTCLASSES_SRCDIR) ] ; then \
$(MAKE) $(ALTRT_JAR_FILE); \
fi
# Source list file creation
$(ALTRT_JAR_SOURCE_FILE): $(ALTRT_JAR_SOURCES) FRC
$(prep-target)
$(ECHO) $(ALTRT_JAR_SOURCES) > $@
clean clobber::
$(RM) $(ALTRT_JAR_FILE) $(ALTRT_JAR_SOURCE_FILE)
$(RM) -r $(ALTRT_JAR_SOURCE_FILE).classes
include $(BUILDDIR)/common/Classes.gmk
# Pattern rule to turn a source list file into a jar file
$(LIBDIR)/%.jar : $(TEMPDIR)/%.jarsrclist
$(prep-target)
$(RM) -r $(<).classes
$(MKDIR) -p $(<).classes
$(JAVAC_CMD) -implicit:none -d $(<).classes @$<
$(BOOT_JAR_CMD) cf $@ -C $(<).classes . $(BOOT_JAR_JFLAGS)
# Force target
FRC:
# Non file targets
.PHONY: all build clean clobber
#
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for building com/apple
#
BUILDDIR = ..
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
SUBDIRS = applescript
include $(BUILDDIR)/common/Subdirs.gmk
all build clean clobber::
$(SUBDIRS-loop)
#
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
BUILDDIR = ../..
PACKAGE = apple.applescript
LIBRARY = AppleScriptEngine
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
#
# Files
#
AUTO_FILES_JAVA_DIRS = apple/applescript
FILES_objc = \
$(TARGDIR)AppleScriptEngine.m \
$(TARGDIR)AppleScriptExecutionContext.m \
$(TARGDIR)AS_NS_ConversionUtils.m \
$(TARGDIR)NS_Java_ConversionUtils.m
FILES_export = \
apple/applescript/AppleScriptEngine.java \
apple/applescript/AppleScriptEngineFactory.java
#
# Rules
#
include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk
#
# Extra rules
#
#
# Add to ambient vpath to get files in a subdirectory
#
vpath %.m $(call NativeSrcDirList,,native/apple/applescript)
CPPFLAGS += \
-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders
OTHER_LDLIBS = \
-framework Cocoa \
-framework Carbon \
-framework JavaNativeFoundation
#
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for building all of java
#
BUILDDIR = ..
PRODUCT = com
include $(BUILDDIR)/common/Defs.gmk
SUBDIRS = sun oracle
ifeq ($(PLATFORM), macosx)
SUBDIRS += apple
endif
include $(BUILDDIR)/common/Subdirs.gmk
all build clean clobber::
$(SUBDIRS-loop)
#
# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for building com/apple
#
BUILDDIR = ../..
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
SUBDIRS = osx osxui
include $(BUILDDIR)/common/Subdirs.gmk
all build clean clobber::
$(SUBDIRS-loop)
#
# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
BUILDDIR = ../../..
PACKAGE = com.apple.osx
LIBRARY = osx
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
#
# Files
#
AUTO_FILES_JAVA_DIRS = apple/launcher apple/security com/apple/concurrent com/apple/eio java/util/prefs
FILES_objc += \
$(TARGDIR)Dispatch.m \
$(TARGDIR)CFileManager.m \
$(TARGDIR)KeystoreImpl.m \
$(TARGDIR)JavaAppLauncher.m \
$(TARGDIR)MacOSXPreferencesFile.m \
$(TARGDIR)SCDynamicStoreConfig.m
FILES_export += \
com/apple/concurrent/LibDispatchNative.java \
com/apple/eio/FileManager.java \
apple/security/KeychainStore.java \
apple/launcher/JavaAppLauncher.java \
java/util/prefs/MacOSXPreferencesFile.java
# TODO: couldn't figure out how to get resources working
#LOCALE_SET_DEFINITION = jre
#RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES = apple/launcher/appLauncherErrors.properties
#
# Rules
#
include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk
#
# Extra rules
#
#
# Add to ambient vpath to get files in a subdirectory
#
vpath %.m $(call NativeSrcDirList,,native/com/apple/concurrent)
vpath %.m $(call NativeSrcDirList,,native/com/apple/eio)
vpath %.m $(call NativeSrcDirList,,native/apple/launcher)
vpath %.m $(call NativeSrcDirList,,native/apple/security)
vpath %.m $(call NativeSrcDirList,,native/java/util)
CPPFLAGS += \
$(call NativeSrcDirList,-I,native/com/apple/laf) \
$(call NativeSrcDirList,-I,native/apple/awt) \
$(call NativeSrcDirList,-I,native/sun/awt) \
$(call NativeSrcDirList,-I,native/sun/osxapp)
OTHER_LDLIBS = \
-losxapp \
-framework Cocoa \
-framework ApplicationServices \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework Security \
-framework SystemConfiguration
#
# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
BUILDDIR = ../../..
PACKAGE = com.apple.osxui
LIBRARY = osxui
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
#
# Files
#
AUTO_FILES_JAVA_DIRS = apple/laf com/apple/laf com/apple/eawt
FILES_objc = \
$(TARGDIR)AquaFileView.m \
$(TARGDIR)AquaLookAndFeel.m \
$(TARGDIR)AquaNativeResources.m \
$(TARGDIR)JRSUIConstantSync.m \
$(TARGDIR)JRSUIController.m \
$(TARGDIR)JRSUIFocus.m \
$(TARGDIR)ScreenPopupFactory.m \
$(TARGDIR)ScreenMenu.m
FILES_export = \
apple/laf/AquaLookAndFeel.java \
apple/laf/JRSUIConstants.java \
apple/laf/JRSUIControl.java \
apple/laf/JRSUIFocus.java \
apple/laf/JRSUIState.java \
apple/laf/JRSUIStateFactory.java \
apple/laf/JRSUIUtils.java \
com/apple/laf/AquaFileView.java \
com/apple/laf/AquaNativeResources.java \
com/apple/laf/ScreenPopupFactory.java \
com/apple/laf/ScreenMenu.java \
com/apple/laf/ScreenMenuBar.java \
com/apple/laf/ScreenMenuBarProvider.java \
com/apple/laf/ScreenMenuItem.java \
com/apple/laf/ScreenMenuItemCheckbox.java \
com/apple/laf/ScreenMenuItemUI.java \
com/apple/laf/ScreenMenuPropertyHandler.java \
com/apple/laf/ScreenMenuPropertyListener.java
#RESOURCE_BUNDLES_COMPILED_PROPERTIES += \
# com/apple/laf/resources/aqua.properties \
# com/apple/laf/resources/aqua_de.properties \
# com/apple/laf/resources/aqua_fr.properties \
# com/apple/laf/resources/aqua_ja.properties
#
# Rules
#
include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk
#
# Extra rules
#
#
# Add to ambient vpath to get files in a subdirectory
#
vpath %.m $(call NativeSrcDirList,,native/com/apple/laf)
vpath %.m $(call NativeSrcDirList,,native/com/apple/eawt)
CPPFLAGS += \
$(call NativeSrcDirList,-I,native/com/apple/laf) \
$(call NativeSrcDirList,-I,native/apple/awt) \
$(call NativeSrcDirList,-I,native/sun/awt) \
$(call NativeSrcDirList,-I,native/sun/osxapp) \
-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders
OTHER_LDLIBS = \
-lawt -losxapp \
-lawt_lwawt -L$(LIBDIR) -Xlinker -rpath -Xlinker @loader_path \
-framework Cocoa \
-framework Carbon \
-framework ApplicationServices \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
BUILDDIR = ../..
PRODUCT = oracle
#SUBDIRS_MAKEFLAGS += JAVAC_MAX_WARNINGS=true
#SUBDIRS_MAKEFLAGS += JAVAC_WARNINGS_FATAL=true
#SUBDIRS_MAKEFLAGS += JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation,-path
include $(BUILDDIR)/common/Defs.gmk
# build com/oracle/security/ucrypto on Solaris platform for non-OpenJDK builds
UCRYPTO =
ifndef OPENJDK
ifeq ($(PLATFORM), solaris)
UCRYPTO = security/ucrypto
endif
endif
JFR =
ifndef OPENJDK
ifndef JAVASE_EMBEDDED
JFR = jfr
endif
endif
SUBDIRS = $(JFR) $(UCRYPTO)
include $(BUILDDIR)/common/Subdirs.gmk
all build clean clobber::
$(SUBDIRS-loop)
#
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
BUILDDIR = ../../..
PACKAGE = oracle.jrockit.jfr
LIBRARY = jfr
PRODUCT = oracle
include $(BUILDDIR)/common/Defs.gmk
#
# Use mapfile
#
FILES_m = $(CLOSED_SHARE_SRC)/native/oracle/jfr/mapfile-vers
include $(BUILDDIR)/common/Mapfile-vers.gmk
#
# Files to compile
#
FILES_c = VMJFR.c
AUTO_FILES_JAVA_DIRS = com/oracle/jrockit/jfr oracle/jrockit/jfr
# Find C source files
#
vpath %.c $(CLOSED_SHARE_SRC)/native/oracle/jfr
#
# Library to compile.
#
include $(BUILDDIR)/common/Library.gmk
JVMLIB =
JAVALIB =
OTHER_LDLIBS =
clean clobber::
$(RM) -r $(CLASSDESTDIR)/com/oracle/jrockit/jfr
$(RM) -r $(CLASSDESTDIR)/oracle/jrockit/jfr
# Copy pre-shipped .jfs files
JFR_LIBDIR = $(LIBDIR)/jfr
JFR_SRCDIR = $(CLOSED_SHARE_SRC)/lib/jfr
$(JFR_LIBDIR)/%.jfs: $(JFR_SRCDIR)/%.jfs
$(install-file)
JFS_FILES := $(subst $(JFR_SRCDIR),$(JFR_LIBDIR),$(wildcard $(JFR_SRCDIR)/*.jfs))
all build : $(JFS_FILES)
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
ifndef OPENJDK
FILES_c = \
nativeFunc.c \
nativeCrypto.c
endif
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for building ucrypto.jar and its native libraries.
#
# This file was modified from make/sun/security/pkcs11/Makefile.
#
#
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Oracle
# JDK builds respectively.)
#
# This Makefile does the "real" build of the Ucrypto provider files.
# Since the sources are unavailable for OpenJDK, this Makefile is only
# useful for JDK.
#
#
# Main Targets (JDK on Solaris):
#
# all The usual, ucrypto.jar plus the native libraries.
# builds and installs the prebuilt/signed jar.
#
# clobber/clean Cleans up the temp directory, ucrypto.jar, the
# native libraries, and the config file from the
# build area
#
# jar Builds, signs and installs ucrypto.jar
# (Can only be done on machines with access to
# the signing keystore)
#
# Other lesser-used Targets (JDK on Solaris):
#
# build-jar Builds ucrypto.jar (no sign/install)
#
# sign Builds/signs ucrypto.jar (no install)
#
# release Builds all targets in preparation
# for workspace integration.
# (Can only be done on machines with access to
# the signing keystore)
#
# install-prebuilt Installs the pre-built jar files
#
# NOTE: None of the above target will update the prebuilt provider binary
# under the closed workspace. To update it, you must explicitly copy the
# binary from either the tmp/signed or lib/ext directory.
#
# This makefile was written to support parallel target execution.
#
BUILDDIR = ../../../..
include $(BUILDDIR)/common/Defs.gmk
ifndef OPENJDK
ifneq ($(PLATFORM), solaris)
all:
else
PACKAGE = com.oracle.security.ucrypto
LIBRARY = j2ucrypto
PRODUCT = oracle
#
# The following is for when we need to do postprocessing
# (signing/obfuscation) against a read-only build. If the OUTPUTDIR
# isn't writable, the build currently crashes out.
#
ifdef ALT_JCE_BUILD_DIR
# =====================================================
# Where to place the output, in case we're building from a read-only
# build area. (e.g. a release engineering build.)
JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
IGNORE_WRITABLE_OUTPUTDIR_TEST=true
else
JCE_BUILD_DIR=${TEMPDIR}
endif
JAVAC_MAX_WARNINGS=false
JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation
JAVAC_WARNINGS_FATAL=true
#
# C and Java Files
#
include FILES_c.gmk
#
# Subdirectories of these are automatically included.
#
AUTO_FILES_JAVA_DIRS = com/oracle/security/ucrypto
#
# Java files that define native methods
#
FILES_export = \
com/oracle/security/ucrypto/UcryptoProvider.java \
com/oracle/security/ucrypto/NativeCipher.java \
com/oracle/security/ucrypto/NativeDigest.java \
com/oracle/security/ucrypto/NativeKey.java \
com/oracle/security/ucrypto/NativeRSASignature.java \
com/oracle/security/ucrypto/NativeRSACipher.java
#
# Find native code
#
vpath %.c \
$(CLOSED_PLATFORM_SRC)/native/com/oracle/security/ucrypto
#
# Find include files
#
OTHER_INCLUDES += \
-I$(CLOSED_PLATFORM_SRC)/native/com/oracle/security/ucrypto
#
# Rules
#
CLASSDESTDIR = $(TEMPDIR)/classes
JAVAHFLAGS = -bootclasspath \
"$(CLASSDESTDIR)$(CLASSPATH_SEPARATOR)$(CLASSBINDIR)"
include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk
#
# Libraries to link
#
OTHER_LDLIBS = -ldl
# Default config file
UCRYPTO_CFG_SRC = $(CLOSED_SRC)/share/lib/security/ucrypto-solaris.cfg
UCRYPTO_CFG_BUILD = $(LIBDIR)/security/ucrypto-solaris.cfg
#
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
# part of the build we're doing. Build is initially done in the unsigned
# area and when files are signed, they will be placed in the appropriate area.
#
UNSIGNED_DIR = $(TEMPDIR)/unsigned
#
# Rules
#
all: ucrypto-cfg build-jar install-prebuilt
$(build-warning)
ucrypto-cfg: $(UCRYPTO_CFG_BUILD)
$(UCRYPTO_CFG_BUILD): $(UCRYPTO_CFG_SRC)
$(install-file)
include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
# =====================================================
# Build the unsigned ucrypto.jar file.
#
JAR_DESTFILE = $(EXTDIR)/ucrypto.jar
#
# The ucrypto.jar needs to be in the extension class directory,
# therefore none of its classes can appear in $(CLASSBINDIR).
# Currently no one is using any of the internals, so these files
# should not have been built.
#
#
# Since the -C option to jar is used below, each directory entry must be
# preceded with the appropriate directory to "cd" into.
#
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
build-jar: $(UNSIGNED_DIR)/ucrypto.jar
#
# Build ucrypto.jar.
#
$(UNSIGNED_DIR)/ucrypto.jar: build
$(prep-target)
$(BOOT_JAR_CMD) cf $@ $(JAR_DIRS) \
$(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
#
# Sign ucrypto.jar
#
SIGNED_DIR = $(JCE_BUILD_DIR)/signed
sign: $(SIGNED_DIR)/ucrypto.jar
ifndef ALT_JCE_BUILD_DIR
$(SIGNED_DIR)/ucrypto.jar: $(UNSIGNED_DIR)/ucrypto.jar
else
#
# We have to remove the build dependency, otherwise, we'll try to rebuild it
# which we can't do on a read-only filesystem.
#
$(SIGNED_DIR)/ucrypto.jar:
@if [ ! -r $(UNSIGNED_DIR)/ucrypto.jar ] ; then \
$(ECHO) "Couldn't find $(UNSIGNED_DIR)/ucrypto.jar"; \
exit 1; \
fi
endif
$(call sign-file, $(UNSIGNED_DIR)/ucrypto.jar)
# =====================================================
# Create the Release Engineering files. Signed builds, etc.
#
release: $(SIGNED_DIR)/ucrypto.jar
$(RM) $(JCE_BUILD_DIR)/release/ucrypto.jar
$(MKDIR) -p $(JCE_BUILD_DIR)/release
$(CP) $(SIGNED_DIR)/ucrypto.jar $(JCE_BUILD_DIR)/release
$(release-warning)
# =====================================================
# Install routines.
#
#
# Install ucrypto.jar, depending on which type is requested.
#
jar: $(JAR_DESTFILE)
$(release-warning)
$(JAR_DESTFILE): $(SIGNED_DIR)/ucrypto.jar
$(install-file)
install-prebuilt:
@$(ECHO) "\n>>>Installing prebuilt OracleUcrypto provider..."
$(RM) $(JAR_DESTFILE)
$(CP) $(PREBUILT_DIR)/ucrypto/ucrypto.jar $(JAR_DESTFILE)
# =====================================================
# Support routines.
#
clobber clean::
$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
$(RM) -r $(UCRYPTO_CFG_BUILD)
.PHONY: build-jar jar sign release install-prebuilt
endif #ifneq ($(PLATFORM), solaris)
endif #ifndef OPENJDK
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Define public interface.
SUNWprivate_1.1 {
global:
JNI_OnLoad;
Java_com_oracle_security_ucrypto_UcryptoProvider_loadLibraries;
Java_com_oracle_security_ucrypto_UcryptoProvider_getMechList;
Java_com_oracle_security_ucrypto_NativeDigest_nativeInit;
Java_com_oracle_security_ucrypto_NativeDigest_nativeUpdate;
Java_com_oracle_security_ucrypto_NativeDigest_nativeDigest;
Java_com_oracle_security_ucrypto_NativeDigest_nativeClone;
Java_com_oracle_security_ucrypto_NativeDigest_nativeFree;
Java_com_oracle_security_ucrypto_NativeCipher_nativeInit;
Java_com_oracle_security_ucrypto_NativeCipher_nativeUpdate;
Java_com_oracle_security_ucrypto_NativeCipher_nativeFinal;
Java_com_oracle_security_ucrypto_NativeKey_nativeFree;
Java_com_oracle_security_ucrypto_NativeKey_00024RSAPrivateCrt_nativeInit;
Java_com_oracle_security_ucrypto_NativeKey_00024RSAPublic_nativeInit;
Java_com_oracle_security_ucrypto_NativeRSASignature_nativeInit;
Java_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII;
Java_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZJI;
Java_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal;
Java_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic;
JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeInit;
JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeUpdate;
JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeDigest;
JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeClone;
JavaCritical_com_oracle_security_ucrypto_NativeDigest_nativeFree;
JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeInit;
JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeUpdate;
JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeFinal;
JavaCritical_com_oracle_security_ucrypto_NativeKey_nativeFree;
JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPrivateCrt_nativeInit;
JavaCritical_com_oracle_security_ucrypto_NativeKey_00024RSAPublic_nativeInit;
JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeInit;
JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZ_3BII;
JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeUpdate__JZJI;
JavaCritical_com_oracle_security_ucrypto_NativeRSASignature_nativeFinal;
JavaCritical_com_oracle_security_ucrypto_NativeRSACipher_nativeAtomic;
local:
*;
};
#
# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for building com/sun
#
BUILDDIR = ../..
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
ifndef OPENJDK
ORG_EXISTS := $(call DirExists,$(CLOSED_SRC)/share/classes/sun/org,,)
ifneq ("$(ORG_EXISTS)", "")
SCRIPT_SUBDIR = script
endif
endif
# jarsigner is part of JRE
SUBDIRS =
SUBDIRS_management =
SUBDIRS_enterprise = crypto/provider
SUBDIRS_misc =
# Omit mirror since it's built with the apt tool.
include $(BUILDDIR)/common/Subdirs.gmk
all build clean clobber::
$(SUBDIRS-loop)
#
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for building sunjce_provider.jar.
#
# This file was derived from make/javax/crypto/Makefile.
#
#
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
# respectively.)
#
# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE
# jar files do not require signing, but those for JDK do. If an unsigned
# jar file is installed into JDK, things will break when the crypto
# routines are called.
#
# This Makefile does the "real" build of the JCE files. There are some
# javac options currently specific to JCE, so we recompile now to make
# sure any implicit compilations didn't use any incorrect flags.
#
# For OpenJDK, the jar files built here are installed directly into the
# OpenJDK.
#
# For JDK, the binaries use pre-built/pre-signed binary files stored in
# the closed workspace that are not shipped in the OpenJDK workspaces.
# We still build the JDK files here to verify the files compile, and in
# preparation for possible signing. Developers working on JCE in JDK
# must sign the JCE files before testing. The JCE signing key is kept
# separate from the JDK workspace to prevent its disclosure.
#
# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
# be built and signed, and the resulting jar files MUST BE CHECKED INTO
# THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT BE
# FORGOTTEN*, otherwise a bug fixed in the source code will not be
# reflected in the shipped binaries. The "release" target should be
# used to generate the required files.
#
# There are a number of targets to help both JDK/OpenJDK developers.
#
# Main Targets (JDK/OPENJDK):
#
# all/clobber/clean The usual.
# If OpenJDK, installs sunjce_provider.jar.
# If JDK, installs prebuilt
# sunjce_provider.jar.
#
# jar Builds/installs sunjce_provider.jar
# If OpenJDK, does not sign.
# If JDK, tries to sign.
#
# Other lesser-used Targets (JDK/OPENJDK):
#
# build-jar Builds sunjce_provider.jar
# (does not sign/install)
#
# install-jar Alias for "jar" above.
#
# Other targets (JDK only):
#
# sign Alias for sign-jar
# sign-jar Builds/signs sunjce_provider.jar (no install)
#
# release Builds all targets in preparation
# for workspace integration.
#
# install-prebuilt Installs the pre-built jar files
#
# This makefile was written to support parallel target execution.
#
BUILDDIR = ../../../..
PACKAGE = com.sun.crypto.provider
PRODUCT = sun
#
# The following is for when we need to do postprocessing
# (signing) against a read-only build. If the OUTPUTDIR
# isn't writable, the build currently crashes out.
#
ifndef OPENJDK
ifdef ALT_JCE_BUILD_DIR
# =====================================================
# Where to place the output, in case we're building from a read-only
# build area. (e.g. a release engineering build.)
JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
IGNORE_WRITABLE_OUTPUTDIR_TEST=true
else
JCE_BUILD_DIR=${TEMPDIR}
endif
endif
JAVAC_MAX_WARNINGS = false
JAVAC_LINT_OPTIONS = -Xlint:all,-deprecation
JAVAC_WARNINGS_FATAL = true
include $(BUILDDIR)/common/Defs.gmk
#
# Location for the newly built classfiles.
#
CLASSDESTDIR = $(TEMPDIR)/classes
#
# Subdirectories of these are automatically included.
#
AUTO_FILES_JAVA_DIRS = \
com/sun/crypto/provider
include $(BUILDDIR)/common/Classes.gmk
#
# Rules
#
#
# Some licensees do not get the security sources, but we still need to
# be able to build "all" for them. Check here to see if the sources were
# available. If not, then we don't need to continue this rule.
#
ifdef OPENJDK
all: build-jar install-jar
else # OPENJDK
ifeq ($(strip $(FILES_java)),)
all: install-prebuilt
$(no-source-warning)
else # FILES_java available
all: build-jar install-prebuilt
$(build-warning)
endif # $(FILES_java) available
endif # OPENJDK
#
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
# part of the build we're doing. Both OPENJDK/JDK builds are initially
# done in the unsigned area. When files are signed in JDK, they will be
# placed in the appropriate areas.
#
UNSIGNED_DIR = $(TEMPDIR)/unsigned
include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
# =====================================================
# Build the unsigned sunjce_provider.jar file.
#
JAR_DESTFILE = $(EXTDIR)/sunjce_provider.jar
#
# The sunjce_provider.jar needs to be in the extension class directory,
# therefore none of its classes should appear in $(CLASSBINDIR).
# Currently no one is using any of the SunJCE internals, so these files
# should not have been built.
#
#
# Since the -C option to jar is used below, each directory entry must be
# preceded with the appropriate directory to "cd" into.
#
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
build-jar: $(UNSIGNED_DIR)/sunjce_provider.jar
#
# Build sunjce_provider.jar.
#
$(UNSIGNED_DIR)/sunjce_provider.jar: build $(JCE_MANIFEST_FILE)
$(prep-target)
$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
$(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
ifndef OPENJDK
# =====================================================
# Sign the provider jar file. Not needed for OpenJDK.
#
SIGNED_DIR = $(JCE_BUILD_DIR)/signed
sign: sign-jar
sign-jar: $(SIGNED_DIR)/sunjce_provider.jar
ifndef ALT_JCE_BUILD_DIR
$(SIGNED_DIR)/sunjce_provider.jar: $(UNSIGNED_DIR)/sunjce_provider.jar
else
#
# We have to remove the build dependency, otherwise, we'll try to rebuild it
# which we can't do on a read-only filesystem.
#
$(SIGNED_DIR)/sunjce_provider.jar:
@if [ ! -r $(UNSIGNED_DIR)/sunjce_provider.jar ] ; then \
$(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunjce_provider.jar"; \
exit 1; \
fi
endif
$(call sign-file, $(UNSIGNED_DIR)/sunjce_provider.jar)
# =====================================================
# Create the Release Engineering files. Signed builds, etc.
#
release: $(SIGNED_DIR)/sunjce_provider.jar
$(RM) $(JCE_BUILD_DIR)/release/sunjce_provider.jar
$(MKDIR) -p $(JCE_BUILD_DIR)/release
$(CP) $(SIGNED_DIR)/sunjce_provider.jar $(JCE_BUILD_DIR)/release
$(release-warning)
endif # OPENJDK
# =====================================================
# Install routines.
#
#
# Install sunjce_provider.jar, depending on which type is requested.
#
install-jar jar: $(JAR_DESTFILE)
ifndef OPENJDK
$(release-warning)
endif
ifdef OPENJDK
$(JAR_DESTFILE): $(UNSIGNED_DIR)/sunjce_provider.jar
else
$(JAR_DESTFILE): $(SIGNED_DIR)/sunjce_provider.jar
endif
$(install-file)
ifndef OPENJDK
install-prebuilt:
@$(ECHO) "\n>>>Installing prebuilt SunJCE provider..."
$(RM) $(JAR_DESTFILE)
$(CP) $(PREBUILT_DIR)/jce/sunjce_provider.jar $(JAR_DESTFILE)
endif
# =====================================================
# Support routines.
#
clobber clean::
$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
.PHONY: build-jar jar install-jar
ifndef OPENJDK
.PHONY: sign sign-jar release install-prebuilt
endif
#
# Copyright (c) 1995, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# WARNING: This file is shared with other workspaces.
# So when it includes other files, it must use JDK_TOPDIR.
#
include $(JDK_TOPDIR)/makefiles/common/Rules.gmk
#
# Say you built classes into $(ALT_CLASSBINDIR) and then at the end of
# the build you might want to copy them over to $(ALT_CLASSDESTDIR);
# this rule takes care of that. No one should really set these
# variables except the bootstrap/recompile stage of the java compiler.
#
ifdef ALT_CLASSBINDIR
# By default post-processing is copying. Suppose you want to build
# a jar file then set ALT_CLASSES_DISPOSITION to '../../dest/nameof.jar'
# before including this file.
ifndef ALT_CLASSES_DISPOSITION
ALT_CLASSES_DISPOSITION = copy-classes
endif
build : $(ALT_CLASSES_DISPOSITION)
copy-classes:
ifneq ($(ALT_CLASSBINDIR), $(ALT_CLASSDESTDIR))
@if [ -s $(TEMPDIR)/.classes.list ]; then \
mkdir -p $(ALT_CLASSDESTDIR); \
echo "Copying $(ALT_CLASSBINDIR)..."; \
echo "(cd $(ALT_CLASSBINDIR); tar cf - .) | \
(cd $(ALT_CLASSDESTDIR); tar xf -)"; \
(cd $(ALT_CLASSBINDIR); tar cf - .) | \
(cd $(ALT_CLASSDESTDIR); tar xf -); \
fi
else # ALT_CLASSBINDIR
@if [ -s $(TEMPDIR)/.classes.list ]; then \
echo "Copy source and destination are the same: $(ALT_CLASSBINDIR) -- Copy skipped..."; \
fi
endif # ALT_CLASSBINDIR
.PHONY: copy-classes
endif # ALT_CLASSBINDIR
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
#
# Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# The specific packages that come from or go to rt.jar and tools.jar
IMPORT_RT_PACKAGES += \
javax/annotation/processing \
javax/lang/model \
javax/tools
IMPORT_TOOLS_PACKAGES += \
com/sun/javadoc \
com/sun/source \
com/sun/tools/classfile \
com/sun/tools/doclets \
com/sun/tools/javac \
com/sun/tools/javadoc \
com/sun/tools/javah \
com/sun/tools/javap
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册