aboutsummaryrefslogtreecommitdiff
path: root/libjava/HACKING
blob: df74b06414e7cb6442c9272f01b4f44d534ec0cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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/