gcc/libjava/HACKING

68 lines
2.3 KiB
Plaintext

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 :)
--
libgcj uses GNU Classpath as an upstream provider. Snapshots of
Classpath are imported into the libgcj source tree. Some classes are
overridden by local versions; these files still appear in the libgcj
tree.
To import a new release:
- Check out a classpath snapshot
- Use auto* to create configure, Makefile.in, etc
You have to make sure to use the gcc libtool.m4 and gcc lt* scripts
cd .../classpath
cp ../../lt* .
aclocal -I m4 -I ../..
autoconf
autoheader
automake
rm -rf autom4te.cache
- Test everything first. The simplest way to do this is by overlaying
the checked out classpath on your gcc tree and then doing a build.
- Use 'cvs import' to import. The vendor tag is 'CLASSPATH'. For the
release tag, if this is a released classpath version, use something
like 'classpath-import-VERSION'; otherwise something like
'classpath-import-DATE'.
Be sure to use -ko and -I\!
- Remove any files that were deleted in Classpath
- Run 'scripts/makemake.tcl > sources.am' in the source tree
- Run automake for libgcj
Over time we plan to remove as many of the remaining divergences as
possible.
File additions and deletions require running scripts/makemake.tcl
before running automake.
--
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.
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. This must be run from the build tree, in
<build>/classpath/lib; it uses the .class file name to determine
what to print.
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/