OSDN Git Service

df74b06414e7cb6442c9272f01b4f44d534ec0cb
[pf3gnuchains/gcc-fork.git] / libjava / HACKING
1 Things libgcj hackers should know
2 ---------------------------------
3
4 If you want to hack on the libgcj files you need to be aware of the
5 following things. There are probably lots of other things that should be
6 explained in this HACKING file. Please add them if you discover them :)
7
8 --
9
10 libgcj uses GNU Classpath as an upstream provider.  Snapshots of
11 Classpath are imported into the libgcj source tree.  Some classes are
12 overridden by local versions; these files still appear in the libgcj
13 tree.
14
15 To import a new release:
16
17 - Check out a classpath snapshot
18 - Use auto* to create configure, Makefile.in, etc
19   You have to make sure to use the gcc libtool.m4 and gcc lt* scripts
20   cd .../classpath
21   cp ../../lt* .
22   aclocal -I m4 -I ../..
23   autoconf
24   autoheader
25   automake
26   rm -rf autom4te.cache
27 - Test everything first.  The simplest way to do this is by overlaying
28   the checked out classpath on your gcc tree and then doing a build.
29 - Use 'cvs import' to import.  The vendor tag is 'CLASSPATH'.  For the
30   release tag, if this is a released classpath version, use something
31   like 'classpath-import-VERSION'; otherwise something like
32   'classpath-import-DATE'.
33   Be sure to use -ko and -I\!
34 - Remove any files that were deleted in Classpath
35 - Run 'scripts/makemake.tcl > sources.am' in the source tree
36 - Run automake for libgcj
37
38 Over time we plan to remove as many of the remaining divergences as
39 possible.
40
41 File additions and deletions require running scripts/makemake.tcl
42 before running automake.
43
44
45 --
46
47 If you need to add new java files to libgcj then you have to edit the
48 Makefile.am file in the top (libjava) directory. And run automake.
49
50 If you add a class to java.lang, java.io, or java.util
51 (including sub-packages, like java.lang.ref).
52
53 * Edit gcj/javaprims.h
54
55 * Go to the `namespace java' line, and delete that entire block (the   
56   entire contents of the namespace)
57
58 * Then insert the output of `perl scripts/classes.pl' into the file
59   at that point.  This must be run from the build tree, in
60   <build>/classpath/lib; it uses the .class file name to determine
61   what to print.
62
63 If you're generating a patch there is a program you can get to do an
64 offline `cvs add' (it will fake an `add' if you don't have write
65 permission yet).  Then you can use `cvs diff -N' to generate the
66 patch.  See http://www.red-bean.com/cvsutils/
67