The process of OpenJDK compilation is very time consuming. It is very boring, especially when one is developing a small part of the whole project, which needs full recompilation for testing purposes. To do it in a simple way and to compile only the necessary parts, there are incremental builds.
We need to download the OpenJDK (6 or 7) source code. You may need libmotif
installed. Windows users may need to install Cygwin.
We will see how OpenJDK is built incrementally, avoiding adding any nasty bugs.
First, let's build OpenJDK for the first time:
make all
Then, we will build it for the second time:
make all
You can see from the input that nothing was actually built.
Then, let's insignificantly change some source file (for example,
cardTableModRefBS.cpp
).Let's
make
OpenJDK again, but this time we willgrep
the output:make all | grep -i .cpp
We see that, in the output, only...