2001-02-17 22:24:41 +08:00
|
|
|
Things libgcj hackers should know
|
|
|
|
---------------------------------
|
|
|
|
|
|
|
|
If you want to hack on the libgcj files you need to be aware of the
|
|
|
|
following things. There are probably lots of other things that should be
|
|
|
|
explained in this HACKING file. Please add them if you discover them :)
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
A lot of the standard library files come from the GNU Classpath project.
|
|
|
|
<http://www.gnu.org/software/classpath/>
|
|
|
|
The libgcj and Classpath project have officially merged, but the merge
|
|
|
|
is not yet complete. Our eventual goal is for Classpath to be an upstream
|
|
|
|
source provider for libgcj, however it will be some time before this becomes
|
|
|
|
reality: libgcj and Classpath have different implementations of many core
|
|
|
|
java classes. In order to merge them, we need to select the best (most
|
|
|
|
efficient, cleanest) implementation of each method/class/package, resolve
|
|
|
|
any conflicts created by the merge, and test the final result.
|
|
|
|
|
|
|
|
The merged files can be recognized by the standard Classpath copyright
|
2001-11-07 09:19:20 +08:00
|
|
|
comments at the top of the file. If you make changes to these files
|
|
|
|
then you should also check in the fix to Classpath. For small changes
|
|
|
|
it may be easier to send a patch to the classpath mailinglist. For
|
|
|
|
large changes, if you have direct write access to the libgcj tree,
|
|
|
|
then you will also need to get a Classpath account and do the work
|
|
|
|
yourself.
|
2001-02-17 22:24:41 +08:00
|
|
|
<http://mail.gnu.org/mailman/listinfo/classpath/>
|
|
|
|
<mailto:classpath@gnu.org>
|
|
|
|
|
|
|
|
If you merge a libgcj class with a classpath class then you must update the
|
|
|
|
copyright notice at the top of the file so others can see that this is a
|
|
|
|
shared libgcj/classpath file.
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
If you need to add new java files to libgcj then you have to edit the
|
|
|
|
Makefile.am file in the top (libjava) directory. And run automake.
|
|
|
|
But note the following (thanks to Bryce McKinlay):
|
|
|
|
|
|
|
|
> Do you know the magic dance I have to do when adding files to Makefile.am
|
|
|
|
> so they will appear in Makefile.in and finally in the user generated
|
|
|
|
> Makefile?
|
|
|
|
Yup, you need the magic libgcj automake ;-)
|
|
|
|
|
2002-02-08 09:22:47 +08:00
|
|
|
<ftp://sources.redhat.com/pub/java/automake-gcj-1.4.tar.gz>
|
2001-02-17 22:24:41 +08:00
|
|
|
|
HACKING, [...]: Fix spelling errors.
* HACKING, gnu/gcj/xlib/Pixmap.java, gnu/gcj/xlib/XException.java,
gnu/java/rmi/rmic/RMIC.java, java/awt/Window.java,
java/awt/AWTEvent.java, java/io/ByteArrayOutputStream.java,
java/io/CharConversionException.java,
java/io/PipedInputStream.java, java/io/PipedReader.java,
java/io/PrintWriter.java, java/io/WriteAbortedException.java,
java/io/natFileWin32.cc, java/lang/Class.h,
java/lang/natClassLoader.cc, java/lang/natObject.cc,
java/lang/Package.java, java/net/BindException.java,
java/net/ConnectException.java, java/net/ProtocolException.java,
java/net/SocketException.java,
java/net/UnknownServiceException.java,
java/security/cert/X509Certificate.java,
java/security/interfaces/DSAKey.java,
java/security/SecureRandom.java, java/security/SignedObject.java,
java/sql/DatabaseMetaData.java,
java/text/DecimalFormatSymbols.java,
java/util/jar/Attributes.java, java/util/jar/JarEntry.java,
java/util/jar/JarInputStream.java,
java/util/jar/JarOutputStream.java, java/util/Calendar.java,
java/util/Collections.java, java/util/GregorianCalendar.java,
java/util/HashMap.java, java/util/List.java,
java/util/Properties.java, java/util/Timer.java,
java/util/Vector.java, java/util/WeakHashMap.java,
javax/naming/NamingException.java,
testsuite/libjava.lang/Thread_Wait.java,
org/xml/sax/helpers/DefaultHandler.java,
org/xml/sax/HandlerBase.java, org/xml/sax/SAXParseException.java,
ChangeLog, acinclude.m4, aclocal.m4, posix-threads.cc: Fix
spelling errors.
* configure: Regenerate.
From-SVN: r46665
2001-10-31 08:48:17 +08:00
|
|
|
Install that (don't worry, it should still work for other projects), add your
|
2001-02-17 22:24:41 +08:00
|
|
|
files to the Makefile.am, then just type "automake" and it will regenerate the
|
|
|
|
Makefile.in. Easy!
|
|
|
|
|
2001-07-29 18:05:08 +08:00
|
|
|
Tom Tromey adds:
|
|
|
|
If you add a class to java.lang, java.io, or java.util
|
|
|
|
(including sub-packages, like java.lang.ref).
|
|
|
|
|
|
|
|
* Edit gcj/javaprims.h
|
|
|
|
|
|
|
|
* Go to the `namespace java' line, and delete that entire block (the
|
|
|
|
entire contents of the namespace)
|
|
|
|
|
|
|
|
* Then insert the output of `perl ../scripts/classes.pl' into the file
|
|
|
|
at that point.
|
|
|
|
|
|
|
|
If you're generating a patch there is a program you can get to do an
|
|
|
|
offline `cvs add' (it will fake an `add' if you don't have write
|
|
|
|
permission yet). Then you can use `cvs diff -N' to generate the
|
|
|
|
patch. See http://www.red-bean.com/cvsutils/
|
|
|
|
|