From 140d836e9cd54fb67b969fd82ef7ed19ba574d40 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sat, 26 Apr 2014 15:11:58 +0200 Subject: Imported Upstream version 2.3.1 --- src/engine/SCons/Tool/javac.xml | 93 ++++++++++++++++++++++++++++++++++------- 1 file changed, 77 insertions(+), 16 deletions(-) (limited to 'src/engine/SCons/Tool/javac.xml') diff --git a/src/engine/SCons/Tool/javac.xml b/src/engine/SCons/Tool/javac.xml index 704308b..d720293 100644 --- a/src/engine/SCons/Tool/javac.xml +++ b/src/engine/SCons/Tool/javac.xml @@ -1,36 +1,60 @@ + + + +%scons; + +%builders-mod; + +%functions-mod; + +%tools-mod; + +%variables-mod; +]> + + + + Sets construction variables for the &javac; compiler. + -JAVAC -JAVACFLAGS -JAVACCOM -JAVACLASSSUFFIX -JAVASUFFIX -JAVABOOTCLASSPATH -JAVACLASSPATH -JAVASOURCEPATH +JAVAC +JAVACFLAGS +JAVACCOM +JAVACLASSSUFFIX +JAVASUFFIX +JAVABOOTCLASSPATH +JAVACLASSPATH +JAVASOURCEPATH -JAVACCOMSTR +JAVACCOMSTR + Builds one or more Java class files. The sources may be any combination of explicit .java files, or directory trees which will be scanned for .java files. + + SCons will parse each source .java file to find the classes (including inner classes) @@ -39,7 +63,9 @@ and from that figure out the target .class files that will be created. The class files will be placed underneath the specified target directory. + + SCons will also search each Java file for the Java package name, which it assumes can be found on a line @@ -60,15 +86,19 @@ containing a package name of will generate a corresponding sub/dir/Foo.class class file. + + Examples: + - + env.Java(target = 'classes', source = 'src') env.Java(target = 'classes', source = ['src1', 'src2']) env.Java(target = 'classes', source = ['File1.java', 'File2.java']) - + + Java source files can use the native encoding for the underlying OS. Since SCons compiles in simple ASCII mode by default, the compiler will generate warnings about unmappable characters, @@ -78,16 +108,18 @@ environment variable to tell the compiler what encoding is used. For portibility, it's best if the encoding is hard-coded so that the compile will work if it is done on a system with a different encoding. + - + env = Environment() env['ENV']['LANG'] = 'en_GB.UTF-8' - + + Specifies the list of directories that will be added to the &javac; command line @@ -96,56 +128,68 @@ The individual directory names will be separated by the operating system's path separate character (: on UNIX/Linux/POSIX, ; on Windows). + + The Java compiler. + + The command line used to compile a directory tree containing Java source files to corresponding Java class files. Any options specified in the &cv-link-JAVACFLAGS; construction variable are included on this command line. + + The string displayed when compiling a directory tree of Java source files to corresponding Java class files. If this is not set, then &cv-link-JAVACCOM; (the command line) is displayed. + - + env = Environment(JAVACCOMSTR = "Compiling class files $TARGETS from $SOURCES") - + + General options that are passed to the Java compiler. + + The directory in which Java class files may be found. This is stripped from the beginning of any Java .class file names supplied to the JavaH builder. + + Specifies the list of directories that will be searched for Java .class file. @@ -156,25 +200,31 @@ The individual directory names will be separated by the operating system's path separate character (: on UNIX/Linux/POSIX, ; on Windows). + + Note that this currently just adds the specified directory via the option. &SCons; does not currently search the &cv-JAVACLASSPATH; directories for dependency .class files. + + The suffix for Java class files; .class by default. + + Specifies the list of directories that will be searched for input .java file. @@ -185,32 +235,40 @@ The individual directory names will be separated by the operating system's path separate character (: on UNIX/Linux/POSIX, ; on Windows). + + Note that this currently just adds the specified directory via the option. &SCons; does not currently search the &cv-JAVASOURCEPATH; directories for dependency .java files. + + The suffix for Java files; .java by default. + + Specifies the Java version being used by the &b-Java; builder. This is not currently used to select one version of the Java compiler vs. another. Instead, you should set this to specify the version of Java supported by your &javac; compiler. The default is 1.4. + + This is sometimes necessary because Java 1.5 changed the file names that are created for nested anonymous inner classes, @@ -220,5 +278,8 @@ Setting &cv-JAVAVERSION; to 1.5 (or 1.6, as appropriate) can make &SCons; realize that a Java 1.5 or 1.6 build is actually up to date. + + + \ No newline at end of file -- cgit v1.2.3