From 13b07b313fdc7ab2620f71517ab16698be496f24 Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Date: Fri, 4 Feb 2005 08:08:07 +0000
Subject: [PATCH] Make javah a facade task, support kaffeh
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277590 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 16 +-
docs/manual/OptionalTasks/javah.html | 62 +++-
.../taskdefs/optional/javah/build.xml | 47 +++
.../optional/javah/input/org/example/Foo.java | 25 ++
.../tools/ant/taskdefs/optional/Javah.java | 315 +++++++++---------
.../ant/taskdefs/optional/Native2Ascii.java | 2 +-
.../taskdefs/optional/javah/JavahAdapter.java | 34 ++
.../optional/javah/JavahAdapterFactory.java | 96 ++++++
.../ant/taskdefs/optional/javah/Kaffeh.java | 90 +++++
.../ant/taskdefs/optional/javah/SunJavah.java | 120 +++++++
.../ant/taskdefs/optional/JavahTest.java | 44 +++
11 files changed, 684 insertions(+), 167 deletions(-)
create mode 100644 src/etc/testcases/taskdefs/optional/javah/build.xml
create mode 100644 src/etc/testcases/taskdefs/optional/javah/input/org/example/Foo.java
create mode 100644 src/main/org/apache/tools/ant/taskdefs/optional/javah/JavahAdapter.java
create mode 100644 src/main/org/apache/tools/ant/taskdefs/optional/javah/JavahAdapterFactory.java
create mode 100644 src/main/org/apache/tools/ant/taskdefs/optional/javah/Kaffeh.java
create mode 100644 src/main/org/apache/tools/ant/taskdefs/optional/javah/SunJavah.java
create mode 100644 src/testcases/org/apache/tools/ant/taskdefs/optional/JavahTest.java
diff --git a/WHATSNEW b/WHATSNEW
index 2d40a462b..de828fb0e 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -144,7 +144,7 @@ Other changes:
* Added nested elements to and to allow
specification of multiple sub-build targets, which are executed
with a single dependency analysis.
-
+
* Refactored Target invocation into org.apache.tools.ant.Executor
implementations. Bugzilla Reports 21421, 29248.
@@ -203,7 +203,7 @@ Other changes:
* Added length task to get strings' and files' lengths.
-* now also supports Kaffe's version.
+* and now also support Kaffe's versions.
* Recursive token expansion in a filterset can now be disabled by
setting its recurse attribute to false.
@@ -1291,6 +1291,18 @@ Other changes:
clashes of custom tasks
+* and now support , which let you enable
+ and disable Java1.4 assertions on a package or class basis. These
+ only work when fork=true, currently.
+
+* .NET tasks expanded with VB support and J#, via ,
+ and . supports nested types,
+ for (potentially conditional) definitions,
+ filesets for references. The executable attribute lets you switch to
+ mono or other implementations - has been tested with Mono on
+ Linux and OSX.
+
+
Changes from Ant 1.5.3 to Ant 1.5.4
===================================
diff --git a/docs/manual/OptionalTasks/javah.html b/docs/manual/OptionalTasks/javah.html
index 8d06e7f06..0fb005b76 100644
--- a/docs/manual/OptionalTasks/javah.html
+++ b/docs/manual/OptionalTasks/javah.html
@@ -15,6 +15,16 @@ are needed to implement native methods. JNI operates differently depending on
whether JDK1.2
(or later) or pre-JDK1.2
systems are used.
+
+It is possible to use different compilers. This can be selected
+with the implementation
attribute. Here are the choices:
+
+ - default - the default compiler (kaffeh or sun) for the platform.
+ - sun (the standard compiler of the JDK)
+ - kaffeh (the native standard compiler of Kaffe)
+
+
Parameters
@@ -74,8 +84,58 @@ systems are used.
location of installed extensions. |
No |
+
+ implementation |
+ The compiler implementation to use. If this
+ attribute is not set, the default compiler for the current VM
+ will be used. (See the above list of valid compilers.) |
+ No |
+
Either outputFile or destdir must be supplied, but not both.
+
+Parameters specified as nested elements
+
+arg
+
+You can specify additional command line arguments for the compiler
+with nested <arg>
elements. These elements are
+specified like Command-line Arguments
+but have an additional attribute that can be used to enable arguments
+only if a given compiler implementation will be used.
+
+
+
+ Attribute |
+ Description |
+ Required |
+
+
+ value |
+ See
+ Command-line Arguments. |
+ Exactly one of these. |
+
+
+ line |
+
+
+ file |
+
+
+ path |
+
+
+ implementation |
+ Only pass the specified argument if the chosen compiler
+ implementation matches the value of this attribute. Legal values
+ are the same as those in the above list of valid compilers.) |
+ No |
+
+
+
Examples
<javah destdir="c" class="org.foo.bar.Wibble"/>
makes a JNI header of the named class, using the JDK1.2 JNI model. Assuming
@@ -110,7 +170,7 @@ writes the corresponding .c stubs. The verbose option will cause Javah to
describe its progress.
-Copyright © 2001-2002,2004 The Apache Software Foundation. All rights
+
Copyright © 2001-2002,2004-2005 The Apache Software Foundation. All rights
Reserved.