source: trunk/third/gcc/libjava/HACKING @ 16960

Revision 16960, 2.5 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16959, which included commits to RCS files with non-trunk default branches.
Line 
1Things libgcj hackers should know
2---------------------------------
3
4If you want to hack on the libgcj files you need to be aware of the
5following things. There are probably lots of other things that should be
6explained in this HACKING file. Please add them if you discover them :)
7
8--
9
10A lot of the standard library files come from the GNU Classpath project.
11<http://www.gnu.org/software/classpath/>
12The libgcj and Classpath project have officially merged, but the merge
13is not yet complete. Our eventual goal is for Classpath to be an upstream
14source provider for libgcj, however it will be some time before this becomes
15reality: libgcj and Classpath have different implementations of many core
16java classes. In order to merge them, we need to select the best (most
17efficient, cleanest) implementation of each method/class/package, resolve
18any conflicts created by the merge, and test the final result.
19
20The merged files can be recognized by the standard Classpath copyright
21comments at the top of the file. If you make changes to these files then
22you should also send a patch to the classpath mailinglist.
23<http://mail.gnu.org/mailman/listinfo/classpath/>
24<mailto:classpath@gnu.org>
25
26If you merge a libgcj class with a classpath class then you must update the
27copyright notice at the top of the file so others can see that this is a
28shared libgcj/classpath file.
29
30--
31
32If you need to add new java files to libgcj then you have to edit the
33Makefile.am file in the top (libjava) directory. And run automake.
34But note the following (thanks to Bryce McKinlay):
35
36> Do you know the magic dance I have to do when adding files to Makefile.am
37> so they will appear in Makefile.in and finally in the user generated
38> Makefile?
39Yup, you need the magic libgcj automake ;-)
40
41<ftp://ftp.freesoftware.com/.0/sourceware/java/automake-gcj-1.4.tar.gz>
42
43Install that (dont worry, it should still work for other projects), add your
44files to the Makefile.am, then just type "automake" and it will regenerate the
45Makefile.in. Easy!
46
47Tom Tromey adds:
48If you add a class to java.lang, java.io, or java.util
49(including sub-packages, like java.lang.ref).
50
51* Edit gcj/javaprims.h
52
53* Go to the `namespace java' line, and delete that entire block (the   
54  entire contents of the namespace)
55
56* Then insert the output of `perl ../scripts/classes.pl' into the file
57  at that point.
58
59If you're generating a patch there is a program you can get to do an
60offline `cvs add' (it will fake an `add' if you don't have write
61permission yet).  Then you can use `cvs diff -N' to generate the
62patch.  See http://www.red-bean.com/cvsutils/
63
Note: See TracBrowser for help on using the repository browser.